From 470afa3ec847aabb6a0fc248a7294017f501e3af Mon Sep 17 00:00:00 2001 From: inkch Date: Mon, 15 Jan 2024 00:09:25 +0900 Subject: [PATCH] polybar: Add config and scripts. Ignored from other than working machine --- .chezmoiignore | 1 + dot_config/polybar/config.ini.tmpl | 276 ++++++++++++++++++ dot_config/polybar/executable_toggle.sh | 7 + .../executable_caffeine-check-status.py | 11 + .../scripts/executable_caffeine-toggle.py | 11 + .../polybar/scripts/executable_camera.py | 51 ++++ .../scripts/executable_clicker-stat.sh | 6 + .../polybar/scripts/executable_ipv6-stat.py | 32 ++ dot_config/polybar/scripts/executable_mic.py | 51 ++++ .../polybar/scripts/executable_pueue-count.py | 34 +++ .../polybar/scripts/executable_vm-stat.py | 62 ++++ .../polybar/scripts/executable_vpn-stat.py | 35 +++ 12 files changed, 577 insertions(+) create mode 100644 dot_config/polybar/config.ini.tmpl create mode 100644 dot_config/polybar/executable_toggle.sh create mode 100644 dot_config/polybar/scripts/executable_caffeine-check-status.py create mode 100644 dot_config/polybar/scripts/executable_caffeine-toggle.py create mode 100644 dot_config/polybar/scripts/executable_camera.py create mode 100644 dot_config/polybar/scripts/executable_clicker-stat.sh create mode 100644 dot_config/polybar/scripts/executable_ipv6-stat.py create mode 100644 dot_config/polybar/scripts/executable_mic.py create mode 100644 dot_config/polybar/scripts/executable_pueue-count.py create mode 100644 dot_config/polybar/scripts/executable_vm-stat.py create mode 100644 dot_config/polybar/scripts/executable_vpn-stat.py diff --git a/.chezmoiignore b/.chezmoiignore index 2d25667..b96b4a6 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -11,6 +11,7 @@ README.md .config/alacritty/alacritty.toml .config/dunst .config/fontconfig +.config/polybar {{- end }} {{- if eq .chezmoi.username "root" }} diff --git a/dot_config/polybar/config.ini.tmpl b/dot_config/polybar/config.ini.tmpl new file mode 100644 index 0000000..fc4c2d1 --- /dev/null +++ b/dot_config/polybar/config.ini.tmpl @@ -0,0 +1,276 @@ +;===================================================== +; +; To learn more about how to configure Polybar +; go to https://github.com/jaagr/polybar +; +; The README contains alot of information +; +;===================================================== + +[colors] +background = #121212 +background-alt = #1c1c1c +foreground = #cccccc +foreground-alt = #77 +foreground-gray = #77 +primary = #FFD75F +secondary = #d64937 +alert = #d64937 + +[global/wm] +margin-bottom = 0 + +[bar/benq] +enable-ipc = true +bottom = false +monitor = ${env:MONITOR:HDMI-0} +width = 100% +height = 16 +offset-x = 0 +offset-y = 0 + +background = ${colors.background} +foreground = ${colors.foreground} + +overline-size = 0 +overline-color = #f00 +underline-size = 0 +underline-color = #1c1c1c + +border-bottom-size = 1 +border-bottom-color = #121212 + +spacing = 1 +padding-left = 0 +padding-right = 2 +module-margin-left = 1 +module-margin-right = 1 + +; font-N = ; +font-0 = "Source Han Code JP R:style=Bold:pixelsize=8;2" +font-1 = "NotoEmoji:scale=11" +font-2 = "siji:pixelsize=10;2" +font-3 = "Font Awesome 6 Free:style=Solid:pixelsize=8;2" +font-4 = "Font Awesome 6 Brands:pixelsize=8;2" +font-5 = "Symbols Nerd Font:pixelsize=12;2" + +modules-left = i3 xwindow +modules-center = date + +[bar/top] +enable-ipc = true +bottom = false +monitor = ${env:MONITOR:DP-2} +width = 100% +height = 16 +offset-x = 0 +offset-y = 0 + + +background = ${colors.background} +foreground = ${colors.foreground} + +overline-size = 0 +overline-color = #f00 +underline-size = 0 +underline-color = #1c1c1c + +border-bottom-size = 1 +border-bottom-color = #121212 + +spacing = 1 +padding-left = 0 +padding-right = 2 +module-margin-left = 1 +module-margin-right = 1 + +; font-N = ; +font-0 = "Source Han Code JP R:style=Bold:pixelsize=8;2" +font-1 = "NotoEmoji:scale=11" +font-2 = "siji:pixelsize=10;2" +font-3 = "Font Awesome 6 Free:style=Solid:pixelsize=8;2" +font-4 = "Font Awesome 6 Brands:pixelsize=8;2" +font-5 = "Symbols Nerd Font:pixelsize=12;2" + +modules-left = i3 clicker xwindow +modules-center = date +modules-right = pueue filesystem temp cpu memory eth-down eth-up ipv6 caffeine cam tray + +; tray-position = right +; tray-padding = 4 +; tray-maxsize = 12 +; wm-restack = i3 +; override-redirect = true + +[module/tray] +type = internal/tray +; tray-spacing = 2 +tray-padding = 4 +tray-size = 75% + +[module/pueue] +type = custom/script +interval = 5 +exec = /home/inkch/.config/polybar/scripts/pueue-count.py + +[module/mic] +type = custom/script +interval = 5 +exec = /home/inkch/.config/polybar/scripts/mic.py + +[module/cam] +type = custom/script +interval = 5 +exec = /home/inkch/.config/polybar/scripts/camera.py + +[module/vms] +type = custom/script +interval = 5 +exec = /home/inkch/.config/polybar/scripts/vm-stat.py + +[module/clicker] +type = custom/script +format =