From bcf28f0a088411ec2fa956ad7a79b7287b5ca1eb Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 9 Feb 2022 19:48:36 -0800 Subject: home-manager: let's try to configure polybar There's a few things missing (my binaries for the wifi and battery, at a minimum), but that's fine for now. --- configs/polybar/aptos.conf | 37 ++++++++++++++++++++++++++++++++++ configs/polybar/carmel.conf | 36 +++++++++++++++++++++++++++++++++ configs/polybar/modules/battery.ini | 4 ++++ configs/polybar/modules/bluetooth.ini | 5 +++++ configs/polybar/modules/colors.ini | 7 +++++++ configs/polybar/modules/date.ini | 6 ++++++ configs/polybar/modules/i3.ini | 20 ++++++++++++++++++ configs/polybar/modules/mpd.ini | 6 ++++++ configs/polybar/modules/pulseaudio.ini | 8 ++++++++ configs/polybar/modules/wired.ini | 10 +++++++++ configs/polybar/modules/wireless.ini | 4 ++++ 11 files changed, 143 insertions(+) create mode 100644 configs/polybar/aptos.conf create mode 100644 configs/polybar/carmel.conf create mode 100644 configs/polybar/modules/battery.ini create mode 100644 configs/polybar/modules/bluetooth.ini create mode 100644 configs/polybar/modules/colors.ini create mode 100644 configs/polybar/modules/date.ini create mode 100644 configs/polybar/modules/i3.ini create mode 100644 configs/polybar/modules/mpd.ini create mode 100644 configs/polybar/modules/pulseaudio.ini create mode 100644 configs/polybar/modules/wired.ini create mode 100644 configs/polybar/modules/wireless.ini (limited to 'configs') diff --git a/configs/polybar/aptos.conf b/configs/polybar/aptos.conf new file mode 100644 index 0000000..04c35fe --- /dev/null +++ b/configs/polybar/aptos.conf @@ -0,0 +1,37 @@ +include-file = ~/.config/polybar/modules/battery.ini +include-file = ~/.config/polybar/modules/bluetooth.ini +include-file = ~/.config/polybar/modules/colors.ini +include-file = ~/.config/polybar/modules/date.ini +include-file = ~/.config/polybar/modules/i3.ini +include-file = ~/.config/polybar/modules/mpd.ini +include-file = ~/.config/polybar/modules/pulseaudio.ini +include-file = ~/.config/polybar/modules/wireless.ini + +[settings] +screenchange-reload = false + +[bar/common] +enable-ipc = true +width = 100% +monitor = ${env:MONITOR:} +monitor-strict = true +dpi = ${env:DPI:} +border-size = 0 +tray-position = none +fixed-center = true +module-margin = 1 +padding-right = 1 +line-size = 3 + +background = ${colors.background} +foreground = ${colors.foreground} + +font-0 = Source Code Pro:style=Regular:size=10;2 + +modules-left = i3 + +modules-center = mpd + +[bar/alone] +inherit = bar/common +modules-right = network bluetooth pulseaudio battery date diff --git a/configs/polybar/carmel.conf b/configs/polybar/carmel.conf new file mode 100644 index 0000000..d09f796 --- /dev/null +++ b/configs/polybar/carmel.conf @@ -0,0 +1,36 @@ +include-file = ~/.config/polybar/modules/colors.ini +include-file = ~/.config/polybar/modules/date.ini +include-file = ~/.config/polybar/modules/i3.ini +include-file = ~/.config/polybar/modules/mpd.ini +include-file = ~/.config/polybar/modules/pulseaudio.ini +include-file = ~/.config/polybar/modules/wired.ini + +[settings] +screenchange-reload = false + +[bar/common] +enable-ipc = true +width = 100% +monitor = ${env:MONITOR:} +monitor-strict = true +dpi = ${env:DPI:} +border-size = 0 +tray-position = none +fixed-center = true +module-margin = 1 +padding-right = 1 + +background = ${colors.background} +foreground = ${colors.foreground} + +font-0 = Source Code Pro:style=Regular:size=8;2 +font-1 = Font Awesome 5 Free:style=Solid:pixelsize=8;3 +font-2 = Material\-Design\-Iconic\-Font:size=8;2 + +modules-left = i3 + +modules-center = mpd + +[bar/alone] +inherit = bar/common +modules-right = wired-network pulseaudio date diff --git a/configs/polybar/modules/battery.ini b/configs/polybar/modules/battery.ini new file mode 100644 index 0000000..8c7e84a --- /dev/null +++ b/configs/polybar/modules/battery.ini @@ -0,0 +1,4 @@ +[module/battery] +type = custom/script +exec = /home/fcuny/workspace/go/bin/polybar-bat +interval = 10 diff --git a/configs/polybar/modules/bluetooth.ini b/configs/polybar/modules/bluetooth.ini new file mode 100644 index 0000000..9a82955 --- /dev/null +++ b/configs/polybar/modules/bluetooth.ini @@ -0,0 +1,5 @@ +[module/bluetooth] +type = custom/script +exec = ~/.config/rofi/scripts/bluetooth --status +interval = 1 +click-left = ~/.config/rofi/scripts/bluetooth & diff --git a/configs/polybar/modules/colors.ini b/configs/polybar/modules/colors.ini new file mode 100644 index 0000000..2b15171 --- /dev/null +++ b/configs/polybar/modules/colors.ini @@ -0,0 +1,7 @@ +[colors] +background = #000000 +foreground = #FFFFF8 +highlight = #4c7899 +warning = #ff3121 +focused = #4c7899 +disabled = #90a1ad diff --git a/configs/polybar/modules/date.ini b/configs/polybar/modules/date.ini new file mode 100644 index 0000000..c5b28da --- /dev/null +++ b/configs/polybar/modules/date.ini @@ -0,0 +1,6 @@ +[module/date] +type = internal/date +interval = 2 +time = %H:%M +date = %a %b %d +label = %date% %time% diff --git a/configs/polybar/modules/i3.ini b/configs/polybar/modules/i3.ini new file mode 100644 index 0000000..7e24a4a --- /dev/null +++ b/configs/polybar/modules/i3.ini @@ -0,0 +1,20 @@ +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false +pin-workspaces = true + +label-mode-background = ${colors.highlight} +label-mode-padding = 1 +label-focused = %name% +label-focused-background = ${colors.focused} +label-focused-padding = 1 +label-unfocused = %name% +label-unfocused-padding = 1 +label-visible = %name% +label-visible-background = ${colors.highlight} +label-visible-padding = 1 +label-urgent = %name% +label-urgent-background = #a00000 +label-urgent-padding = 1 diff --git a/configs/polybar/modules/mpd.ini b/configs/polybar/modules/mpd.ini new file mode 100644 index 0000000..05f066d --- /dev/null +++ b/configs/polybar/modules/mpd.ini @@ -0,0 +1,6 @@ +[module/mpd] +type = internal/mpd +socket = /var/run/user/1000/mpd/socket +interval = 2 +label-song = %artist% / %title% +format-online = diff --git a/configs/polybar/modules/pulseaudio.ini b/configs/polybar/modules/pulseaudio.ini new file mode 100644 index 0000000..41d02b6 --- /dev/null +++ b/configs/polybar/modules/pulseaudio.ini @@ -0,0 +1,8 @@ +[module/pulseaudio] +type = internal/pulseaudio +use-ui-max = false +format-volume = +label-volume = "vol/%percentage%%" +label-muted = "vol/%percentage%%" +label-muted-foreground = ${colors.disabled} +click-right = pavucontrol diff --git a/configs/polybar/modules/wired.ini b/configs/polybar/modules/wired.ini new file mode 100644 index 0000000..f9f1db0 --- /dev/null +++ b/configs/polybar/modules/wired.ini @@ -0,0 +1,10 @@ +[module/wired-network] +type = internal/network +interface = enp9s0 + +format-connected = +label-connected = "%local_ip%" +format-disconnected = +label-disconnected = "%ifname%" +format-disconnected-foreground = #121212 +format-disconnected-background = #ff6961 diff --git a/configs/polybar/modules/wireless.ini b/configs/polybar/modules/wireless.ini new file mode 100644 index 0000000..95b0f09 --- /dev/null +++ b/configs/polybar/modules/wireless.ini @@ -0,0 +1,4 @@ +[module/network] +type = custom/script +exec = /home/fcuny/workspace/go/bin/polybar-wifi +interval = 10 -- cgit 1.4.1