You are not logged in.
Offline
how much time does it take to personalize/tweak Xmonad ?
Last edited by pyarch (2011-12-11 03:44:45)
Offline
Took me about three or four decades.
Just kidding, it doesn't take long.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
how much time does it take to personalize/tweak Xmonad ?
Really depends on what you want to do with it. I tend to tweak xmonad obsessively, but if you know what you want and can figure out how to do it from the billions of tutorials and code snippets available all over the intertubes (not to mention the #xmonad irc channel and this bbs), then you can set it and forget it.
Offline
Here's mine taken from quite a while ago:
mod edit: Welcome to the forums. Your thumbnail is still too big. Please read Forum Etiquette: Pasting Pictures and Code. Thanks. --fsckd
Last edited by fsckd (2011-12-25 16:23:39)
Offline
Offline
Paul-S, link to the wallpaper, gov? Much obliged.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Offline
Hy. I`m new to Xmonad.
I have this problem with xmobar and tag. There are no tags it`s only shown Updating....
My xmobarrc
Config { font = "-*-lime-*-*-*-*-*-*-*-*-*-*-*-*"
, bgColor = "#1C1C1C"
, fgColor = "#4d4d4d"
, position = Top
, lowerOnStart = True
, commands = [ Run Date "%A, %d %b %Y <fc=#CD5C5C>%H:%M:%S</fc>" "date" 10
, Run Com "skb" ["-1"] "kb" 10
, Run StdinReader
, Run Com "mpc | grep -" [] "mpd" 10
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{<fc=#CD5C5C>%mpd%</fc> %date% "
}
and my xmonad.hs
-------------------- imports --------------------
--necessary
import XMonad
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import System.Exit
import Graphics.X11.Xlib
import IO (Handle, hPutStrLn)
--utilities
import XMonad.Util.Run (spawnPipe)
import XMonad.Actions.NoBorders
--hooks
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.XPropManage
import XMonad.Hooks.FadeInactive
--MO' HOOKS
import Graphics.X11.Xlib.Extras
import Foreign.C.Types (CLong)
--layouts
import XMonad.Layout.NoBorders
import XMonad.Layout.ResizableTile
import XMonad.Layout.Named
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Spacing
import XMonad.Layout.Spiral
import XMonad.Layout.Tabbed
import Data.Ratio((%))
-------------------- main --------------------
main = do
h <- spawnPipe "xmobar ~/.xmobarrc"
xmonad $ defaultConfig
{ workspaces = ["term", "web", "irc", "code", "hosting", "else"]
, modMask = mod4Mask
, borderWidth = 1
, normalBorderColor = "3d352a"
, focusedBorderColor = "#554444"
, terminal = "urxvt"
, logHook = logHook' h >> (fadeLogHook)
, manageHook = manageHook'
, layoutHook = layoutHook'
, keys = keys'
}
-------------------- loghooks --------------------
logHook' :: Handle -> X ()
logHook' h = dynamicLogWithPP $ customPP { ppOutput = hPutStrLn h }
customPP :: PP
customPP = defaultPP { ppCurrent = xmobarColor "#cd5c5c" ""
, ppTitle = shorten 75
, ppSep = "<fc=#e8ae5b> | </fc>"
, ppHiddenNoWindows = xmobarColor "#a0a0a0" ""
}
fadeLogHook :: X ()
fadeLogHook = fadeInactiveLogHook fadeAmount
where fadeAmount = 0.9
-------------------- layouthooks --------------------
layoutHook' = customLayout
customLayout = onWorkspace "web" simpleTabbed $ avoidStrutsOn [u] (spiral (6/7) ||| spaced ||| smartBorders tiled ||| smartBorders (Mirror tiled) ||| noBorders Full)
where
spaced = named "Spacing" $ spacing 6 $ Tall 1 (3/100) (1/2)
tiled = named "Tiled" $ ResizableTall 1 (2/100) (1/2) []
-------------------- menuhook --------------------
getProp :: Atom -> Window -> X (Maybe [CLong])
getProp a w = withDisplay $ \dpy -> io $ getWindowProperty32 dpy a w
checkAtom name value = ask >>= \w -> liftX $ do
a <- getAtom name
val <- getAtom value
mbr <- getProp a w
case mbr of
Just [r] -> return $ elem (fromIntegral r) [val]
_ -> return False
checkDialog = checkAtom "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_DIALOG"
checkMenu = checkAtom "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_MENU"
manageMenus = checkMenu --> doFloat
manageDialogs = checkDialog --> doFloat
-------------------- managehook --------------------
manageHook' :: ManageHook
manageHook' = manageHook defaultConfig <+> manageDocks <+> manageMenus <+> manageDialogs <+> myManageHook
myManageHook :: ManageHook
myManageHook = composeAll . concat $
[ [className =? c --> doFloat | c <- myFloats]
, [title =? t --> doFloat | t <- myOtherFloats]
, [className =? r --> doIgnore | r <- myIgnores]
, [className =? im --> doF (W.shift "irc") | im <- imMessenger]
, [className =? bw --> doF (W.shift "web") | bw <- browsers]
, [className =? e --> doF (W.shift "else") | e <- elseApps]
]
where
myFloats = ["Gimp", "vlc", "Nitrogen", "Thunar", "Leafpad"]
myOtherFloats = ["Downloads", "Firefox Preferences", "Save As...", "Send file", "Open", "File Transfers"]
myIgnores = ["trayer", "stalonetray"]
imMessenger = ["Pidgin", "Emesene"]
browsers = ["Firefox", "Shiretoko", "Uzbl", "Chromium"]
elseApps = ["Mirage", "Gimp"]
-------------------- keybinds --------------------
keys' :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ())
keys' conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
--launching/killing
[ ((modMask, xK_Return ), spawn $ XMonad.terminal conf)
, ((modMask, xK_f ), spawn "uzbl --config=.configs") --or spawn "firefox"
, ((modMask, xK_m ), spawn "xterm -e ncmpcpp")
, ((modMask, xK_x ), kill)
, ((modMask, xK_r ), spawn "dmenu_run -fn \"-*-terminus-medium-r-normal-*-12-*-*-*-*-*-*-*\" -nb \"#131313\" -nf \"#888888\" -sb \"#2A2A2A\" -sf \"#3579A8\"")
--layouts
, ((modMask, xK_space ), sendMessage NextLayout)
, ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
, ((modMask, xK_b ), sendMessage ToggleStruts)
-- refresh
, ((modMask, xK_n ), refresh)
, ((modMask .|. shiftMask, xK_w ), withFocused toggleBorder)
-- 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)
-- swapping
, ((modMask .|. shiftMask, xK_j ), windows W.swapDown )
, ((modMask .|. shiftMask, xK_k ), windows W.swapUp )
-- increase or decrease number of windows in the master area
, ((modMask .|. controlMask, xK_h ), sendMessage (IncMasterN 1))
, ((modMask .|. controlMask, xK_l ), sendMessage (IncMasterN (-1)))
-- resizing
, ((modMask, xK_h ), sendMessage Shrink)
, ((modMask, xK_l ), sendMessage Expand)
, ((modMask .|. shiftMask, xK_h ), sendMessage MirrorShrink)
, ((modMask .|. shiftMask, xK_l ), sendMessage MirrorExpand)
-- quit, or restart
, ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
, ((modMask , xK_q ), restart "xmonad" True)
]
++
-- mod-[1..9] %! Switch to workspace N
-- mod-shift-[1..9] %! Move client to workspace N
[((m .|. modMask, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [0x26,0xe9,0x22,0x27,0x28,0xa7]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
Offline
@lutherus: I don't think this is it, but there's an # missing in your xmonad.hs, so pls correct this to:
, normalBorderColor = "#3d352a"
Edit:
Also, you haven't integated your "skb"/"kb"-Com into your template yet. And then your music stuff looks bit strange to me as you seem to mix up mpc/mpd; for getting an mpc to run, mpd must already have been started before. Perhaps have another look into the Xmobar-wiki.
Last edited by nexus7 (2011-12-27 22:10:46)
we are Arch.
you will be assimilated!
resistance is futile!
Offline
Thx, it`s solved now. Stupit i didn`t have installed xmonad-contrib :facepalm
EDIT
anyway, this is my full xmonad desktop
Last edited by lutherus (2011-12-27 22:19:19)
Offline
...in this case you would receive a compiling error like "not in scope: blah" because of missing modules. You alredy had installed this before, it's something different.
we are Arch.
you will be assimilated!
resistance is futile!
Offline
http://blog.liangzan.net/my-solarized-t … inux-setup
I've applied the solarized color scheme to xmobar, emacs and urxvt. Each of them blend well into each other.
Offline
Offline
Offline
@grobar87, can you give me conky config and weather script, please?
Offline
It's not conky... i use xmobar.
Config:
Config { font = "xft:Envy Code R:size=10:antialias=true"
, bgColor = "#000000"
, fgColor = "#1793D1"
, position = Top
, lowerOnStart = True
, commands = [ Run Cpu ["-L","3","-H","50"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
, Run Uptime ["-t","Up: <days>d <hours>h"] 10
, Run Weather "LWSK" ["-t","<station>: <tempC>C"] 3000
, Run Com ".xmonad/conkyscript" ["&"] "conky" 3000
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{%conky% <fc=#ffffff>:</fc> %LWSK% <fc=#ffffff>:</fc> %uptime% <fc=#ffffff>:</fc> %cpu% <fc=#ffffff>:</fc> %memory% <fc=#ffffff>:</fc> %date%"
}
And... here... we... go!
Offline
I thought it was conky... Thanks anyway
Offline
Offline
@Sinani201 I like your xmobar config. xmobarrc?
Thanks.
And... here... we... go!
Offline
@Sinani201 I like your xmobar config. xmobarrc?
Thanks.
xmobarrc:
Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, bgColor = "black"
, fgColor = "grey"
, position = Top
, lowerOnStart = True
, commands = [ Run Weather "KLAX" ["-t","<tempF>F","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 360
, Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Network "wlan0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Swap [] 10
, Run Com "uname" ["-s","-r"] "" 36000
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
, Run Com "~/misc/notify-volume2.sh" [] "vol" 1
, Run Com "~/.statusline.sh" [""] "statnot" 1
, Run Com "~/misc/battery.sh" [] "bat" 10
, Run Com "~/misc/song.sh" [] "song" 1
, Run Com "cat ~/misc/reminder" [] "remind" 10
]
, sepChar = "%"
, alignSep = "}{"
, template = "%cpu% | %memory% * %swap% | %eth0% | %wlan0% | %song% | %remind% }{ Vol: %vol% | %bat% | <fc=#ee9a00>%date%</fc>| %KLAX% | %uname%"
}
And all of the scripts:
notify-volume2.sh (note that this might not working depending on the sound system you use)
#!/bin/bash
#
#####################################################################
# Get current volume.
mixer=$(amixer get Master | grep 'Mono:')
#echo $mixer | cut -d ' ' -f 4
#echo $mixer | cut -d ' ' -f 6
muted=$(amixer get Master | grep 'Mono:' | cut -d ' ' -f 8)
if [ "$muted" == "[off]" ]; then
echo "[--]"
else
echo $mixer | cut -d ' ' -f 4
fi
battery.sh:
#!/bin/bash
battery=$(acpi -b)
percent=$(echo $battery | cut -d ' ' -f 4)
charging=$(echo $battery | cut -d ' ' -f 6)
remainingtime=$(echo $battery | cut -d ' ' -f 5)
if [ "$charging" == "remaining" ]; then
echo "$remainingtime left, [$percent]"
else
echo "Bat: [$percent]"
fi
song.sh:
#!/bin/bash
song=$(mpc current)
line2=$(mpc | head -2 | tail -1 | awk '{ gsub(/[[:space:]]+/," "); print }')
progress=$(echo $line2 | cut -d ' ' -f 3)
songstatus=$(echo $line2 | cut -d ' ' -f 1)
if [ "$songstatus" == "[playing]" ]; then
songstatus=">"
else
songstatus="‖"
fi
echo "$songstatus $progress | $song"
Offline
Offline
grobar87 wrote:@Sinani201 I like your xmobar config. xmobarrc?
Thanks.xmobarrc:
Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" , bgColor = "black" , fgColor = "grey" , position = Top , lowerOnStart = True , commands = [ Run Weather "KLAX" ["-t","<tempF>F","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 360 , Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10 , Run Network "wlan0" ["-L","0","-H","32","--normal","green","--high","red"] 10 , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 , Run Memory ["-t","Mem: <usedratio>%"] 10 , Run Swap [] 10 , Run Com "uname" ["-s","-r"] "" 36000 , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 , Run Com "~/misc/notify-volume2.sh" [] "vol" 1 , Run Com "~/.statusline.sh" [""] "statnot" 1 , Run Com "~/misc/battery.sh" [] "bat" 10 , Run Com "~/misc/song.sh" [] "song" 1 , Run Com "cat ~/misc/reminder" [] "remind" 10 ] , sepChar = "%" , alignSep = "}{" , template = "%cpu% | %memory% * %swap% | %eth0% | %wlan0% | %song% | %remind% }{ Vol: %vol% | %bat% | <fc=#ee9a00>%date%</fc>| %KLAX% | %uname%" }
And all of the scripts:
notify-volume2.sh (note that this might not working depending on the sound system you use)#!/bin/bash # ##################################################################### # Get current volume. mixer=$(amixer get Master | grep 'Mono:') #echo $mixer | cut -d ' ' -f 4 #echo $mixer | cut -d ' ' -f 6 muted=$(amixer get Master | grep 'Mono:' | cut -d ' ' -f 8) if [ "$muted" == "[off]" ]; then echo "[--]" else echo $mixer | cut -d ' ' -f 4 fi
battery.sh:
#!/bin/bash battery=$(acpi -b) percent=$(echo $battery | cut -d ' ' -f 4) charging=$(echo $battery | cut -d ' ' -f 6) remainingtime=$(echo $battery | cut -d ' ' -f 5) if [ "$charging" == "remaining" ]; then echo "$remainingtime left, [$percent]" else echo "Bat: [$percent]" fi
song.sh:
#!/bin/bash song=$(mpc current) line2=$(mpc | head -2 | tail -1 | awk '{ gsub(/[[:space:]]+/," "); print }') progress=$(echo $line2 | cut -d ' ' -f 3) songstatus=$(echo $line2 | cut -d ' ' -f 1) if [ "$songstatus" == "[playing]" ]; then songstatus=">" else songstatus="‖" fi echo "$songstatus $progress | $song"
Thanks.
And... here... we... go!
Offline