1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---INFORMATIONS
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- informations = { Author = Graawr
-- , Version = XMonad 0.10 <+> ghc 7.4 <+> dzen-0.8.5
-- , Updated = August 30 2013
-- }
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---IMPORTS
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Base
import XMonad
import Data.Maybe (isJust)
import Data.List
import XMonad.Config.Azerty
import System.IO (hPutStrLn)
import System.Exit (exitSuccess)
import qualified XMonad.StackSet as W
-- Utilities
import XMonad.Util.EZConfig (additionalKeysP, additionalMouseBindings)
import XMonad.Util.NamedScratchpad (NamedScratchpad(NS), namedScratchpadManageHook, namedScratchpadAction, customFloating)
import XMonad.Util.Run (safeSpawn, unsafeSpawn, runInTerm, spawnPipe)
import XMonad.Util.SpawnOnce
-- Hooks
import XMonad.Hooks.DynamicLog (dynamicLogWithPP, defaultPP, dzenColor, pad, shorten, wrap, PP(..))
import XMonad.Hooks.ManageDocks (avoidStruts, ToggleStruts(..))
import XMonad.Hooks.Place (placeHook, withGaps, smart)
import XMonad.Hooks.InsertPosition
import XMonad.Hooks.FloatNext (floatNextHook, toggleFloatNext, toggleFloatAllNew)
-- Actions
import XMonad.Actions.Promote
import XMonad.Actions.RotSlaves (rotSlavesDown, rotAllDown)
import XMonad.Actions.CopyWindow (kill1, copyToAll, killAllOtherCopies, runOrCopy)
import XMonad.Actions.WindowGo (runOrRaise, raiseMaybe)
import XMonad.Actions.WithAll (sinkAll, killAll)
import XMonad.Actions.CycleWS (moveTo, shiftTo, WSType(..))
import XMonad.Actions.GridSelect (GSConfig(..), goToSelected, bringSelected, colorRangeFromClassName, buildDefaultGSConfig)
import XMonad.Actions.DynamicWorkspaces (addWorkspacePrompt, removeEmptyWorkspace)
import XMonad.Actions.UpdatePointer
import XMonad.Actions.MouseResize
import qualified XMonad.Actions.ConstrainedResize as Sqr
-- Layouts modifiers
import XMonad.Layout.PerWorkspace (onWorkspace)
import XMonad.Layout.Renamed (renamed, Rename(CutWordsLeft, Replace))
import XMonad.Layout.WorkspaceDir
import XMonad.Layout.Spacing (spacing)
import XMonad.Layout.Minimize
import XMonad.Layout.Maximize
import XMonad.Layout.BoringWindows (boringWindows)
import XMonad.Layout.LimitWindows (limitWindows, increaseLimit, decreaseLimit)
import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..))
import XMonad.Layout.Reflect (reflectVert, reflectHoriz, REFLECTX(..), REFLECTY(..))
import XMonad.Layout.MultiToggle (mkToggle, single, EOT(EOT), Toggle(..), (??))
import XMonad.Layout.MultiToggle.Instances (StdTransformers(NBFULL, MIRROR, NOBORDERS))
import qualified XMonad.Layout.ToggleLayouts as T (toggleLayouts, ToggleLayout(Toggle))
-- Layouts
import XMonad.Layout.GridVariants (Grid(Grid))
import XMonad.Layout.SimplestFloat
import XMonad.Layout.OneBig
import XMonad.Layout.ZoomRow (zoomRow, zoomIn, zoomOut, zoomReset, ZoomMessage(ZoomFullToggle))
import XMonad.Layout.IM (withIM, Property(Role))
-- Prompts
import XMonad.Prompt (defaultXPConfig, XPConfig(..), XPPosition(Top), Direction1D(..))
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---SETTINGS
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Styles
myFont = "-artwiz-nu-medium-*-normal-*-11-*-*-*-*-*-*-*"
myBorderWidth = 1
myColorBG = "#181512"
myColorWhite = "#eddcd3"
myColorRed = "#cd546c"
myColorBrown = "#989584"
-- Settings
myModMask = mod4Mask
myTerminal = "urxvtc_mod -name urxvt"
-- Prompts colors
myPromptConfig =
defaultXPConfig { font = myFont
, bgColor = myColorBG
, fgColor = myColorRed
, bgHLight = myColorBG
, fgHLight = myColorBrown
, borderColor = myColorBG
, promptBorderWidth = myBorderWidth
, height = 20
, position = Top
, historySize = 0
}
-- Grid selector colors
myGridConfig = colorRangeFromClassName
(0x18,0x15,0x12) -- lowest inactive bg
(0x18,0x15,0x12) -- highest inactive bg
(0x18,0x15,0x12) -- active bg
(0x98,0x95,0x84) -- inactive fg
(0xcd,0x54,0x6c) -- active fg
myGSConfig colorizer = (buildDefaultGSConfig myGridConfig)
{ gs_cellheight = 65
, gs_cellwidth = 120
, gs_cellpadding = 10
, gs_font = myFont
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---SCRATCHPADS
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
myScratchpads =
[ NS "terminal" "urxvtc_mod -name terminal -e tmux attach" (resource =? "terminal") myPosition
, NS "music" "urxvtc_mod -name music -e ncmpcpp" (resource =? "music") myPosition
, NS "rtorrent" "urxvtc_mod -name rtorrent -e rtorrent" (resource =? "rtorrent") myPosition
, NS "wcalc" "urxvtc_mod -name wcalc -e wcalc" (resource =? "wcalc") myPosition
] where myPosition = customFloating $ W.RationalRect (1/3) (1/3) (1/3) (1/3)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---KEYBINDINGS
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
myKeys =
-- Xmonad
[ ("M-C-r", spawn "xmonad --recompile")
, ("M-M1-r", spawn "xmonad --restart")
, ("M-S-r", spawn "pkill dzen && xmonad --restart")
, ("M-M1-q", io exitSuccess)
-- Windows
, ("M-r", refresh)
, ("M-q", kill1)
, ("M-C-q", killAll)
, ("M-S-q", killAll >> moveTo Next nonNSP >> killAll >> moveTo Next nonNSP >> killAll >> moveTo Next nonNSP >> killAll >> moveTo Next nonNSP)
, ("M-<Delete>", withFocused $ windows . W.sink)
, ("M-S-<Delete>", sinkAll)
, ("M-z", windows W.focusMaster)
, ("M1-<F9>", windows W.focusDown) -- Mouse special button
, ("M1-<Tab>", windows W.focusDown)
, ("M-a", windows W.swapDown)
, ("M-e", windows W.swapUp)
, ("M1-S-<Tab>", rotSlavesDown)
, ("M1-C-<Tab>", rotAllDown)
, ("M-<Backspace>", promote)
, ("M-*", withFocused minimizeWindow)
, ("M-S-*", sendMessage RestoreNextMinimizedWin)
, ("M-!", withFocused (sendMessage . maximizeRestore))
, ("M-$", toggleFloatNext)
, ("M-S-$", toggleFloatAllNew)
, ("M-S-s", windows copyToAll)
, ("M-C-s", killAllOtherCopies)
, ("M-C-M1-<Up>", sendMessage Arrange)
, ("M-C-M1-<Down>", sendMessage DeArrange)
, ("M-<Up>", sendMessage (MoveUp 10))
, ("M-<Down>", sendMessage (MoveDown 10))
, ("M-<Right>", sendMessage (MoveRight 10))
, ("M-<Left>", sendMessage (MoveLeft 10))
, ("M-S-<Up>", sendMessage (IncreaseUp 10))
, ("M-S-<Down>", sendMessage (IncreaseDown 10))
, ("M-S-<Right>", sendMessage (IncreaseRight 10))
, ("M-S-<Left>", sendMessage (IncreaseLeft 10))
, ("M-C-<Up>", sendMessage (DecreaseUp 10))
, ("M-C-<Down>", sendMessage (DecreaseDown 10))
, ("M-C-<Right>", sendMessage (DecreaseRight 10))
, ("M-C-<Left>", sendMessage (DecreaseLeft 10))
-- Layouts
, ("M-S-<Space>", sendMessage ToggleStruts)
, ("M-d", asks (XMonad.layoutHook . config) >>= setLayout)
, ("M-<KP_Enter>", sendMessage NextLayout)
, ("M-S-f", sendMessage (T.Toggle "float"))
, ("M-S-g", sendMessage (T.Toggle "gimp"))
, ("M-S-x", sendMessage $ Toggle REFLECTX)
, ("M-S-y", sendMessage $ Toggle REFLECTY)
, ("M-S-m", sendMessage $ Toggle MIRROR)
, ("M-S-b", sendMessage $ Toggle NOBORDERS)
, ("M-S-d", sendMessage (Toggle NBFULL) >> sendMessage ToggleStruts)
, ("M-<KP_Multiply>", sendMessage (IncMasterN 1))
, ("M-<KP_Divide>", sendMessage (IncMasterN (-1)))
, ("M-S-<KP_Divide>", decreaseLimit)
, ("M-S-<KP_Multiply>", increaseLimit)
, ("M-h", sendMessage Shrink)
, ("M-l", sendMessage Expand)
, ("M-k", sendMessage zoomIn)
, ("M-j", sendMessage zoomOut)
, ("M-S-;", sendMessage zoomReset)
, ("M-;", sendMessage ZoomFullToggle)
-- Workspaces
, ("<KP_Add>", moveTo Next nonNSP)
, ("<KP_Subtract>", moveTo Prev nonNSP)
, ("M-<KP_Add>", moveTo Next nonEmptyNonNSP)
, ("M-<KP_Subtract>", moveTo Prev nonEmptyNonNSP)
, ("M-S-<KP_Add>", shiftTo Next nonNSP >> moveTo Next nonNSP)
, ("M-S-<KP_Subtract>", shiftTo Prev nonNSP >> moveTo Prev nonNSP)
, ("M-M1-<KP_Add>", addWorkspacePrompt myPromptConfig)
, ("M-M1-<KP_Subtract>",removeEmptyWorkspace)
-- Apps
, ("M-<Return>", spawn "urxvtc_mod -name urxvt")
, ("M-S-<Return>", spawn "urxvtc_mod -name anyWorkspace")
, ("M-<Space>", spawn "dmenu_run -nb '#181512' -nf '#989584' -sb '#181512' -sf '#cd546c' -p '>>' -fn '-*-nu-medium-*-*-*-*-*-*-*-*-*-*-*' -i")
, ("C-<Space>", spawn "pkill dunst")
, ("M-g", spawn "magnet")
, ("M-x", safeSpawn "i3lock" ["-ubi", "/home/logan/images/accueil.png"])
, ("M-f", raiseMaybe (runInTerm "-name ranger" "ranger") (resource =? "ranger"))
, ("M-t", raiseMaybe (runInTerm "-name newsbeuter" "newsbeuter") (resource =? "newsbeuter"))
, ("M-m", raiseMaybe (runInTerm "-name mutt" "mutt") (resource =? "mutt"))
, ("M-v", raiseMaybe (runInTerm "-name weechat" "weechat-curses") (resource =? "weechat"))
, ("M-o", raiseMaybe (runInTerm "-name htop" "htop") (resource =? "htop"))
, ("M-w", runOrRaise "iceweasel" (resource =? "Navigator"))
, ("M-C-f", runOrRaise "thunar" (resource =? "thunar"))
, ("M-C-<Return>", runOrRaise "trayerd" (resource =? "trayer"))
, ("M-M1-f", runOrCopy "urxvtc_mod -name ranger -e ranger" (resource =? "ranger"))
, ("M-M1-t", runOrCopy "urxvtc_mod -name newsbeuter -e newsbeuter" (resource =? "newsbeuter"))
, ("M-M1-m", runOrCopy "urxvtc_mod -name mutt -e mutt" (resource =? "mutt"))
, ("M-M1-v", runOrCopy "urxvtc_mod -name weechat -e weechat-curses" (resource =? "weechat"))
, ("M-M1-o", runOrCopy "urxvtc_mod -name htop -e htop" (resource =? "htop"))
, ("M-M1-w", runOrCopy "iceweasel" (resource =? "Navigator"))
, ("M-C-A-f", runOrCopy "thunar" (resource =? "thunar"))
, ("M-M1-C-<Return>", runOrCopy "trayerd" (resource =? "trayer"))
-- Prompts
, ("M-,", goToSelected $ myGSConfig myGridConfig)
, ("M-S-,", bringSelected $ myGSConfig myGridConfig)
, ("M-:", changeDir myPromptConfig)
-- Scratchpads
, ("M-<Tab>", namedScratchpadAction myScratchpads "terminal")
, ("M-c", namedScratchpadAction myScratchpads "wcalc")
, ("M-b", namedScratchpadAction myScratchpads "rtorrent")
, ("M-n", namedScratchpadAction myScratchpads "music")
, ("<XF86Tools>", namedScratchpadAction myScratchpads "music")
-- Multimedia Keys
, ("<XF86AudioPlay>", spawn "ncmpcpp toggle")
, ("<XF86AudioPrev>", spawn "ncmpcpp prev")
, ("<XF86AudioNext>", spawn "ncmpcpp next")
, ("<XF86AudioMute>", spawn "amixer set Master toggle")
, ("<XF86AudioLowerVolume>", spawn "amixer set Master 5%- unmute")
, ("<XF86AudioRaiseVolume>", spawn "amixer set Master 5%+ unmute")
, ("<XF86HomePage>", safeSpawn "iceweasel" ["/home/logan/.config/infoconf.html"])
, ("<XF86Search>", safeSpawn "iceweasel" ["https://www.duckduckgo.com/"])
, ("<XF86Mail>", runOrRaise "icedove" (resource =? "icedove"))
, ("<XF86Calculator>", runOrRaise "speedcrunch" (resource =? "speedcrunch"))
, ("<XF86Eject>", spawn "toggleeject")
, ("<Print>", spawn "scrotd 0")
] where nonNSP = WSIs (return (\ws -> W.tag ws /= "NSP"))
nonEmptyNonNSP = WSIs (return (\ws -> isJust (W.stack ws) && W.tag ws /= "NSP"))
myMouseKeys = [ ((mod4Mask .|. shiftMask, button3), \w -> focus w >> Sqr.mouseResizeWindow w True) ]
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---WORKSPACES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
myWorkspaces = [" i", "ii", "iii", "iv"]
myManageHook = placeHook (withGaps (20,12,12,12) (smart (0.5,0.5))) <+> insertPosition End Newer <+> floatNextHook <+> namedScratchpadManageHook myScratchpads <+>
(composeAll . concat $
[ [ resource =? r --> doF (W.view " i" . W.shift " i") | r <- myTermApps ]
, [ resource =? r --> doF (W.view "ii" . W.shift "ii") | r <- myWebApps ]
, [ resource =? r --> doF (W.view "iii" . W.shift "iii") | r <- myMediaApps ]
, [ resource =? r --> doF (W.view "iv" . W.shift "iv") | r <- mySystApps ]
, [ resource =? r --> doFloat | r <- myFloatApps ]
, [ className =? c --> ask >>= doF . W.sink | c <- myUnfloatApps ]
]) <+> manageHook defaultConfig
where
myTermApps = ["urxvt", "xterm", "xfce4-terminal", "xfontsel"]
myWebApps = ["Navigator", "newsbeuter", "mutt", "luakit", "midori", "Mail", "dwb"]
myMediaApps = ["easytag", "sonata", "comix", "inkscape", "vlc", "zathura", "gnome-mplayer", "Audacity", "hotot", "ncmpcpp", "weechat", "mplayer", "gimp", "gimp-2.8"]
mySystApps = ["ranger", "thunar", "Thunar", "lxappearance", "geany", "nitrogen", "Qt-subapplication", "gparted", "bleachbit"]
myFloatApps = ["Dialog", "htop", "file-roller", "nitrogen", "display", "feh", "xmessage", "trayer"]
myUnfloatApps = ["Gimp"]
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---LAYOUTS
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts float $ mkToggle (NBFULL ?? NOBORDERS ?? EOT) $ renamed [CutWordsLeft 4] $ maximize $ minimize $ boringWindows $ spacing 14 $
onWorkspace " i" myTermLayout $
onWorkspace "ii" myWebLayout $
onWorkspace "iii" myMediaLayout $
onWorkspace "iv" mySystLayout
myDefaultLayout
where
myTermLayout = workspaceDir "~" $ oneBig ||| space ||| lined ||| grid
myWebLayout = workspaceDir "~/téléchargements" $ monocle ||| oneBig ||| space ||| lined
myMediaLayout = workspaceDir "~/vidéos" $ T.toggleLayouts gimp $ monocle ||| oneBig ||| space ||| lined
mySystLayout = workspaceDir "~" $ lined ||| oneBig ||| space ||| monocle ||| grid
myDefaultLayout = workspaceDir "/" $ float ||| oneBig ||| space ||| lined ||| monocle ||| grid
oneBig = renamed [Replace "oneBig"] $ limitWindows 6 $ Mirror $ mkToggle (single MIRROR) $ mkToggle (single REFLECTX) $ mkToggle (single REFLECTY) $ OneBig (2/3) (2/3)
space = renamed [Replace "space"] $ limitWindows 4 $ spacing 36 $ Mirror $ mkToggle (single MIRROR) $ mkToggle (single REFLECTX) $ mkToggle (single REFLECTY) $ OneBig (2/3) (2/3)
lined = renamed [Replace "lined"] $ limitWindows 3 $ Mirror $ mkToggle (single MIRROR) zoomRow
monocle = renamed [Replace "monocle"] $ limitWindows 20 Full
grid = renamed [Replace "grid"] $ limitWindows 12 $ mkToggle (single MIRROR) $ Grid (16/10)
float = renamed [Replace "float"] $ limitWindows 20 simplestFloat
gimp = renamed [Replace "gimp"] $ limitWindows 5 $ withIM 0.11 (Role "gimp-toolbox") $ reflectHoriz $ withIM 0.15 (Role "gimp-dock") Full
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---STATUSBAR
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
myBitmapsDir = "/home/logan/.xmonad/statusbar/icons"
myXmonadBarL = "dzen2 -x '0' -y '0' -h '16' -w '680' -ta 'l' -fg '"++myColorWhite++"' -bg '"++myColorBG++"' -fn '"++myFont++"'"
myXmonadBarR = "conky -c /home/logan/.xmonad/statusbar/conky_dzen | dzen2 -x '680' -y '0' -w '1000' -h '16' -ta 'r' -bg '"++myColorBG++"' -fg '"++myColorWhite++"' -fn '"++myFont++"'"
myLogHook h = dynamicLogWithPP $ defaultPP
{ ppOutput = hPutStrLn h
, ppCurrent = dzenColor myColorRed myColorBG . pad
, ppHidden = dzenColor myColorBrown myColorBG . noScratchPad
, ppHiddenNoWindows = dzenColor myColorBG myColorBG . noScratchPad
, ppSep = dzenColor myColorRed myColorBG " "
, ppWsSep = dzenColor myColorRed myColorBG ""
, ppTitle = dzenColor myColorBrown myColorBG . shorten 50
, ppOrder = \(ws:l:t:_) -> [ws,l,t]
, ppLayout = dzenColor myColorRed myColorBG .
(\x -> case x of
"oneBig" -> " ^i("++myBitmapsDir++"/mini/nbstack.xbm)"
"space" -> " ^i("++myBitmapsDir++"/mini/nbstack.xbm)"
"lined" -> " ^i("++myBitmapsDir++"/mini/bstack2.xbm)"
"monocle" -> " ^i("++myBitmapsDir++"/mini/monocle.xbm)"
"grid" -> " ^i("++myBitmapsDir++"/mini/grid.xbm)"
"float" -> " ^i("++myBitmapsDir++"/mini/float.xbm)"
"gimp" -> " ^i("++myBitmapsDir++"/fox.xbm)"
"Full" -> " ^i("++myBitmapsDir++"/mini/monocle2.xbm)"
_ -> x
)
} where noScratchPad ws = if ws == "NSP" then "" else pad ws
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---AUTOSTART
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
myStartupHook = do
spawnOnce "xsetroot -cursor_name left_ptr &"
spawnOnce "sh ~/.fehbg &"
spawnOnce "mpd &"
spawnOnce "unclutter &"
spawnOnce "compton -c -b -e 0.8 -t -8 -l -9 -r 6 -o 0.7 -m 1.0 &"
spawnOnce "xautolock -time 15 -locker 'i3lock -ubi /home/logan/images/accueil.png' &"
spawnOnce "gnome-keyring-daemon --start --components=pkcs11 &"
spawnOnce "urxvtc_mod -name terminal -e tmux &"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---CONFIG
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
main = do
dzenLeftBar <- spawnPipe myXmonadBarL
dzenRightBar <- spawnPipe myXmonadBarR
xmonad $ azertyConfig
{ modMask = myModMask
, terminal = myTerminal
, manageHook = myManageHook
, layoutHook = myLayoutHook
, logHook = myLogHook dzenLeftBar >> updatePointer (Relative 0.5 0.5)
, startupHook = myStartupHook
, workspaces = myWorkspaces
, borderWidth = myBorderWidth
, normalBorderColor = myColorBG
, focusedBorderColor = myColorWhite
} `additionalKeysP` myKeys
`additionalMouseBindings` myMouseKeys
|
x
1 2 3 4 5 6 7 8 9 10 | background yes
out_to_console yes
out_to_x no
update_interval 1
TEXT
${if_mpd_playing}^fg(\#989584)^i(/home/logan/.xmonad/statusbar/icons/mini/note6.xbm)${if_empty ${exec mpc | grep -i pause | cut -c 2-6}} ^fg(\#cd546c)${mpd_title}${else} ^fg(\#545454)Pause${endif}${endif} \
^fg(\#989584)^i(/home/logan/.xmonad/statusbar/icons/mini/cpu4.xbm)${execi 60 /home/logan/.xmonad/scripts/bar_cpu.sh} \
^fg(\#989584)^i(/home/logan/.xmonad/statusbar/icons/mini/mem4.xbm)${execi 60 /home/logan/.xmonad/scripts/bar_ram.sh} \
^fg(\#989584)^i(/home/logan/.xmonad/statusbar/icons/mini/clock11.xbm) ^fg(\#cd546c)${time %H:%M}
|
x
1 2 3 4 5 6 7 | #!/bin/bash
LOADAVG=`cat /proc/loadavg | cut -c 1-4`
PERC=`echo $LOADAVG*100 | bc`
PERCBAR=`echo -e "$PERC" | dzen2-gdbar -bg '#454545' -fg '#cd546c' -h 1 -w 50 | sed "s/\ .*\%//g"`
echo "$PERCBAR"
|
x
Notes
New XMonad theme with faint colors and a good ol' feel!
As again, whole suit will progressively be available on dotshareit.
Statusbar and interface font is artwiz-nu, terminal font is termsyn.
Statusbar scripts are directly or are modded from Windelicato: https://github.com/windelicato .
Anomareh said about 11 years ago
Purty.
sotokoya said about 11 years ago
if i press M with Return, they not show terminal :(
edited about 11 years ago
Graawr said about 11 years ago
Hi.
sotokoya > Did you use xmonad before? The “M” key is, here, the special mod key; it is by default Alt in xmonad, but, with the lines:
modMask = myModMask
myModMask = mod4Mask
you specify it to be “mod4Mask”, which is the Super key (with the windows logo).
So, if you directly use my config, you have to press the Super Key plus the Return key to make a terminal appear.
(note that if you don’t have the urxvtc_mod script in your path, it won’t work, as it is this script that is called when you call a terminal in my xmonad config; you can replace every occurence with urxvt, for example, or get this script from the archwiki.)
sotokoya said about 11 years ago
now it’s work :D\
what is M1 key?
Graawr said about 11 years ago
M1 is generally the Alt key. But only with the
additionalKeysP
module (it’s the only I use, anyway); if you use the traditional module to add keys (additionalKeys
), the syntax is totally different, as you may know, but the mod keys also change: M1 is mod1Mask, C (control) is controlMask, and S (shift) becomes shiftMask.If you doubt, you can always type “xmodmap” in a shell to get a list of available modifiers and their correct mod name.
sotokoya said about 11 years ago
Thanks sir :)
one more :D
how to Access KP_Enter and other?
Graawr said about 11 years ago
There’s no “Enter” key, it’s “Return”.
You can have the name of the key with xev; it opens a white window where you can type any key to see which name it has in the terminal window.
By the way, if you only use
additionalKeysP
, you won’t need to use kP_*, because you can directly use the key as it is (enclosed with <> if it is a special key), like that:M-< Return > or M-< F1 > (without the spaces)
M-a or M-g
M-! or M-$
for example.
If you have the choice, I advise you the use
additionalKeysP
and notadditionalKeys
, ‘cause the syntax is way simpler and quicker.edited about 11 years ago