From 0504f3e2a4e837823fe7e54ae9b32d431ff4df9d Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 12 Apr 2020 17:04:24 -0500 Subject: desktop: switch to polybar --- desktop/.config/i3/config | 9 +- desktop/.config/i3status/config | 45 ----- desktop/.config/polybar/config | 353 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 356 insertions(+), 51 deletions(-) delete mode 100644 desktop/.config/i3status/config create mode 100644 desktop/.config/polybar/config (limited to 'desktop/.config') diff --git a/desktop/.config/i3/config b/desktop/.config/i3/config index e9957d1..2eb564f 100644 --- a/desktop/.config/i3/config +++ b/desktop/.config/i3/config @@ -8,6 +8,9 @@ set $mod Mod4 # is used in the bar {} block below. font pango:monospace 12 +# status bar +exec --no-startup-id polybar example + # Use pactl to adjust volume in PulseAudio. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% @@ -142,9 +145,3 @@ client.focused #af56d8 #5e1082 #ffffff #af56d8 #5e1082 client.urgent #d856c0 #82106d #ffffff #d856c0 #82106d client.focused_inactive #5e1082 #35253d #926da3 #5e1082 #35253d client.unfocused #4c6470 #29253d #6d92a3 #105e82 #25353d - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - status_command i3status -c ~/.config/i3status/config -} diff --git a/desktop/.config/i3status/config b/desktop/.config/i3status/config deleted file mode 100644 index c5f93aa..0000000 --- a/desktop/.config/i3status/config +++ /dev/null @@ -1,45 +0,0 @@ -order += "wireless wlan0" -order += "battery 1" -order += "cpu_temperature 0" -order += "cpu_usage" -order += "load" -order += "tztime local" -order += "volume master" - -wireless wlan0 { - format_up = "%ip @ %essid (%quality)" - format_down = "W: down" -} - -battery 1 { - format = "%status %percentage %remaining" - format_down = "No battery" - hide_seconds = true - path = "/sys/class/power_supply/BAT%d/uevent" - low_threshold = 15 - integer_battery_capacity = true - status_chr = "CHR" - status_bat = "BAT" - status_full = "FULL" -} - -tztime local { - format = "%Y-%m-%d %H:%M" -} - -load { - format = "%1min" -} - -cpu_temperature 0 { - format = "%degrees °C" - max_threshold = 65 -} - -volume master { - format = "♪: %volume" - format_muted = "♪: %volume [M]" - device = "default" - mixer = "Master" - mixer_idx = 0 -} diff --git a/desktop/.config/polybar/config b/desktop/.config/polybar/config new file mode 100644 index 0000000..df76552 --- /dev/null +++ b/desktop/.config/polybar/config @@ -0,0 +1,353 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +;background = ${xrdb:color0:#222} +background = #222 +background-alt = #444 +;foreground = ${xrdb:color7:#222} +foreground = #dfdfdf +foreground-alt = #555 +primary = #ffb52a +secondary = #e60053 +alert = #bd2c40 +red = #bd2c40 +yellow = #ffb52a +green = #55aa55 +blue = #5555cc +icon = #888 + +[bar/example] +;monitor = ${env:MONITOR:HDMI-1} +width = 100% +height = 27 +;offset-x = 1% +;offset-y = 1% +;radius = 6.0 +fixed-center = false + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 0 +line-color = #f00 + +border-size = 1 +border-color = ${colors.background} +border-bottom-color = #9f78e1 +;${colors.foreground-alt} +;#00000000 + +padding-left = 1 +padding-right = 1 + +module-margin-left = 2 +module-margin-right = 2 + +font-0 = monospace:size=10;1 +font-1 = "Noto Sans Symbols:size=9;1" +font-2 = "Font Awesome 5 Free:weight=bold:size=11" + +modules-left = i3 mpd +modules-center = +modules-right = backlight-acpi pulseaudio memory cpu wlan battery date powermenu + +tray-position = right +tray-padding = 2 +;tray-background = #0063ff + +;wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +cursor-click = pointer +cursor-scroll = ns-resize + +[module/xwindow] +type = internal/xwindow +label = %title:0:30:...% + +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false + +format-underline-size = 2 + +; Only show workspaces on the same output as the bar +;pin-workspaces = true + +label-mode-padding = 1 +label-mode-foreground = #000 +label-mode-background = ${colors.primary} + +; focused = Active workspace on focused monitor +label-focused = %index% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 1 + +; unfocused = Inactive workspace on any monitor +label-unfocused = %index% +label-unfocused-padding = 1 + +; visible = Active workspace on unfocused monitor +label-visible = %index% +label-visible-background = ${self.label-focused-background} +label-visible-underline = ${self.label-focused-underline} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %index% +label-urgent-background = ${colors.alert} +label-urgent-padding = 1 + +; Separator in between workspaces +; label-separator = | + + +[module/mpd] +type = internal/mpd +host = /home/koorogi/.mpd/socket +format-online = + +icon-prev-foreground = ${colors.icon} +icon-prev =  +icon-stop-foreground = ${colors.icon} +icon-stop =  +icon-play-foreground = ${colors.icon} +icon-play =  +icon-pause-foreground = ${colors.icon} +icon-pause =  +icon-next-foreground = ${colors.icon} +icon-next =  + +label-time-font = 5 +label-time-foreground = ${colors.foreground-alt} + +label-song = "𝄞 %artist% - %title%" +label-song-maxlen = 75 +label-song-ellipsis = true + +bar-progress-width = 10 +bar-progress-indicator = | +bar-progress-indicator-foreground = #fff +bar-progress-indicator-font = 2 +bar-progress-fill = ─ +bar-progress-fill-font = 2 +bar-progress-fill-foreground = ${colors.red} +bar-progress-empty = ─ +bar-progress-empty-font = 2 +bar-progress-empty-foreground = ${colors.foreground-alt} + +[module/xbacklight] +type = internal/xbacklight + +format =