aboutsummaryrefslogtreecommitdiff
path: root/modules/home/i3wm/original/polybar.nix
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-02-01 23:24:25 +0100
committerNatasha Moongrave <natasha@256phi.eu>2026-02-01 23:24:25 +0100
commit6b31a53666059962b5ccc607e7891b65f0da8138 (patch)
tree982c8f6768ebf6bd44c68430a6748f335b00dd14 /modules/home/i3wm/original/polybar.nix
parent49423b9a43e26d437124faff73470d30e8830be6 (diff)
moved stuff
Diffstat (limited to 'modules/home/i3wm/original/polybar.nix')
-rw-r--r--modules/home/i3wm/original/polybar.nix181
1 files changed, 181 insertions, 0 deletions
diff --git a/modules/home/i3wm/original/polybar.nix b/modules/home/i3wm/original/polybar.nix
new file mode 100644
index 0000000..95130cf
--- /dev/null
+++ b/modules/home/i3wm/original/polybar.nix
@@ -0,0 +1,181 @@
+{ config, pkgs, lib, ... }:
+
+
+{
+ services.polybar = {
+ enable = true;
+
+ extraConfig = let
+ colors = {
+ background = "#1c182d";
+ background-alt = "#2b1b3d";
+ foreground = "#d0b6fd";
+ primary = "#cfb5fd";
+ secondary = "#8a78b0";
+ alert = "#7b91fc";
+ disabled = "#707880";
+ };
+ in ''
+ [bar/example]
+ width = 98%
+ height = 30pt
+ radius = 15
+ offset-x = 1%
+ offset-y = 1%
+ override-redirect = true
+ fixed-center = true
+ enable-ipc = true
+
+ background = ${colors.background}
+ foreground = ${colors.foreground}
+
+ line-size = 4pt
+ border-size = Opt
+ border-color = #00000000
+
+ padding-left = 1
+ padding-right = 1
+ module-margin = 1
+
+ separator = |
+ separator-foreground = ${colors.disabled}
+
+ font-0 = fira code;2
+
+ modules-left = xworkspaces spotify spotify-prev spotify-play-pause spotify-next
+ modules-center = date
+ modules-right = filesystem memory cpu pulseaudio-devices wlan xkeyboard battery
+
+ [module/systray]
+ type = internal/tray
+ format-margin = 8pt
+ tray-spacing = 16pt
+
+ [module/xworkspaces]
+ type = internal/xworkspaces
+ label-active = %name%
+ label-active-background = ${colors.background-alt}
+ label-active-underline = ${colors.primary}
+ label-active-padding = 1
+ label-occupied = %name%
+ label-occupied-padding = 1
+ label-urgent = %name%
+ label-urgent-background = ${colors.alert}
+ label-urgent-padding = 1
+ label-empty = %name%
+ label-empty-foreground = ${colors.disabled}
+ label-empty-padding = 1
+
+ [module/xwindow]
+ type = internal/xwindow
+ label = %title:0:60:...%
+
+ [module/filesystem]
+ type = internal/fs
+ interval = 25
+ mount-0 = /
+ label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
+ label-unmounted = %mountpoint% not mounted
+ label-unmounted-foreground = ${colors.disabled}
+
+ [module/pulseaudio]
+ type = internal/pulseaudio
+ format-volume-prefix = "VOL "
+ format-volume-prefix-foreground = ${colors.primary}
+ format-volume = <label-volume>
+ label-volume = %percentage%%
+ label-muted = muted
+ label-muted-foreground = ${colors.disabled}
+
+ [module/xkeyboard]
+ type = internal/xkeyboard
+ blacklist-0 = num lock
+ label-layout = %layout%
+ label-layout-foreground = ${colors.primary}
+ label-indicator-padding = 2
+ label-indicator-margin = 1
+ label-indicator-foreground = ${colors.background}
+ label-indicator-background = ${colors.secondary}
+
+ [module/memory]
+ type = internal/memory
+ interval = 2
+ format-prefix = "RAM "
+ format-prefix-foreground = ${colors.primary}
+ label = %percentage_used:2%%
+
+ [module/cpu]
+ type = internal/cpu
+ interval = 2
+ format-prefix = "CPU "
+ format-prefix-foreground = ${colors.primary}
+ label = %percentage:2%%
+
+ [network-base]
+ type = internal/network
+ interval = 5
+ format-connected = <label-connected>
+ format-disconnected = <label-disconnected>
+ label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
+
+ [module/wlan]
+ inherit = network-base
+ interface-type = wireless
+ label-connected = %{F#F0C674}%ifname%%{F-} %essid%
+
+ [module/eth]
+ inherit = network-base
+ interface-type = wired
+ label-connected = %{F#F0C674}%ifname%%{F-}
+
+ [module/date]
+ type = internal/date
+ interval = 1
+ date = %H:%M
+ date-alt = %Y-%m-%d %H:%M:%S
+ label = %date%
+ label-foreground = ${colors.primary}
+
+ [settings]
+ screenchange-reload = true
+ pseudo-transparency = true
+
+ [module/battery]
+ type = internal/battery
+ full-at = 100
+ low-at = 15
+ battery = BAT0
+ adapter = ADP1
+ poll-interval = 5
+
+ [module/spotify]
+ type = custom/script
+ tail = true
+ interval = 1
+ format-prefix = "♫"
+ format = <label>
+ exec = get-spotify-status
+
+ [module/spotify-prev]
+ type = custom/script
+ exec = echo "◀◀"
+ format = <label>
+ click-left = playerctl previous -p spotify
+
+ [module/spotify-play-pause]
+ type = custom/ipc
+ hook-0 = echo "▶"
+ hook-1 = echo "▶"
+ initial = 1
+ click-left = playerctl play-pause -p spotify
+
+ [module/spotify-next]
+ type = custom/script
+ exec = echo "▶▶"
+ format = <label>
+ click-left = playerctl next -p spotify
+ '';
+
+ script = "polybar example --config=~/.config/polybar/config.ini &";
+ };
+} \ No newline at end of file