From 45ae547379350795fc4d1a20db2cdb9c1898c6f6 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Tue, 25 Oct 2022 12:28:05 -0400 Subject: [PATCH] meta: Remove polybar It turns out polybar was bloat and I don't actually need one, at least that's my current thought process. In particular the advantage of fullscreen windows without having to worry about whether polybar is visible or not should outweigh when I temporarily show the bar with a keybind. Note that while I was exploring taking advantage of bspwm's monocle layout more, I went through a point where borders would only be visible when multiple windows were present, which required me to use the single monocle config variable and implement the solution proposed in the GitHub issue below: https://github.com/polybar/polybar/issues/1880#issuecomment-674518936 --- polybar/.config/polybar/config | 134 ------------------------------ polybar/.config/polybar/launch.sh | 58 ------------- polybar/README.md | 17 ---- 3 files changed, 209 deletions(-) delete mode 100644 polybar/.config/polybar/config delete mode 100755 polybar/.config/polybar/launch.sh delete mode 100644 polybar/README.md diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config deleted file mode 100644 index 056503fd..00000000 --- a/polybar/.config/polybar/config +++ /dev/null @@ -1,134 +0,0 @@ -# New Start: A modern Arch workflow built with an emphasis on functionality. -# Copyright (C) 2017-2022 Donovan Glover - -[color] -background = ${xrdb:background} -red = ${xrdb:color1} -green = ${xrdb:color2} -yellow = ${xrdb:color3} -blue = ${xrdb:color4} -magenta = ${xrdb:color5} -cyan = ${xrdb:color6} -text = ${xrdb:color7} -background-alt = ${xrdb:color8} - -[bar/main] -modules-left = bspwm -modules-center = window -modules-right = volume wifi date time battery - -monitor = ${env:MONITOR:} -wm-restack = bspwm -include-file = $HOME/.cache/polybar/config - -foreground = ${color.background-alt} -background = ${color.background} -border-color = ${color.text} - -font-0 = "Hack:size=9" -font-1 = "Noto Sans CJK JP:size=9" -font-2 = "Font Awesome 6 Free:style=Solid:size=9" -font-3 = "Font Awesome 6 Free:style=Regular:size=9" -font-4 = "Font Awesome 6 Brands:style=Regular:size=9" - -padding-left = 1 -padding-right = 2 -module-margin = 1 - -[module/bspwm] -type = internal/bspwm -pin-workspaces = true -format = - -label-monocle =  monocle mode -label-locked =  Locked -label-private =  Private -label-sticky =  Sticky - -label-monocle-padding = 1 -label-locked-padding = 1 -label-private-padding = 1 -label-sticky-padding = 1 - -label-monocle-foreground = ${color.yellow} - -label-focused-padding = 1 -label-urgent-padding = 1 -label-occupied-padding = 1 -label-empty-padding = 1 - -label-focused-foreground = ${color.text} -label-urgent-foreground = ${color.yellow} - -# Replicate workspace functionality of sway -label-empty = - -[module/cpu] -type = internal/cpu -label =  %percentage%% - -[module/ram] -type = internal/memory -label =  %gb_used% - -[module/date] -type = internal/date -date =  %d.%m.%y -#date =  %B %d, %Y -#date =  %A - -[module/time] -type = internal/date -date =  %H:%M - -[module/battery] -type = internal/battery -battery = BAT0 -adapter = AC -full-at = 98 -time-format = %H:%M -format-charging = -format-discharging = -format-full =  -label-charging = %percentage%% -label-discharging = %percentage%% -label-full = %percentage%% -ramp-capacity-0 =  -ramp-capacity-1 =  -ramp-capacity-2 =  -ramp-capacity-3 =  -ramp-capacity-4 =  -animation-charging-0 =  -animation-charging-1 =  -animation-charging-2 =  -animation-charging-3 =  -animation-charging-4 =  -animation-charging-framerate = 1000 - -[module/mpd] -type = internal/mpd -format-offline = No song is currently playing. -label-song-maxlen = 100 -label-song-ellipsis = true -format-online =  - -[module/wifi] -type = internal/network -interface-type = wireless -format-connected = -format-disconnected = - -label-connected =  %upspeed%  %downspeed% -label-disconnected = not connected - -[module/volume] -type = internal/pulseaudio -label-volume =  %percentage%% -label-muted =  Off - -[module/window] -type = internal/xwindow -label-maxlen = 110 -label-empty = /usr/bin/bspwm - -; vim:ft=dosini diff --git a/polybar/.config/polybar/launch.sh b/polybar/.config/polybar/launch.sh deleted file mode 100755 index 94ec2af3..00000000 --- a/polybar/.config/polybar/launch.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# New Start: A modern Arch workflow built with an emphasis on functionality. -# Copyright (C) 2017-2018 Donovan Glover - -POLYBAR_DPI=$(xrdb -query | grep Xft.dpi | cut -f 2) -POLYBAR_SCALE=$(($POLYBAR_DPI / 96)) - -# Terminate any previous instances of polybar -killall -q polybar - -bspc_config() { - bspc config top_padding $1 & - bspc config border_width $2 & - bspc config window_gap $3 & -} - -# Set defaults -POLYBAR_HEIGHT=$((30 * $POLYBAR_SCALE)) -HOST_WIDTH=$(bspc query -T -m | jq '.rectangle.width') - -# Make the bar float -if [ "$1" == "float" ]; then - POLYBAR_BORDER_SIZE=$((1 * $POLYBAR_SCALE)) # Later set to bspwm's border_width - POLYBAR_OFFSET_XY=$((30 * $POLYBAR_SCALE)) # Later set to bspwm's window_gap - POLYBAR_WIDTH=$(($HOST_WIDTH - $POLYBAR_OFFSET_XY * 2)) -else - POLYBAR_WIDTH=$HOST_WIDTH -fi - -# Set the bspwm variables -BSPWM_TOP_PADDING=$(($POLYBAR_HEIGHT + ${POLYBAR_OFFSET_XY:-0} + ${POLYBAR_BORDER_SIZE:-0} * 2)) -BSPWM_BORDER_WIDTH=${POLYBAR_BORDER_SIZE:-0} -BSPWM_WINDOW_GAP=${POLYBAR_OFFSET_XY:-0} - -bspc_config $BSPWM_TOP_PADDING $BSPWM_BORDER_WIDTH $BSPWM_WINDOW_GAP - -# Make the polybar config -mkdir -p $HOME/.cache/polybar - -cat >$HOME/.cache/polybar/config < $HOME/.cache/polybar/bspwm_top_padding - -# Wait until there are no more polybar instances running -while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done - -# Start polybar programmatically on all monitors by default -for m in $(polybar --list-monitors | cut -d":" -f1); do - MONITOR=$m polybar main & -done diff --git a/polybar/README.md b/polybar/README.md deleted file mode 100644 index 0e1a13d5..00000000 --- a/polybar/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# polybar - -[polybar][polybar] is an information panel for your desktop. - -## Use Cases - -polybar can be used to: - -- Show the current desktop, empty desktops, and occupied desktops -- Show the date, time, volume, CPU statistics, and other information -- Show the current playing song or anything else you want - -You should not use polybar if: - -- You already use a desktop environment that has an information panel - -[polybar]: https://github.com/jaagr/polybar