From 6d22458c6f6ce8ee187913aa2765ce19dd098bac Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Mon, 21 Nov 2022 23:35:07 +0100 Subject: Set up polybar and decommission i3status --- dunstrc | 3 ++- home-configuration.scm | 32 +++++++++++++++++++++------- i3.conf | 18 ---------------- i3status.conf | 57 -------------------------------------------------- 4 files changed, 27 insertions(+), 83 deletions(-) delete mode 100644 i3status.conf diff --git a/dunstrc b/dunstrc index 997718a6..c64d374f 100644 --- a/dunstrc +++ b/dunstrc @@ -27,7 +27,8 @@ height = 300 # Offset from the origin - offset = 16x16 + # Leave 24pt space for polybar. + offset = 16x40 # Don't remove messages, if the user is idle (no mouse or keyboard input) # for longer than idle_threshold seconds. diff --git a/home-configuration.scm b/home-configuration.scm index 9e9a3590..56763e1b 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -96,12 +96,12 @@ replacement spec (to which `regexp-substitute/global' is applied)." (define gui-packages '(;; i3 and Xorg. i3 itself must be installed system-wide for gdm to pick it up. ;; acpilight is a drop-in xbacklight replacement, as xbacklight doesn't work on my system. - "acpilight" "arandr" "blueman" "gnupg" "gimp" "hsetroot" "i3status" - "inkscape" "icecat" "kitty" "mpv" "nheko" "neomutt" - "password-store" "rofi" "rofi-calc" "signal-desktop" "simple-scan" - "xdg-utils" "xdot" "xclip" "xdotool" "xdpyinfo" "xev" "xfd" - "xfontsel" "xinput" "xkill" "xprop" "xrandr" "xrdb" "xsel" - "xset" "xwininfo" "zoom" "zathura" "zathura-ps" "zathura-pdf-poppler" + "acpilight" "arandr" "blueman" "dunst" "gnupg" "gimp" "hsetroot" + "inkscape" "icecat" "kitty" "mpv" "nheko" "neomutt" "password-store" + "polybar" "rofi" "rofi-calc" "signal-desktop" "simple-scan" + "xdg-utils" "xdot" "xclip" "xdotool" "xdpyinfo" "xev" "xfd" "xfontsel" + "xinput" "xkill" "xprop" "xrandr" "xrdb" "xsel" "xset" "xwininfo" + "zoom" "zathura" "zathura-ps" "zathura-pdf-poppler" ;; kitty uses startup-notifications, but doesn't pull it. ;; TODO: kitty still doesn't find libstartup-notification-1.so, ;; even though it's installed by this package. Maybe kitty needs @@ -119,6 +119,17 @@ replacement spec (to which `regexp-substitute/global' is applied)." "catppuccin-mocha-dark-cursors" "simutrans")) +(define (polybar-service monitor) + (shepherd-service + (documentation (string-append "Polybar desktop bar for monitor" monitor ".")) + (provision (list (string->symbol (string-append "polybar-" monitor)))) + (start #~(make-forkexec-constructor + (list #$(package-binary "polybar") "--reload") + #:environment-variables + (cons #$(string-append "POLYBAR_MONITOR=" monitor) + (default-environment-variables)))) + (stop #~(make-kill-destructor)))) + (define gui-services (list ;; Batsignal: battery level notifications. @@ -159,6 +170,10 @@ replacement spec (to which `regexp-substitute/global' is applied)." (start #~(make-forkexec-constructor (list #$(package-binary "blueman" "blueman-applet")))) (stop #~(make-kill-destructor))) + + (polybar-service "eDP-1") + (polybar-service "HDMI-1-1") + (shepherd-service (documentation "Dunst notification daemon; displays desktop notifications.") (provision '(dunst)) @@ -211,7 +226,6 @@ replacement spec (to which `regexp-substitute/global' is applied)." ("gtk-2.0/gtkrc" ,(local-file "gtk2.ini")) ("gtk-3.0/settings.ini" ,(local-file "gtk3.ini")) ("i3/config" ,(local-file "i3.conf")) - ("i3status/config" ,(local-file "i3status.conf")) ("kitty/diff.conf" ,(local-file #.(string-append "catppuccin/kitty/diff-" catppuccin-theme-variant ".conf") @@ -223,6 +237,10 @@ replacement spec (to which `regexp-substitute/global' is applied)." catppuccin-theme-variant ".conf") "kitty-theme.conf"))) ("picom/picom.conf" ,(local-file "picom.conf")) + ("polybar/config.ini" ,(local-file "polybar.ini")) + ("polybar/catppuccin.ini" + ,(local-file #.(string-append "catppuccin/polybar/themes/" + catppuccin-theme-variant ".ini"))) ("rofi/config.rasi" ,(local-file "rofi.rasi")) ("rofi/themes/catppuccin.rasi" ,(text-file/substitutions "catppuccin.rasi" diff --git a/i3.conf b/i3.conf index d176e769..886c05fa 100644 --- a/i3.conf +++ b/i3.conf @@ -247,21 +247,3 @@ mode "resize" { } bindsym $mod+r mode "resize" # }}} - -# Autostart Applications {{{ -#exec --no-startup-id /usr/bin/systemctl --no-block --user start display-manager-i3.service #xsession.target -exec --no-startup-id ~/.config/X11/xinitrc -# }}} - -bar { - status_command i3status - #mode hide # only show up when pressing $mod - modifier $mod - position bottom - tray_output primary - # Fitts's law - tray_padding 0 - workspace_min_width 20 px - strip_workspace_numbers yes - binding_mode_indicator yes -} diff --git a/i3status.conf b/i3status.conf deleted file mode 100644 index 571c5d0f..00000000 --- a/i3status.conf +++ /dev/null @@ -1,57 +0,0 @@ -# See i3status(1). - -general { - colors = true - # A short interval is fine as i3bar suspends the i3status process - # when the bar isn't being shown. - interval = 1 -} - -order += "wireless wlp3s0" -wireless wlp3s0 { - format_up = "W (%quality @ %essid, %bitrate / %frequency) %ip" - format_down = "W down" - format_quality = "%03d%s" -} -order += "ethernet enp2s0f1" -ethernet enp2s0f1 { - format_up = "E (%speed) %ip" - format_down = "E down" -} - -order += "battery 0" -battery 0 { - format = "%status %percentage %remaining %emptytime" - format_down = "no battery" - status_chr = "charging" - status_bat = "battery" - status_unk = "unknown" - status_full = "full" - path = "/sys/class/power_supply/BAT%d/uevent" - low_threshold = 25 -} - -order += "cpu_usage" - -order += "cpu_temperature 0" -cpu_temperature 0 { - format = "%degrees °C" -} - -order += "memory" -memory { - format = "%used" - memory_used_method = "classical" # total memory - free - buffers - cache -} - -order += "volume master" -volume master { - format = "♪ %volume" - format_muted = "♪ ∅" - device = "pulse" -} - -order += "tztime local" -tztime local { - format = "%a %-d %b, %H:%M" -} -- cgit v1.2.3