Permalink
Browse files

lots of changes to xmonad + other stuff

  • Loading branch information...
1 parent 2ea49ab commit 568b17cbf92f5785c1564f1c99a06c9c0d6eef94 @degeberg committed Feb 17, 2011
Showing with 82 additions and 65 deletions.
  1. +2 −2 Xdefaults
  2. +2 −0 copy2machine
  3. +2 −0 copy2repo
  4. +7 −0 screenrc
  5. +1 −0 vimrc
  6. +0 −20 xbindkeysrc
  7. +20 −0 xmobarrc
  8. +43 −34 xmonad/xmonad.hs
  9. +2 −9 xsession
  10. +3 −0 zshrc
View
@@ -37,7 +37,7 @@ URxvt*saveLines: 12000
URxvt*scrollBar: false
URxvt*scrollstyle: rxvt
-URxvt*letterSpace: -1
+!URxvt*letterSpace: -1
URxvt*modifier: alt
-
+URxvt.urgentOnBell: true
View
@@ -11,3 +11,5 @@ cp xsession ~/.xsession
cp -r ./vim/* ~/.vim/
cp -r ./xmonad/* ~/.xmonad/
cp gitconfig ~/.gitconfig
+cp screenrc ~/.screenrc
+cp xmobarrc ~/.xmobarrc
View
@@ -12,3 +12,5 @@ cp ~/.xsession xsession
cp -r ~/.vim/* ./vim/
cp ~/.xmonad/xmonad.hs ./xmonad
cp ~/.gitconfig gitconfig
+cp ~/.screenrc screenrc
+cp ~/.xmobarrc xmobarrc
View
@@ -0,0 +1,7 @@
+hardstatus on
+hardstatus alwayslastline
+hardstatus string '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}]%{=b C}[ %m/%d %c ]%{W}'
+
+vbell off
+bell_msg '^GBell in window %n'
+defutf8 on
View
1 vimrc
@@ -32,6 +32,7 @@ set formatprg=par\ -w78
cmap w!! w !sudo tee % >/dev/null
+syntax on
colorscheme wombat256i
if has('gui_running')
set background=dark
View
@@ -9,26 +9,6 @@
"scrot"
Print
-# Turn volume up
-"soundcontroller up"
- XF86AudioRaiseVolume
-
-# Turn volume down
-"soundcontroller down"
- XF86AudioLowerVolume
-
-# Mute/unmute volume
-"soundcontroller toggle"
- XF86AudioMute
-
-# Silence the volume
-"soundcontroller silence"
- mod4 + shift + m
-
-# change sound card
-"soundcontroller changesound"
- mod4 + s
-
"brightness up"
XF86MonBrightnessUp
View
@@ -0,0 +1,20 @@
+-- vim: syn=haskell
+
+Config { font = "-*-montecarlo-medium-r-normal-*-11-*-*-*-c-*-*-*"
+ , bgColor = "black"
+ , fgColor = "grey"
+ , position = Top
+ , lowerOnStart = True
+ , commands = [ Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
+ , Run MultiCpu ["-t","CPU: <total0>%/<total1>%","-L","3","-H","50","--normal","green","--high","red"] 10
+ , Run Memory ["-t","Mem: <usedratio>%"] 10
+ , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
+ , Run StdinReader
+ , Run Com "/home/daniel/bin/xmobar_volume.sh" [] "vol" 2
+ , Run BatteryP ["BAT0"] ["-t","Bat: <left>%","-L","30","-H","90","-l","orange","-n","red","-h","green"] 10
+ ]
+ , sepChar = "%"
+ , alignSep = "}{"
+ , template = "%StdinReader%}{%battery% | %multicpu% | %memory% | %eth0% | %vol% | <fc=#ee9a00>%date%</fc>"
+ }
+
View
@@ -6,69 +6,69 @@ import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.SetWMName
import XMonad.Hooks.ManageHelpers
-import XMonad.Util.Run(spawnPipe)
+import XMonad.Hooks.UrgencyHook
+import XMonad.Util.Run
import XMonad.Util.EZConfig(additionalKeys)
+import XMonad.Util.Scratchpad
import XMonad.Layout.NoBorders
import XMonad.Layout.Accordion
import XMonad.Layout
import XMonad.Actions.CycleWS
import System.IO
+import Graphics.X11.ExtraTypes.XF86
-statusBarCmd= "dzen2 -bg '#1a1a1a' -fg '#ffffff' -h 12 -w 480 -sa c -e '' -ta l -fn -*-*-*-*-*-*-12-*-*-*-*-*-iso10646-1"
dmenuCmd= "dmenu_run -nb '#1a1a1a' -nf '#ffffff' -sb '#aecf96' -sf black -p '>'"
+myBar = "/home/daniel/.cabal/bin/xmobar"
+myTerminal = "urxvt"
-
-main = do din <- spawnPipe statusBarCmd
- xmonad $ defaultConfig
-
- { manageHook = myManageHook <+> manageDocks <+> manageHook defaultConfig
- --, layoutHook = smartBorders(myLayout)
+main = do xmproc <- spawnPipe myBar
+ xmonad $ withUrgencyHook NoUrgencyHook $ defaultConfig
+ { manageHook = myManageHook <+> manageDocks <+> manageHook defaultConfig
, layoutHook = myLayout
+ , terminal = myTerminal
, keys = myKeys
- , workspaces = map show [0 .. 9 :: Int] ++ ["a", "b", "c", "d"]
- , logHook = dynamicLogWithPP $ myPP din
+ , workspaces = map show [0 .. 9 :: Int] ++ ["a", "b", "c", "d"]
+ , logHook = dynamicLogWithPP $ myPP xmproc
, modMask = mod4Mask -- Rebind Mod to the Windows key
, normalBorderColor = "#555555"
- , focusedBorderColor = "#bbbbbb"
- , borderWidth = 1
+ , borderWidth = 1
, startupHook = (setWMName "LG3D" >> spawn "killall xbindkeys; xbindkeys")
}
+myPP h = xmobarPP { ppCurrent = xmobarColor "#429942" "" . wrap "<" ">"
+ , ppUrgent = xmobarColor "red" "" . wrap "<" ">"
+ , ppHidden = noScratchPad
+ , ppTitle = shorten 100
+ , ppOutput = hPutStrLn h }
+ where
+ noScratchPad ws = if ws == "NSP" then "" else ws
+
-- ManageHooks
myManageHook :: ManageHook
myManageHook = composeAll
[ isFullscreen --> doFullFloat
, className =? "Pidgin" --> doShift "d"
, className =? "Skype" --> doShift "d"
- --, className =? "Transmission" --> doShift "c"
, className =? "Keepassx" --> doShift "b"
- , title =? "VLC media player" --> doFloat
- , title =? "VLC (XVideo output)" --> doFloat]
+ , title =? "VLC media player" --> doFloat
+ , title =? "VLC (XVideo output)" --> doFloat] <+> manageScratchPad
-
--- DropNumbers removes the number if a workspace is named, i:name -> name
-dropNumbers wsId = if (':' `elem` wsId)
- then drop 2 wsId
- else wsId
+manageScratchPad :: ManageHook
+manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
+ where
+ h = 0.4 -- terminal height, 10%
+ w = 1 -- terminal width, 100%
+ t = 1 - h -- distance from top edge, 90%
+ l = 1 - w -- distance from left edge, 0%
-- Layouts
-myLayout = avoidStruts (tiled ||| Mirror tiled ||| Full)
+myLayout = avoidStruts (tiled ||| Mirror tiled ||| noBorders Full)
where
tiled = Tall 1 (3/100) (1/2)
nmaster = 1
ratio = 1/2
delta = 3/100
--- Pretty print for dzen
-myPP h = defaultPP
- { ppCurrent = dzenColor "black" "#aecf96" . dropNumbers
- , ppHidden = dzenColor "" "" . dropNumbers
- , ppSep = " ^r(3x3) "
- -- Replace layout name with an icon:
- , ppTitle = dzenColor "aecf96" ""
- , ppOutput = hPutStrLn h
- }
-
-- Keys
myKeys :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ())
myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
@@ -79,12 +79,18 @@ myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
, ((modMask, xK_space ), sendMessage NextLayout)
, ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
+ -- volume control
+ , ((0, xF86XK_AudioLowerVolume), spawn "amixer -q set PCM 6-")
+ , ((0, xF86XK_AudioRaiseVolume), spawn "amixer -q set PCM 6+")
+ , ((0, xF86XK_AudioMute), spawn "amixer -q set Master toggle")
+ , ((modMask .|. shiftMask, xK_m), spawn "amixer -q set PCM 0")
+
-- focus
, ((modMask, xK_Tab ), windows W.focusDown)
, ((modMask, xK_j ), windows W.focusDown)
, ((modMask, xK_k ), windows W.focusUp)
, ((modMask, xK_m ), windows W.focusMaster)
- , ((modMask, xK_Return), windows W.swapMaster)
+ , ((modMask, xK_Return), windows W.swapMaster)
-- floating layer support
, ((modMask, xK_t ), withFocused $ windows . W.sink)
@@ -97,8 +103,11 @@ myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
, ((modMask , xK_comma ), sendMessage (IncMasterN 1))
, ((modMask , xK_period), sendMessage (IncMasterN (-1)))
- -- switch between current and previous workspace
- , ((modMask .|. shiftMask , xK_w ), toggleWS )
+ -- switch between current and previous workspace
+ , ((modMask .|. shiftMask , xK_w ), toggleWS )
+
+
+ , ((0, xK_Meta_R), scratchpadSpawnActionTerminal myTerminal)
-- resizing
, ((modMask, xK_h ), sendMessage Shrink)
View
@@ -14,18 +14,15 @@ if [ -d $HOME/bin ]; then
PATH=$HOME/bin:$PATH
fi
-soundcontroller init
-
-# Creates the header
-dzenheader &
+amixer -q set PCM 0
# Remaps some of the keys
xmodmap ~/.xmodmap
xbindkeys
# For locking the screen
-gnome-screensaver
+#gnome-screensaver
# Starts KeePassX
keepassx &
@@ -41,7 +38,3 @@ urxvtd -q -f -o
# Starts xmonad/gnome
exec xmonad
-
-# Make sure that dzen doesn't keep running after logout
-killall dzenheader dzen2
-
View
3 zshrc
@@ -41,6 +41,8 @@ fi
EDITOR='vim'
+export PATH=~/.cabal/bin:$PATH
+
autoload colors zsh/terminfo
REPORTTIME=20
@@ -55,6 +57,7 @@ alias lla='ls -lA'
alias nano='nano -w'
alias tc='sudo truecrypt -t'
alias mosml='rlwrap mosml'
+alias mtr='mtr --curses'
alias apti='sudo aptitude install'
alias apts='aptitude search'

0 comments on commit 568b17c

Please sign in to comment.