Enable More DWM Polybar Module Features

- Change polybar colors
- Remove kernel module
- Enable more dwm module features like layout, title, and floating
- Add deadd notification center module to toggle center
- Change CPU, RAM, and Disk modules to open relevant applications on
  left click instead of right click
This commit is contained in:
Sravan Balaji 2021-12-01 11:22:30 -05:00
parent 5210734ec6
commit c9b718761b
2 changed files with 115 additions and 50 deletions

View File

@ -5368,28 +5368,32 @@ alert = ${self.red}
; left ; left
powermenu = ${self.blue} powermenu = ${self.blue}
date = ${self.yellow} deadd-notification-center = ${self.green}
time = ${self.purple}
media-playing = ${self.green}
; center
dwm-focused-foreground = ${self.primary} dwm-focused-foreground = ${self.primary}
dwm-focused-background = ${self.background} dwm-focused-background = ${self.background}
dwm-unfocused-foreground = ${self.pink} dwm-unfocused-foreground = ${self.yellow}
dwm-unfocused-background = ${self.background} dwm-unfocused-background = ${self.background}
dwm-visible-foreground = ${self.secondary} dwm-visible-foreground = ${self.white}
dwm-visible-background = ${self.background} dwm-visible-background = ${self.background}
dwm-urgent-foreground = ${self.alert} dwm-urgent-foreground = ${self.alert}
dwm-urgent-background = ${self.background} dwm-urgent-background = ${self.background}
dwm-empty-foreground = ${self.foreground} dwm-empty-foreground = ${self.light-gray}
dwm-empty-background = ${self.background} dwm-empty-background = ${self.background}
dwm-layout-foreground = ${self.blue}
dwm-title-foreground = ${self.white}
dwm-floating-foreground = ${self.pink}
; center
date = ${self.yellow}
time = ${self.purple}
; right ; right
media-playing = ${self.green}
kernel = ${self.orange} kernel = ${self.orange}
cpu = ${self.blue} cpu = ${self.blue}
memory = ${self.red} memory = ${self.red}
filesystem = ${self.green} filesystem = ${self.purple}
dunst-notification-status = ${self.yellow} dunst-notification-status = ${self.green}
#+END_SRC #+END_SRC
**** Sizes **** Sizes
@ -5560,9 +5564,9 @@ font-3 = "IPAPGothic:size=11;3"
; modules-left = cpu ram ; modules-left = cpu ram
; modules-center = xwindow xbacklight ; modules-center = xwindow xbacklight
; modules-right = ipc clock ; modules-right = ipc clock
modules-left = powermenu date time media-playing modules-left = powermenu deadd-notification-center dwm
modules-center = dwm modules-center = date time
modules-right = kernel cpu memory filesystem modules-right = media-playing cpu memory filesystem
; The separator will be inserted between the output of each module ; The separator will be inserted between the output of each module
separator = "" separator = ""
@ -5671,7 +5675,9 @@ cursor-scroll = ns-resize
#+BEGIN_SRC conf :tangle polybar/config.ini #+BEGIN_SRC conf :tangle polybar/config.ini
[module/powermenu] [module/powermenu]
type = custom/text type = custom/text
content = " Menu" ; content = " Menu"
content = ""
; content = ""
; "content" has the same properties as "format-NAME" ; "content" has the same properties as "format-NAME"
; content-background = #000 ; content-background = #000
@ -5697,7 +5703,7 @@ click-right = "/home/sravan/.scripts/control-center.sh --rofi"
[module/dwm] [module/dwm]
type = internal/dwm type = internal/dwm
; format = <label-tags> <label-layout> <label-floating> <label-title> ; format = <label-tags> <label-layout> <label-floating> <label-title>
format = <label-tags> format = <label-tags> <label-layout> <label-title> <label-floating>
; Path to dwm socket (default: /tmp/dwm.sock) ; Path to dwm socket (default: /tmp/dwm.sock)
; socket-path = /tmp/dwm.sock ; socket-path = /tmp/dwm.sock
@ -5730,21 +5736,27 @@ secondary-layout-symbol = [M]
; Available tokens: ; Available tokens:
; %title% ; %title%
label-title = %title% label-title = %title%
label-title-padding = ${sizes.module-padding} label-title-foreground = ${colors.dwm-title-foreground}
label-title-foreground = ${colors.dwm-focused-background} ; label-title-background = ${colors.dwm-empty-background}
; label-title-underline = ${colors.dwm-empty-background}
label-title-maxlen = ${sizes.maxlen} label-title-maxlen = ${sizes.maxlen}
; label-title-padding = ${sizes.module-padding}
; Symbol of current layout ; Symbol of current layout
; Available tokens: ; Available tokens:
; %symbol% ; %symbol%
label-layout = %symbol% label-layout = %symbol%
label-layout-foreground = ${colors.green} label-layout-foreground = ${colors.dwm-layout-foreground}
label-layout-background = ${colors.background} ; label-layout-background = ${colors.dwm-empty-background}
label-layout-underline = ${colors.green} ; label-layout-underline = ${colors.dwm-empty-background}
label-layout-padding = ${sizes.module-padding} label-layout-padding = ${sizes.module-padding}
; Text to show when currently focused window is floating ; Text to show when currently focused window is floating
label-floating = "(F)" label-floating = "(F)"
label-floating-foreground = ${colors.dwm-floating-foreground}
; label-floating-background = ${colors.dwm-unfocused-background}
; label-floating-underline = ${colors.dwm-unfocused-background}
; label-floating-padding = ${sizes.module-padding}
; States: focused, unfocused, visible, urgent, empty ; States: focused, unfocused, visible, urgent, empty
; Available tokens: ; Available tokens:
@ -5768,7 +5780,7 @@ label-unfocused-padding = ${sizes.module-padding}
label-visible = %name% label-visible = %name%
label-visible-foreground = ${colors.dwm-visible-foreground} label-visible-foreground = ${colors.dwm-visible-foreground}
label-visible-background = ${colors.dwm-visible-background} label-visible-background = ${colors.dwm-visible-background}
label-visible-underline = ${colors.dwm-visible-foreground} ; label-visible-underline = ${colors.dwm-visible-foreground}
label-visible-padding = ${sizes.module-padding} label-visible-padding = ${sizes.module-padding}
; urgent = Unselected tag with window that has urgency hint set ; urgent = Unselected tag with window that has urgency hint set
@ -6018,7 +6030,7 @@ interval = ${intervals.cpu}
; <bar-load> ; <bar-load>
; <ramp-load> ; <ramp-load>
; <ramp-coreload> ; <ramp-coreload>
format = %{A3:kitty -e btop &:} <label> %{A} format = %{A1:kitty -e btop &:} <label> %{A}
format-underline = ${colors.cpu} format-underline = ${colors.cpu}
; Available tokens: ; Available tokens:
@ -6062,7 +6074,7 @@ interval = ${intervals.memory}
; <bar-swap-free> ; <bar-swap-free>
; <ramp-swap-used> ; <ramp-swap-used>
; <ramp-swap-free> ; <ramp-swap-free>
format = %{A3:kitty -e btop &:} <label> %{A} format = %{A1:kitty -e btop &:} <label> %{A}
format-underline = ${colors.memory} format-underline = ${colors.memory}
; Available tokens: ; Available tokens:
@ -6146,12 +6158,12 @@ spacing = ${bar/mybar.module-margin}
; <bar-free> ; <bar-free>
; <bar-used> ; <bar-used>
; <ramp-capacity> ; <ramp-capacity>
format-mounted = %{A3:filelight &:} <label-mounted> %{A} format-mounted = %{A1:filelight &:} <label-mounted> %{A}
format-mounted-underline = ${colors.filesystem} format-mounted-underline = ${colors.filesystem}
; Available tags: ; Available tags:
; <label-unmounted> (default) ; <label-unmounted> (default)
format-unmounted = %{A3:gnome-disks &:} <label-unmounted> %{A} format-unmounted = %{A1:gnome-disks &:} <label-unmounted> %{A}
format-unmounted-underline = ${colors.filesystem} format-unmounted-underline = ${colors.filesystem}
; Available tokens: ; Available tokens:
@ -6257,6 +6269,28 @@ fi
echo $status_icon echo $status_icon
#+END_SRC #+END_SRC
**** Deadd Notification Center
#+BEGIN_SRC conf :tangle polybar/config.ini
[module/deadd-notification-center]
type = custom/text
content = ""
; "content" has the same properties as "format-NAME"
; content-background = #000
content-foreground = ${colors.deadd-notification-center}
content-underline = ${colors.deadd-notification-center}
content-padding = ${sizes.module-padding}
; "click-(left|middle|right)" will be executed using "/bin/sh -c $COMMAND"
click-left = "/home/sravan/.scripts/deadd.sh --toggle-center"
; click-middle = notify-send middle
click-right = "/home/sravan/.scripts/deadd.sh --rofi"
; "scroll-(up|down)" will be executed using "/bin/sh -c $COMMAND"
; scroll-up = notify-send scroll up
; scroll-down = notify-send scroll down
#+END_SRC
*** Launch Script *** Launch Script
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/launch.sh #+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/launch.sh

View File

@ -21,28 +21,32 @@ alert = ${self.red}
; left ; left
powermenu = ${self.blue} powermenu = ${self.blue}
date = ${self.yellow} deadd-notification-center = ${self.green}
time = ${self.purple}
media-playing = ${self.green}
; center
dwm-focused-foreground = ${self.primary} dwm-focused-foreground = ${self.primary}
dwm-focused-background = ${self.background} dwm-focused-background = ${self.background}
dwm-unfocused-foreground = ${self.pink} dwm-unfocused-foreground = ${self.yellow}
dwm-unfocused-background = ${self.background} dwm-unfocused-background = ${self.background}
dwm-visible-foreground = ${self.secondary} dwm-visible-foreground = ${self.white}
dwm-visible-background = ${self.background} dwm-visible-background = ${self.background}
dwm-urgent-foreground = ${self.alert} dwm-urgent-foreground = ${self.alert}
dwm-urgent-background = ${self.background} dwm-urgent-background = ${self.background}
dwm-empty-foreground = ${self.foreground} dwm-empty-foreground = ${self.light-gray}
dwm-empty-background = ${self.background} dwm-empty-background = ${self.background}
dwm-layout-foreground = ${self.blue}
dwm-title-foreground = ${self.white}
dwm-floating-foreground = ${self.pink}
; center
date = ${self.yellow}
time = ${self.purple}
; right ; right
media-playing = ${self.green}
kernel = ${self.orange} kernel = ${self.orange}
cpu = ${self.blue} cpu = ${self.blue}
memory = ${self.red} memory = ${self.red}
filesystem = ${self.green} filesystem = ${self.purple}
dunst-notification-status = ${self.yellow} dunst-notification-status = ${self.green}
[sizes] [sizes]
bar-height = ${xrdb:polybar.bar-height:25} bar-height = ${xrdb:polybar.bar-height:25}
@ -190,9 +194,9 @@ font-3 = "IPAPGothic:size=11;3"
; modules-left = cpu ram ; modules-left = cpu ram
; modules-center = xwindow xbacklight ; modules-center = xwindow xbacklight
; modules-right = ipc clock ; modules-right = ipc clock
modules-left = powermenu date time media-playing modules-left = powermenu deadd-notification-center dwm
modules-center = dwm modules-center = date time
modules-right = kernel cpu memory filesystem modules-right = media-playing cpu memory filesystem
; The separator will be inserted between the output of each module ; The separator will be inserted between the output of each module
separator = "" separator = ""
@ -295,7 +299,9 @@ cursor-scroll = ns-resize
[module/powermenu] [module/powermenu]
type = custom/text type = custom/text
content = " Menu" ; content = " Menu"
content = ""
; content = ""
; "content" has the same properties as "format-NAME" ; "content" has the same properties as "format-NAME"
; content-background = #000 ; content-background = #000
@ -317,7 +323,7 @@ click-right = "/home/sravan/.scripts/control-center.sh --rofi"
[module/dwm] [module/dwm]
type = internal/dwm type = internal/dwm
; format = <label-tags> <label-layout> <label-floating> <label-title> ; format = <label-tags> <label-layout> <label-floating> <label-title>
format = <label-tags> format = <label-tags> <label-layout> <label-title> <label-floating>
; Path to dwm socket (default: /tmp/dwm.sock) ; Path to dwm socket (default: /tmp/dwm.sock)
; socket-path = /tmp/dwm.sock ; socket-path = /tmp/dwm.sock
@ -350,21 +356,27 @@ secondary-layout-symbol = [M]
; Available tokens: ; Available tokens:
; %title% ; %title%
label-title = %title% label-title = %title%
label-title-padding = ${sizes.module-padding} label-title-foreground = ${colors.dwm-title-foreground}
label-title-foreground = ${colors.dwm-focused-background} ; label-title-background = ${colors.dwm-empty-background}
; label-title-underline = ${colors.dwm-empty-background}
label-title-maxlen = ${sizes.maxlen} label-title-maxlen = ${sizes.maxlen}
; label-title-padding = ${sizes.module-padding}
; Symbol of current layout ; Symbol of current layout
; Available tokens: ; Available tokens:
; %symbol% ; %symbol%
label-layout = %symbol% label-layout = %symbol%
label-layout-foreground = ${colors.green} label-layout-foreground = ${colors.dwm-layout-foreground}
label-layout-background = ${colors.background} ; label-layout-background = ${colors.dwm-empty-background}
label-layout-underline = ${colors.green} ; label-layout-underline = ${colors.dwm-empty-background}
label-layout-padding = ${sizes.module-padding} label-layout-padding = ${sizes.module-padding}
; Text to show when currently focused window is floating ; Text to show when currently focused window is floating
label-floating = "(F)" label-floating = "(F)"
label-floating-foreground = ${colors.dwm-floating-foreground}
; label-floating-background = ${colors.dwm-unfocused-background}
; label-floating-underline = ${colors.dwm-unfocused-background}
; label-floating-padding = ${sizes.module-padding}
; States: focused, unfocused, visible, urgent, empty ; States: focused, unfocused, visible, urgent, empty
; Available tokens: ; Available tokens:
@ -388,7 +400,7 @@ label-unfocused-padding = ${sizes.module-padding}
label-visible = %name% label-visible = %name%
label-visible-foreground = ${colors.dwm-visible-foreground} label-visible-foreground = ${colors.dwm-visible-foreground}
label-visible-background = ${colors.dwm-visible-background} label-visible-background = ${colors.dwm-visible-background}
label-visible-underline = ${colors.dwm-visible-foreground} ; label-visible-underline = ${colors.dwm-visible-foreground}
label-visible-padding = ${sizes.module-padding} label-visible-padding = ${sizes.module-padding}
; urgent = Unselected tag with window that has urgency hint set ; urgent = Unselected tag with window that has urgency hint set
@ -594,7 +606,7 @@ interval = ${intervals.cpu}
; <bar-load> ; <bar-load>
; <ramp-load> ; <ramp-load>
; <ramp-coreload> ; <ramp-coreload>
format = %{A3:kitty -e btop &:} <label> %{A} format = %{A1:kitty -e btop &:} <label> %{A}
format-underline = ${colors.cpu} format-underline = ${colors.cpu}
; Available tokens: ; Available tokens:
@ -634,7 +646,7 @@ interval = ${intervals.memory}
; <bar-swap-free> ; <bar-swap-free>
; <ramp-swap-used> ; <ramp-swap-used>
; <ramp-swap-free> ; <ramp-swap-free>
format = %{A3:kitty -e btop &:} <label> %{A} format = %{A1:kitty -e btop &:} <label> %{A}
format-underline = ${colors.memory} format-underline = ${colors.memory}
; Available tokens: ; Available tokens:
@ -714,12 +726,12 @@ spacing = ${bar/mybar.module-margin}
; <bar-free> ; <bar-free>
; <bar-used> ; <bar-used>
; <ramp-capacity> ; <ramp-capacity>
format-mounted = %{A3:filelight &:} <label-mounted> %{A} format-mounted = %{A1:filelight &:} <label-mounted> %{A}
format-mounted-underline = ${colors.filesystem} format-mounted-underline = ${colors.filesystem}
; Available tags: ; Available tags:
; <label-unmounted> (default) ; <label-unmounted> (default)
format-unmounted = %{A3:gnome-disks &:} <label-unmounted> %{A} format-unmounted = %{A1:gnome-disks &:} <label-unmounted> %{A}
format-unmounted-underline = ${colors.filesystem} format-unmounted-underline = ${colors.filesystem}
; Available tokens: ; Available tokens:
@ -797,3 +809,22 @@ click-right = "/home/sravan/.scripts/dunst.sh --history"
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]" ; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
; scroll-up = ; scroll-up =
; scroll-down = ; scroll-down =
[module/deadd-notification-center]
type = custom/text
content = ""
; "content" has the same properties as "format-NAME"
; content-background = #000
content-foreground = ${colors.deadd-notification-center}
content-underline = ${colors.deadd-notification-center}
content-padding = ${sizes.module-padding}
; "click-(left|middle|right)" will be executed using "/bin/sh -c $COMMAND"
click-left = "/home/sravan/.scripts/deadd.sh --toggle-center"
; click-middle = notify-send middle
click-right = "/home/sravan/.scripts/deadd.sh --rofi"
; "scroll-(up|down)" will be executed using "/bin/sh -c $COMMAND"
; scroll-up = notify-send scroll up
; scroll-down = notify-send scroll down