OESF Portables Forum
Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Debian => Topic started by: canguy247 on October 16, 2008, 08:09:35 pm
-
I saw Yonggun's (2or0) post on his blog about Awesome Window Manager and decided to try it out. I have found that with both lxp-icewm and e17 I use the terminal almost exclusively so Awesome seemed like the ideal match. I did some tweeking (after plenty of Googling) and have a set-up I really like. I have included some screenshots as well as my .awesomerc and the script which goes along with it. As usual I do not take responsibility for any trashed systems from using my suggestions.
.awesomerc:
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']screen 0
{
styles
{
normal
{
font = "sans 8"
fg = "#dddddd"
bg = "#444444"
border = "#555555"
}
focus
{
fg = "#000000"
bg = "#535d6c"
border = "#535d6c"
}
urgent
{
fg = "#111111"
bg = "#ff4500"
}
}
tags
{
tag 1 { layout = max }
tag 2 { layout = max }
tag 3 { layout = max }
tag 4 { layout = max }
}
layouts
{
layout max { image = "/usr/share/awesome/icons/layouts/maxw.png" }
layout tile { image = "/usr/share/awesome/icons/layouts/tilew.png" }
layout tileleft { image = "/usr/share/awesome/icons/layouts/tileleftw.png" }
layout tilebottom { image = "/usr/share/awesome/icons/layouts/tilebottomw.png" }
layout tiletop { image = "/usr/share/awesome/icons/layouts/tiletopw.png" }
layout spiral { image = "/usr/share/awesome/icons/layouts/spiralw.png" }
layout dwindle { image = "/usr/share/awesome/icons/layouts/dwindlew.png" }
layout floating { image = "/usr/share/awesome/icons/layouts/floatingw.png" }
}
statusbar mystatusbar2
{
position = "bottom"
layoutinfo mylayoutinfo
{
mouse
{
button = "1"
command = "tag_setlayout"
arg = "+1"
}
mouse
{
button = "4"
command = "tag_setlayout"
arg = "+1"
}
mouse
{
button = "3"
command = "tag_setlayout"
arg = "-1"
}
mouse
{
button = "5"
command = "tag_setlayout"
arg = "-1"
}
}
taglist mytaglist
{
mouse
{
button = "1"
command = "tag_view"
}
mouse
{
button = "1"
modkey = {"Mod4"}
command = "client_tag"
}
mouse
{
button = "3"
command = "tag_toggleview"
}
mouse
{
button = "3"
modkey = {"Mod4"}
command = "client_toggletag"
}
mouse
{
button = "4"
command = "tag_viewnext"
}
mouse
{
button = "5"
command = "tag_viewprev"
}
}
tasklist mytasklist
{
mouse
{
button = "4"
command = "client_focusnext"
}
mouse
{
button = "5"
command = "client_focusprev"
}
mouse
{
modkey = {"Mod4"}
button = "4"
command = "client_swapnext"
}
mouse
{
modkey = {"Mod4"}
button = "5"
command = "client_swapprev"
}
}
iconbox logo
{
image = "/usr/share/awesome/icons/awesome16.png"
mouse
{
button = "3"
command = "spawn"
arg = "exec sakura"
}
mouse
{
button = "1"
command = "spawn"
arg = "exec x-terminal-emulator -e man awesome"
}
}
}
statusbar mystatusbar
{
position = "top"
textbox tb_mpc { text = "" }
textbox tb_bat { text = "" align = "right"}
textbox tb1 { text = " CPU: " align = "right"}
#textbox tb_cpu { text = "" align = "right"}
graph g_cpu
{
data gg_cpu
{
scale = false
max = 100
fg = "#cc6666"
fg_center = "#cc6666"
fg_end = "#998888"
}
width = 40
height = "0.8"
bg = "#000000"
bordercolor = "#666699"
align = "right"
}
textbox tb3 { text = " " align = "right"}
textbox tb_date { text = "" align = "right"}
}
}
rules
{
rule { name = "Gimp" float = true }
rule { name = "MPlayer" float = true }
rule { name = "Acroread" float = true }
rule { name = "xscorch" float = true }
}
mouse
{
root
{
button = "1"
command = "spawn"
arg = "exec sakura"
}
root
{
button = "4"
command = "tag_viewnext"
}
root
{
button = "5"
command = "tag_viewprev"
}
client
{
modkey = {"Mod4"}
button = "3"
command = "client_movemouse"
}
client
{
modkey = {"Mod4"}
button = "2"
command = "client_zoom"
}
client
{
modkey = {"Mod4"}
button = "3"
command = "client_resizemouse"
}
titlebar
{
button = "1"
command = "client_movemouse"
}
titlebar
{
button = "3"
command = "client_resizemouse"
}
}
keys
{
key
{
modkey = {"Mod4"}
key = "F1"
command = "spawn"
arg = "exec x-terminal-emulator -e man `for i in /usr/share/man/man?;do ls $i; done | cut -d. -f1 | awesome-menu 'See manual page for:'`"
}
key
{
modkey = {"Control", "Shift"}
key = "Right"
command = "spawn"
arg = "exec mpc next"
}
key
{
modkey = {"Control", "Shift"}
key = "Left"
command = "spawn"
arg = "exec mpc prev"
}
key
{
modkey = {"Control", "Shift"}
key = "0"
command = "spawn"
arg = "exec mpc volume +1"
}
key
{
modkey = {"Control", "Shift"}
key = "9"
command = "spawn"
arg = "exec mpc volume -1"
}
key
{
modkey = {"Control", "Shift"}
key = "s"
command = "spawn"
arg = "exec mpc stop"
}
key
{
modkey = {"Control", "Shift"}
key = "a"
command = "spawn"
arg = "exec play"
}
key
{
modkey = {"Mod4"}
key = "F2"
command = "spawn"
arg = "exec find /usr/bin -type f -executable ! -empty | sed 's,.*/,,' | awesome-menu -e 'exec ' Execute:"
}
key
{
modkey = {"Mod4"}
key = "F3"
command = "spawn"
arg = "exec x-terminal-emulator -e ssh `cut -d' ' -f1 ~/.ssh/known_hosts | cut -d, -f1 | awesome-menu 'ssh to:'`"
}
key
{
modkey = {"Control", "Shift"}
key = "Return"
command = "spawn"
arg = "exec sakura"
}
key
{
modkey = {"Control"}
key = "space"
command = "tag_setlayout"
arg = "+1"
}
key
{
modkey = {"Control", "Shift"}
key = "space"
command = "tag_setlayout"
arg = "-1"
}
key
{
modkey = {"Control", "Shift"}
key = "b"
command = "statusbar_toggle"
}
key
{
modkey = {"Mod4"}
key = "j"
command = "client_focusnext"
}
key
{
modkey = {"Mod4"}
key = "k"
command = "client_focusprev"
}
key
{
modkey = {"Mod4"}
key = "Tab"
command = "focus_history"
arg = "-1"
}
key
{
modkey = {"Mod4", "Shift"}
key = "j"
command = "client_swapnext"
}
key
{
modkey = {"Mod4", "Shift"}
key = "k"
command = "client_swapprev"
}
key
{
modkey = {"Control", "Shift"}
key = "j"
command = "screen_focus"
arg = "+1"
}
key
{
modkey = {"Control", "Shift"}
key = "k"
command = "screen_focus"
arg = "-1"
}
key
{
modkey = {"Mod4"}
key = "h"
command = "tag_setmwfact"
arg = "-0.05"
}
key
{
modkey = {"Mod4"}
key = "l"
command = "tag_setmwfact"
arg = "+0.05"
}
key
{
modkey = {"Mod4", "Shift"}
key = "h"
command = "tag_setnmaster"
arg = "+1"
}
key
{
modkey = {"Mod4", "Shift"}
key = "l"
command = "tag_setnmaster"
arg = "-1"
}
key
{
modkey = {"Mod4", "Control"}
key = "h"
command = "tag_setncol"
arg = "+1"
}
key
{
modkey = {"Mod4", "Control"}
key = "l"
command = "tag_setncol"
arg = "-1"
}
key
{
modkey = {"Mod4"}
key = "Escape"
command = "tag_prev_selected"
}
key
{
modkey = {"Mod4"}
key = "Left"
command = "tag_viewprev"
}
key
{
modkey = {"Mod4"}
key = "Right"
command = "tag_viewnext"
}
key
{
modkey = {"Mod4"}
key = "m"
command = "client_togglemax"
}
key
{
modkey = {"Mod4", "Control"}
key = "Return"
command = "client_zoom"
}
key
{
modkey = {"Mod4", "Control"}
key = "space"
command = "client_togglefloating"
}
key
{
modkey = {"Mod4"}
key = "s"
command = "client_togglescratch"
}
key
{
modkey = {"Mod4", "Control"}
key = "s"
command = "client_setscratch"
}
key
{
modkey = {"Mod4", "Shift"}
key = "c"
command = "client_kill"
}
key
{
modkey = {"Mod4", "Shift"}
key = "q"
command = "quit"
}
key
{
modkey = {"Control", "Shift"}
key = "r"
command = "restart"
}
key
{
modkey = {"Mod4"}
key = "0"
command = "tag_view"
}
key
{
command = "tag_view"
key = "XF86LaunchA"
arg = 1
}
key
{
command = "tag_view"
key = "XF86LaunchB"
arg = 2
}
key
{
command = "tag_view"
key = "XF86LaunchC"
arg = 3
}
key
{
command = "tag_view"
key = "XF86LaunchD"
arg = 4
}
key
{
modkey = {"Mod4", "Control"}
key = "0"
command = "tag_toggleview"
}
keylist
{
modkey = {"Mod4", "Control"}
command = "tag_toggleview"
keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
}
key
{
modkey = {"Mod4", "Shift"}
key = "0"
command = "client_tag"
}
keylist
{
modkey = {"Mod4", "Shift"}
command = "client_tag"
keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
}
key
{
modkey = {"Mod4", "Shift", "Control"}
key = "0"
command = "client_toggletag"
}
keylist
{
modkey = {"Mod4", "Shift", "Control"}
command = "client_toggletag"
keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
}
}
# vim: filetype=conf[/div]
~/bin/status.h:
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']#/bin/bash
while true;
do
date=`date +"%Y.%m.%d %l:%M" | sed 's/ / /g'`
bat=`apm | sed -e 's/.*: //'`
### CPU
CPUSTAT="$HOME/.cpustat"
old_cpu_vals=(`head -1 "$CPUSTAT"`)
cpu_old_user=${old_cpu_vals[0]}
cpu_old_nice=${old_cpu_vals[1]}
cpu_old_system=${old_cpu_vals[2]}
cpu_old_idle=${old_cpu_vals[3]}
cpu_old_total=`echo "$cpu_old_user + $cpu_old_nice + $cpu_old_system + $cpu_old_idle" | bc`
cpu_vals_text=`cat /proc/stat | head -1 | sed -e 's/^cpu[^0-9]*//g' -e 's/\([^ ]\+ [^ ]\+ [^ ]\+ [^ ]\+\).*/\1/g'`
cpu_vals=($cpu_vals_text)
cpu_user=${cpu_vals[0]}
cpu_nice=${cpu_vals[1]}
cpu_system=${cpu_vals[2]}
cpu_idle=${cpu_vals[3]}
cpu_total=`echo "$cpu_user + $cpu_nice + $cpu_system + $cpu_idle" | bc`
pcpu=`echo "(100 * ($cpu_system - $cpu_old_system + $cpu_user - $cpu_old_user)) / ($cpu_total - $cpu_old_total)" | bc`
echo $cpu_vals_text > "$CPUSTAT"
### MPD
mpc_lines=`mpc | wc -l`
vol=`mpc | grep 'volume:' | sed -e 's/volume: //' -e 's/ .*//g'`
mpc_text="stopped @ $vol"
if [[ $mpc_lines -gt 1 ]]; then
song=`mpc | head -1`
status=`mpc | grep '^\[' | sed -e 's/ .*//' -e 's/[^a-zA-Z]//g'`
mpc_text="$song @ $vol"
fi
echo 0 widget_tell mystatusbar tb_mpc text "$mpc_text" | awesome-client
echo 0 widget_tell mystatusbar g_cpu data gg_cpu "$pcpu" | awesome-client
echo 0 widget_tell mystatusbar tb_date text "$date" | awesome-client
echo 0 widget_tell mystatusbar tb_bat text "$bat" | awesome-client
sleep 3
done[/div]
-
Reminds me a fair amount of EvilWM. How much RAM does it use?
Nice looking any way you cut it!
-
Reminds me a fair amount of EvilWM. How much RAM does it use?
The cool thing about it (although not entirely useful on a 640x480 screen) is that it is a tiling WM.
I did a quick check and had 43mb free. This is not a clean start, and with mpd and sakura running.
-
Tiling WM? What's that (yes I am too lazy to look it up ATM)?
How about the use % as reported by 'top' (your screenshot didn't show it)?
-
Awesome work!
Its not gpe, which is what I would really like, but its a lot nicer than any other wm I've used on my Z so far.
Now if only I could figure out how to get it working for non root users...
-
Its not gpe, which is what I would really like, but its a lot nicer than any other wm I've used on my Z so far.
I don't know why you'd want it, but
sudo apt-get install gpe
should get it for you.
Also, what's not working for AwesomeWM as a normal user?