Saturday, November 12, 2011

xmonad

sudo apt-get install xmonad xmobar dmenu stalonetray

create /usr/share/xsessions/myxmonad.desktop


[Desktop Entry]
Encoding=UTF-8
Name=My XMonad
Comment=Lightweight tiling window manager
Exec=xmonad.start
Icon=xmonad.png
Type=XSession

create /usr/local/bin/xmonad.start


#!/bin/bash
##export XMODIFIERS="@im=uim" 
##export GTK_IM_MODULE="uim" 
##export QT_IM_MODULE="uim" 
ibus-daemon& 


#case 
#xrdb -merge .Xresources


stalonetray -geometry 1x1+1660 -bg "#808080" --kludges use_icons_hints --grow-gravity NE --icon-gravity NE -i 20 -t false& 
#trayer --edge top --align left --SetDockType true --SetPartialStrut true --expand true --width 4 --height 20 --transparent true --tint 0x000000 --distance 1530 --distancefrom left &




gnome-screensaver&


gnome-settings-daemon&


gnome-sound-applet& 


#if [ -x /usr/bin/gnome-power-manager ] ; then
#   sleep 1
#   gnome-power-manager
#fi


if [ -x /usr/bin/nm-applet ] ; then
   nm-applet --sm-disable &
fi


#kmix --keepvisibility


feh --bg-center /home/fabio/immagini/wallp/52989-dunesbg.jpg &
#gnome-terminal&
xmodmap /home/fabio/.Xmodmap
sleep 1
dropbox start
exec xmonad


create .xmobarrc


Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
       , bgColor = "black"
       , fgColor = "grey"
       , position = TopW L 90
       , lowerOnStart = True
       , commands = [ Run Weather "RJOO" ["-t","<tempC> <skyCondition>","-L","15","-H","25","--low","lightblue","--normal","lightgreen","--high","pink"] 60
                    , Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
                    , Run Network "eth1" ["-L","500","-H","2000","--normal","lightyellow","--high","red"] 10
                    , Run Cpu ["-t","Cpu <total>","-L","40","-H","70","--low","lightblue","--normal","lightgreen","--high","red"] 10
                    , Run Memory ["-t","Mem <usedratio>","-L","15","-H","80","--low","lightblue","--normal","lightgreen","--high","red"] 10
                    , Run Swap ["-t","Swap <usedratio>","-L","3","-H","15","--low","lightblue","--normal","lightgreen","--high","red"] 10
                    , Run Date "%a %_d %b %Y <fc=#ee9a00>%H:%M:%S</fc>" "date" 10
                    , Run StdinReader     
                    ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "<fc=#9a00ee>%cpu%</fc> | <fc=#9a00ee>%memory%</fc> <fc=#9a00ee>%swap%</fc> | <fc=#9a00ee>Net</fc> %eth0% - %eth1% } %StdinReader% { <fc=#9aeeFF>%RJOO%</fc> %date%"
       }


create .xmonad/xmonad.hs



import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
import System.Exit


myManageHook = composeAll
    [ className =? "Gimp"        --> doFloat
    , className =? "Vncviewer"   --> doFloat
    , className =? "stalonetray" --> doIgnore
    ]


main = do
    xmproc <- spawnPipe "xmobar"
    xmonad $ defaultConfig
        { manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above
                        <+> manageHook defaultConfig
        , layoutHook = avoidStruts  $  layoutHook defaultConfig
        , logHook = dynamicLogWithPP $ xmobarPP
                        { ppOutput = hPutStrLn xmproc
                        , ppTitle = xmobarColor "green" "" . shorten 100
                        }
        , normalBorderColor   =  "#808080"
        , focusedBorderColor =  "#1161a8"
        ,  modMask = mod3Mask -- set the mod key to the windows key
        } `additionalKeys`
        [ ((mod1Mask .|. shiftMask , xK_BackSpace), spawn "gnome-screensaver-command -l")
        , ((mod3Mask .|. shiftMask,   xK_q), spawn "xkill")
        , ((mod3Mask .|. shiftMask .|. controlMask,  xK_q), io exitSuccess)     
        ]


create .Xmodmap

clear Mod3
add Mod3 = Muhenkan




No comments:

Post a Comment