xmobar, stalonetray: some further changes

This commit is contained in:
2022-02-08 14:41:35 +05:30
parent 97530d7f6c
commit 7690f5e954
2 changed files with 36 additions and 33 deletions

View File

@@ -5,7 +5,7 @@ sep = "<fc=" ++ cyan ++ ">║</fc>"
bg = "#1d1f21" bg = "#1d1f21"
fg = "#c5c8c6" fg = "#c5c8c6"
grey = "#969896" grey = "#969896"
red = "#cc6666" red = "#cc6666"
green = "#b5bd68" green = "#b5bd68"
yellow = "#f0c674" yellow = "#f0c674"
blue = "#81a2be" blue = "#81a2be"
@@ -13,34 +13,37 @@ magenta = "#b294bb"
cyan = "#8abeb7" cyan = "#8abeb7"
white = "#ecebec" white = "#ecebec"
config :: Config config :: Config
config = defaultConfig { config =
font = "xft:Fira Mono:style=Regular:antialias=true:pixelsize=16,Font Awesome 5 Brands:pixelsize=16,Font Awesome 5 Free:pixelsize=16:style=Solid,Lohit Devanagari:style=Regular:pixelsize=16,Lohit Gurmukhi:style=Regular:pixelsize=16,Noto Sans CJK JP:style=Regular:pixelsize=16,Noto Sans CJK KR:style=Regular:pixelsize=16,Noto Sans CJK SC:style=Regular:pixelsize=16", defaultConfig
additionalFonts = [ "xft:Font Awesome 5 Free:pixelsize=15:style=Solid", { font = "xft:Fira Mono:style=Regular:antialias=true:pixelsize,Font Awesome 5 Brands:pixelsize=16,Font Awesome 5 Free:pixelsize=16:style=Solid,Lohit Devanagari:style=Regular:pixelsize=16,Lohit Gurmukhi:style=Regular:pixelsize=16,Noto Sans CJK JP:style=Regular:pixelsize=16,Noto Sans CJK KR:style=Regular:pixelsize=16,Noto Sans CJK SC:style=Regular:pixelsize=16",
"xft:Font Awesome 5 Brands:pixelsize=15"], additionalFonts =
bgColor = bg, [ "xft:Font Awesome 5 Free:pixelsize=15:style=Solid",
fgColor = fg, "xft:Font Awesome 5 Brands:pixelsize=15"
lowerOnStart = False, ],
overrideRedirect = False, position = Static { xpos = 0, ypos = 0, height = 23, width = 1920 },
allDesktops = True, bgColor = bg,
persistent = True, fgColor = fg,
commands = [ lowerOnStart = False,
Run $ MultiCpu ["-t","<fn=1>\xf2db</fn> <total>%","-L","20","-H","80","-h",magenta,"-l",green,"-n",yellow] 10, overrideRedirect = False,
Run $ Memory ["-t","<fn=1>\xf538</fn> <usedratio>%","-H","10240","-L","6144","-h",magenta,"-l",green,"-n",yellow] 20, allDesktops = True,
Run $ BatteryP ["BAT1","BAT0","BAT2"] ["-t", "<acstatus>", "-L", "10", "-H", "80", "-l", magenta, "-h", green, "-n", yellow, "--", "-O", "Charging", "-o", "<left>%", "-a", "notify-send -u critical 'Battery running out!'", "-A", "5", "--lows", "<fn=1>\xf243</fn> ", "--mediums", "<fn=1>\xf242</fn> ", "--highs", "<fn=1>\xf240</fn> "] 300, persistent = True,
Run $ Network "wlp0s20f3" ["-t","<fn=1>\xf1eb</fn> <fc=" ++ magenta ++"><rx>/<tx></fc>"] 10, commands =
Run $ Date "<fn=1>\xf073</fn> %-d/%-m/%-y/%w" "date" 100000, [ Run $ MultiCpu ["-t", "<fn=1>\xf2db</fn> <total>%", "-L", "20", "-H", "80", "-h", magenta, "-l", green, "-n", yellow] 10,
Run $ Date "%H:%M:%S" "time" 10, Run $ Memory ["-t", "<fn=1>\xf538</fn> <usedratio>%", "-H", "10240", "-L", "6144", "-h", magenta, "-l", green, "-n", yellow] 20,
Run $ MPD ["-t", "<statei><title><fn="++ magenta ++"> \xf001</fn>", "--", "-P", ">> ", "-Z", "|| ", "-S", "Stopped", "-h", "127.0.0.1", "-p", "6600"] 10, Run $ BatteryP ["BAT1", "BAT0", "BAT2"] ["-t", "<acstatus>", "-L", "10", "-H", "80", "-l", magenta, "-h", green, "-n", yellow, "--", "-O", "Charging", "-o", "<left>%", "-a", "notify-send -u critical 'Battery running out!'", "-A", "5", "--lows", "<fn=1>\xf243</fn> ", "--mediums", "<fn=1>\xf242</fn> ", "--highs", "<fn=1>\xf240</fn> "] 300,
Run $ Com "/home/natto/.xmonad/lib/padding-icon.sh" ["stalonetray"] "tray" 10, Run $ Network "wlp0s20f3" ["-t", "<fn=1>\xf1eb</fn> <fc=" ++ magenta ++ "><rx>/<tx></fc>"] 10,
Run $ Com "pamixer" ["--get-volume"] "" 100, Run $ Date "<fn=1>\xf073</fn> %-d/%-m/%-y/%w" "date" 100000,
Run UnsafeStdinReader Run $ Date "%H:%M:%S" "time" 10,
], Run $ MPD ["-t", "<statei><title><fn=" ++ magenta ++ "> \xf001</fn>", "--", "-P", ">> ", "-Z", "|| ", "-S", "Stopped", "-h", "127.0.0.1", "-p", "6600"] 10,
sepChar = "*", Run $ Com "/home/natto/.xmonad/lib/padding-icon.sh" ["stalonetray"] "tray" 10,
alignSep = "--", Run $ Com "pamixer" ["--get-volume"] "" 100,
template = "<action=`dmenu_run` button=1><icon=/home/natto/.xmonad/lib/nixos.xpm/></action> *UnsafeStdinReader* " ++ sep ++ " <fn=1></fn>*mpd* -- *multicpu* " ++ sep ++ " *memory* " ++ sep ++ " *wlp0s20f3* " ++ sep ++ " *battery* " ++ sep ++ " <fn=1>\xf028</fn> <fc=" ++ green ++ ">*pamixer*%</fc> " ++ sep ++ " *date* - *time* *tray*" Run UnsafeStdinReader
} ],
sepChar = "*",
alignSep = "--",
template = "<action=`dmenu_run` button=1><icon=/home/natto/.xmonad/lib/nixos.xpm/></action> *UnsafeStdinReader* " ++ sep ++ " <fn=1></fn>*mpd* -- *multicpu* " ++ sep ++ " *memory* " ++ sep ++ " *wlp0s20f3* " ++ sep ++ " *battery* " ++ sep ++ " <fn=1>\xf028</fn> <fc=" ++ green ++ ">*pamixer*%</fc> " ++ sep ++ " *date* - *time* *tray*"
}
main :: IO () main :: IO ()
main = xmobar config main = xmobar config

View File

@@ -89,17 +89,17 @@ in
stalonetray = { stalonetray = {
enable = true; enable = true;
config = { config = {
geometry = "5x1-0+0"; geometry = "1x1-0";
no_shrink = true; max_geometry = "5x0";
window_type = "dock"; window_type = "dock";
sticky = true; sticky = true;
scrollbars = "horizontal";
icon_size = 23; icon_size = 23;
background = "#1d2021"; background = "#1d2021";
grow_gravity = "E";
icon_gravity = "E"; icon_gravity = "E";
kludges = "force_icons_size";
}; };
extraConfig = ''
kludges force_icons_size
'';
}; };
}; };
} }