i've been busy.
:)
some might say not the most productive use of my time... but what do they know.
i've been learning, and enhancing my skillset, all the while improving my desktop work environment for greater expediency.
it's that old cliche, that linux users spend 51 weeks configuring their desktop, so they can do their years work in an hour. XD
so...
i have xmonad back on the go.
it's very nice.
it's very nice as it comes outta the box, very useable as is.
however...
it's even nicer once a few customisations are added, most pertinently, some shortcuts for launching applications and doing other bits n bobs.
what pleases me most about my xmonad configuration just now though... is not xmonad itself...
it's that i have now got it working perfectly with my favorite panel application, tint2.
tint2 is another immensely customizable app, like xmonad is.
.... me likes the customizability. ^_^
i've tint2 set up much the same as i had it in openbox. ... um, pretty much identically actually.
and also ... i have a simple conky working nicely with tint2 and xmonad too, simply informing me of my network up and down speeds, regardless of which connection i'm using (wired or wireless), in the same space.
here's one bit of this setup i'm especially chuffed with...
i have a shortcut to toggle the panel visibility.
:)_:)_:)__:)___:)______:)_________:)_____________:)_____________________:)
here's a couple links to threads i made marking my little landmark accomplishments. ^_^
http://crunchbanglinux.org/forums/post/89967/#p89967
http://crunchbanglinux.org/forums/topic/9965/my-xmonad-adventures/
of course, there's all the keyboard shortcuts too... and that's (besides xmonad's inherent greatness) where the real productivity expedience boon comes in.
... much as i had it in my openbox configuration. :)
clever little systematic logic that makes it intuitive.
i didnt want to disrupt the xmonad vi-alike controls, so qwerthjlk were all out. the rest though, i considered fair game for remapping. i still might remap q... i dont like how risky it is having the equivalent of ctrl alt bksp (to restart the graphics server, and thus lose everything being worked on in gui) being so close (one key away) from other regularly used shortcuts.
so, the tux button (or "windows button" to the man on the street) i use as my primary modifier, so it doesnt clash with some applications which use alt. a combination with a single key would start an application, like g for the GNU Image Manipulation Program, or D for Gedit (since E is taken up for multi monitor setups, and there's no need for a "show desktop" shortcut in xmonad).
editing configs happens with a triple modifier, of ctrl, tux and alt... and the key of whatever is being modified, F2 and F3 for gmrun, x for xmonad, n for the tint2 panel... i havnt fully decided on where to put conky yet, having just added it, and already using c for communications (starting pidgin and skype, and perhaps mumble if i start using it too), and of course k is taken up... it's likely going to be y isnt it.
/me presses ctrl,tux,alt,x and makes a few edits quickly... ... and tux,alt,x the new changes are in effect.
:) there we go, just a quick few seconds, no having to type in a file location, no having to navigate to the file. :) conky start, restart and edit keys now set up. :)
and as well as the triple modifier for editing something, where you wish to control (ctrl) the system (tux) to alter (alt) it [(see the intuitive logic?)], i've a restart on a two key modifier of tux, alt, and then the same coresponding key. so i can restart the panel after making edits simply with tux, alt, n, which does a "pkill tint2 && tint2". i was very pleased first time i tried this in xmonad and it worked, thinking the way it uses a spawnpipe for it might cause complications, but no, it was simple n straight forward. which was nice.
anyways, i'll let you explore the rest if you're intereseted. ^_^ (hehe, yeah, i still write this as if someone will read it some day. lol. if you do, please, leave some comments. thnx.)
here's the configs code:
tint2:
#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------
#---------------------------------------------
# BACKGROUND AND BORDER
#---------------------------------------------
rounded = 0
border_width = 1
background_color = #333333 19
border_color = #999999 70
rounded = 0
border_width = 1
background_color = #000000 00
border_color = #000000 00
rounded = 0
border_width = 1
background_color = #ffffff 60
border_color = #ffffff 99
#---------------------------------------------
# PANEL
#---------------------------------------------
panel_layer=top
panel_monitor = all
panel_position = bottom right
panel_size = 90% 19
panel_margin = 0 0
panel_padding = -1 -1 7
font_shadow = 0
panel_background_id = 2
#wm_menu = 1
#---------------------------------------------
# TASKBAR
#---------------------------------------------
taskbar_mode = multi_desktop
#taskbar_mode = single_desktop
taskbar_padding = -1 -1 -1
taskbar_background_id = 1
#---------------------------------------------
# TASKS
#---------------------------------------------
task_icon = 1
task_text = 0
task_maximum_size = 144 19
task_centered = 1
task_padding = -1 2
task_font = sans 8
task_font_color = #111111 100
task_active_font_color = #ffffff 100
task_background_id = 1
task_active_background_id = 3
#---------------------------------------------
# SYSTRAYBAR
#---------------------------------------------
systray_padding = -1 -1 -1
systray_background_id = 1
#---------------------------------------------
# CLOCK
#---------------------------------------------
time1_format = %H:%M:%S %A %d %B
time1_font = sans 13
#time2_format = %A %d
#time2_font = sans 8
clock_font_color = #ffffff 100
clock_padding = 0 0
clock_background_id = 1
clock_lclick_command = xclock
clock_rclick_command = zenity --calendar
#---------------------------------------------
# BATTERY
#---------------------------------------------
battery = 1
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
bat1_font = sans 7
bat2_font = sans 7
battery_font_color = #ffffff 100
battery_padding = 0 0
battery_background_id = 1
#---------------------------------------------
# MOUSE ACTION ON TASK
#---------------------------------------------
mouse_middle = close
mouse_right = none
mouse_scroll_up = toggle
mouse_scroll_down = iconify
conky:
background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 0.3
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1 1
maximum_width 134
draw_outline no
draw_borders no
draw_shades no
draw_graph_borders yes
default_color ff0000
#default_shade_color 000000
default_outline_color 000000
alignment bottom_left
gap_x 0
gap_y -108
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
TEXT
${voffset -6}${color #ffff00}${downspeedgraph 9,135 wlan0}
${voffset -4}${color}${upspeedgraph 9,135 wlan0}
${voffset -22}${color #00ff00}${downspeedgraph 9,135 eth0}
${voffset -4}${color}${upspeedgraph 9,135 eth0}
${voffset -22}${color #00ffff}${downspeedgraph 9,135 eth1}
${voffset -4}${color}${upspeedgraph 9,135 eth1}
and last, but certainly not least:
the xmonad.hs config, my pride n joy. lol.
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Hooks.EwmhDesktops
import XMonad.Config.Desktop
import System.IO
-- initially created with help of: http://www.haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration
-- use "xmonad --recompile" to check it's syntactically correct if making changes (better than just modQ)
-- list of key codes http://haskell.org/haskellwiki/Xmonad/Key_codes
-- may also prove useful for some keys and commands http://hackage.haskell.org/packages/archive/X11/1.4.5/doc/html/Graphics-X11-Types.html
-- may want to encorporate: http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html
myManageHook = composeAll
[ className =? "Gimp" --> doFloat
, className =? "pidgin" --> doFloat
, className =? "skype" --> doFloat
, className =? "vlc" --> doFloat
, className =? "tilda" --> doFloat
, className =? "Vncviewer" --> doFloat
]
main = do
xmproc <- spawnPipe "/usr/bin/tint2 /home/digit/.config/tint2/tint2rc" xmonad $ ewmh desktopConfig { manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above
<+> manageHook desktopConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, modMask = mod4Mask -- Rebind Mod to the Windows key
} `additionalKeys`
[ ((mod4Mask, xK_F2), spawn "gmrun")
, ((mod4Mask .|. controlMask .|. mod1Mask, xK_F2), spawn "gedit ~/.gmrunrc")
, ((mod4Mask, xK_F3), spawn "~/.config/dmenu/dmenu-bind.sh")
, ((mod4Mask .|. controlMask .|. mod1Mask, xK_F3), spawn "gedit ~/.config/dmenu/dmenu-bind.sh") -- edit dmenu
, ((mod4Mask, xK_F4), kill)
, ((mod4Mask, xK_F5), spawn "xfce4-appfinder")
, ((mod4Mask, xK_F6), spawn "xkill")
, ((mod4Mask, xK_a), spawn "audacity")
, ((mod4Mask, xK_b), spawn "firefox")
, ((mod4Mask .|. mod1Mask, xK_b), spawn "seamonkey")
, ((mod4Mask, xK_c), spawn "pidgin & skype")
, ((mod4Mask, xK_d), spawn "gedit")
, ((mod4Mask .|. controlMask, xK_d), spawn "gksudo gedit")
, ((mod4Mask, xK_f), spawn "pcmanfm")
, ((mod4Mask .|. controlMask, xK_f), spawn "gksudo pcmanfm")
, ((mod4Mask .|. shiftMask, xK_f), spawn "searchmonkey")
, ((mod4Mask .|. shiftMask .|. mod1Mask, xK_f), spawn "catfish")
, ((mod4Mask, xK_g), spawn "gimp")
, ((mod4Mask, xK_i), spawn "inkscape")
, ((mod4Mask, xK_m), spawn "vlc")
, ((mod4Mask, xK_n), sendMessage ToggleStruts) -- toggle panel visability.
, ((mod4Mask .|. mod1Mask, xK_n), spawn "pkill tint2 && tint2") -- restart panel.
, ((mod4Mask .|. controlMask .|. mod1Mask, xK_n), spawn "gedit ~/.config/tint2/tint2rc") -- edit panel config
, ((mod4Mask .|. shiftMask, xK_p), spawn "gksudo gparted")
, ((mod4Mask, xK_p), spawn "gksudo synaptic")
-- , ((mod4Mask, xK_q), spawn "xmonad --restart")
, ((mod4Mask, xK_x), spawn "xmonad --recompile") -- recompile xmonad
, ((mod4Mask .|. mod1Mask, xK_x), spawn "xmonad --restart") -- restart xmonad
, ((mod4Mask .|. controlMask .|. mod1Mask, xK_x), spawn "gedit ~/.xmonad/xmonad.hs") -- edit xmonad config
, ((mod4Mask, xK_y), spawn "conky")
, ((mod4Mask .|. mod1Mask, xK_y), spawn "pkill conky && conky") --restart conky
, ((mod4Mask .|. controlMask .|. mod1Mask, xK_y), spawn "gedit ~/.conkyrc") --edit conky
, ((0, xK_Print), spawn "scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/screenshots/ & gpicview ~/images/screenshots/$f'")
]
i was gonna add in the dmenu and gmrun for an added bonus, but then realised, in quite a shock, that of course, the key combinations i've chosen conflict with (and dont supercede) the switching of tty. lol. oops, oh well. ^_^ its not like i ever really need to edit them anyway.
well, i hope u get even a millionth of a kick outta these as i did making them and do using them. :)
/me did. :)
ReplyDelete