diff --git a/.config/polybar/config b/.config/polybar/config index d9f6465..9698edf 100755 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -359,7 +359,6 @@ tray-background = ${colors.background} scroll-up = bspwm-desknext scroll-down = bspwm-deskprev - ################################################################################ ################################################################################ ############ MAINBAR-XMONAD ############ @@ -372,13 +371,13 @@ monitor = ${env:MONITOR} monitor-strict = false override-redirect = false width = 100% -height = 20 +height = 30 ;offset-x = 1% ;offset-y = 1% radius = 0.0 fixed-center = true bottom = false -separator = +separator = | background = ${colors.background} foreground = ${colors.foreground} @@ -393,37 +392,101 @@ line-color = #f00 ;border-bottom-size = 25 border-color = #00000000 -padding-left = 1 +padding-left = 0 padding-right = 1 -module-margin-left = 0 -module-margin-right = 0 +module-margin-left = 3 +module-margin-right = 3 ; Enable support for inter-process messaging ; See the Messaging wiki page for more details. enable-ipc = true ;https://github.com/jaagr/polybar/wiki/Fonts -font-0 = "UbuntuMono Nerd Font:size=10;2" -font-1 = "UbuntuMono Nerd Font:size=16;3" -font-2 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1" -font-3 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1" -font-4 = "Font Awesome 5 Brands:pixelsize=8;1" +font-0 = "Noto Sans:size=10;0" +font-1 = "FontAwesome:size=13;0" +font-2 = "Noto Sans:size=10;0" +font-3 = "Noto Sans Mono:size=10;0" +font-4 = "FontAwesome5Brands:size=13;0" -modules-left = ewmh xwindow -modules-center = -modules-right = arrow1 networkspeedup networkspeeddown arrow2 memory2 arrow3 cpu2 arrow2 pavolume arrow3 arch-aur-updates arrow2 date +modules-left = ewmh title-xmonad +modules-center = kernel +modules-right = pavolume memory2 cpu2 date tray-detached = false tray-offset-x = 0 tray-offset-y = 0 -tray-position = right tray-padding = 2 tray-maxsize = 20 tray-scale = 1.0 +tray-position = right tray-background = ${colors.background} +################################################################################ +################################################################################ +############ MAINBAR-XMONAD-EXTRA ############ +################################################################################ +################################################################################ + +[bar/mainbar-xmonad-extra] +monitor = ${env:MONITOR} +;monitor-fallback = HDMI1 +monitor-strict = false +override-redirect = false +width = 100% +height = 30 +;offset-x = 1% +;offset-y = 1% +radius = 0.0 +fixed-center = true +bottom = true +separator = | + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 2 +line-color = #f00 + +;border-size = 2 +;border-left-size = 25 +;border-right-size = 25 +border-top-size = 10 +;border-bottom-size = 25 +border-color = #00000000 + +padding-left = 0 +padding-right = 1 + +module-margin-left = 3 +module-margin-right = 3 + +; Enable support for inter-process messaging +; See the Messaging wiki page for more details. +enable-ipc = true + +;https://github.com/jaagr/polybar/wiki/Fonts +font-0 = "Noto Sans:size=10;0" +font-1 = "FontAwesome:size=13;0" +font-2 = "Noto Sans:size=10;0" +font-3 = "Noto Sans Mono:size=10;0" +font-4 = "FontAwesome5Brands:size=13;0" + +modules-left = load-average +modules-center = networkspeeddown networkspeedup +modules-right = filesystem + +;tray-detached = false +;tray-offset-x = 0 +;tray-offset-y = 0 +;tray-padding = 2 +;tray-maxsize = 20 +;tray-scale = 1.0 +;tray-position = right +;tray-background = ${colors.background} + + ################################################################################ ################################################################################ ############ MODULE I3 ############ @@ -1298,6 +1361,14 @@ label =  %output:0:150:% ################################################################################ +[module/title-xmonad] +type = custom/script +exec = tail -F /tmp/.xmonad-title-log +exec-if = [ -p /tmp/.xmonad-title-log ] +tail = true + +################################################################################ + [module/uptime] ;https://github.com/jaagr/polybar/wiki/User-contributed-modules#uptime type = custom/script @@ -1433,6 +1504,14 @@ ramp-signal-foreground = #7e52c6 ################################################################################ +[module/workspaces-xmonad] +type = custom/script +exec = tail -F /tmp/.xmonad-workspace-log +exec-if = [ -p /tmp/.xmonad-workspace-log ] +tail = true + +################################################################################ + [module/xbacklight] ;https://github.com/jaagr/polybar/wiki/Module:-xbacklight type = internal/xbacklight diff --git a/.dwm/autostart.sh b/.dwm/autostart.sh index 24b72a6..b45b826 100755 --- a/.dwm/autostart.sh +++ b/.dwm/autostart.sh @@ -4,18 +4,18 @@ nitrogen --restore & urxvtd -q -o -f & dte(){ - dte="$(date +"%A, %B %d | 🕒 %l:%M%p")" - echo -e "📅 $dte" + dte="$(date +"%A, %B %d - %l:%M%p")" + echo -e "🕒 $dte" } -upd(){ - upd=`checkupdates | wc -l` - echo -e "⟳ $upd updates" +hdd() { + hdd="$(df -h | awk 'NR==4{print $3, $5}')" + echo -e "💿 $hdd" } mem(){ mem=`free | awk '/Mem/ {printf "%d MiB/%d MiB\n", $3 / 1024.0, $2 / 1024.0 }'` - echo -e "🖪 $mem" + echo -e "🖪 $mem" } cpu(){ @@ -25,10 +25,21 @@ cpu(){ read cpu a b c idle rest < /proc/stat total=$((a+b+c+idle)) cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) - echo -e "💻 $cpu% cpu" + echo -e "💻 $cpu% cpu" +} + +pulse () { + volume=$(pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,') + status=$(pacmd list-sinks | awk '/muted/ { print $2 }') + + if [ "$status" = "yes" ]; then + echo -e "🔈 muted" + else + echo -e "🔈 $volume%" + fi } while true; do - xsetroot -name "$(cpu) | $(mem) | $(dte)" - sleep 10s # Update time every ten seconds + xsetroot -name "$(cpu) | $(mem) | $(hdd) | $(pulse) | $(dte)" + sleep 1s # Update time every one second(s) done & diff --git a/dmenu/config.h b/dmenu/config.h index 5a82f28..d6554c5 100644 --- a/dmenu/config.h +++ b/dmenu/config.h @@ -8,7 +8,7 @@ static int min_width = 600; /* minimum width when centered */ static const char *fonts[] = { "Mononoki Nerd Font:size=10" }; -static const char *prompt = NULL; /* -p option; prompt to the left of input field */ +static const char *prompt = NULL; /* -p option; prompt to the left of input field */ static const char *colors[SchemeLast][2] = { /* fg bg */ [SchemeNorm] = { "#bbc5ff", "#282a36" }, @@ -29,4 +29,4 @@ static unsigned int lineheight = 22; /* -h option; minimum height of a m static const char worddelimiters[] = " "; /* Size of the window border */ -static unsigned int border_width = 1; +static unsigned int border_width = 0; /* -bw option; to add border width */ diff --git a/dmenu/dmenu b/dmenu/dmenu index f6f095e..cf90126 100755 Binary files a/dmenu/dmenu and b/dmenu/dmenu differ diff --git a/dmenu/dmenu.o b/dmenu/dmenu.o index 3bda4af..ab89603 100644 Binary files a/dmenu/dmenu.o and b/dmenu/dmenu.o differ diff --git a/dwm/config.h b/dwm/config.h index f99bab8..06ce7b2 100755 --- a/dwm/config.h +++ b/dwm/config.h @@ -16,9 +16,9 @@ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const int horizpadbar = 6; /* horizontal padding for statusbar */ static const int vertpadbar = 7; /* vertical padding for statusbar */ -static const char *fonts[] = { "Mononoki Nerd Font:size=10" }; -static const char dmenufont[] = "Mononoki Nerd Font:size=10"; -static const char col_gray1[] = "#292d3e"; +static const char *fonts[] = { "Mononoki Nerd Font:size=9" }; +static const char dmenufont[] = "Mononoki Nerd Font:size=9"; +static const char col_gray1[] = "#282a36"; static const char col_gray2[] = "#000000"; /* border color unfocused windows */ static const char col_gray3[] = "#96b5b4"; static const char col_gray4[] = "#c0c5ce";