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
This commit is contained in:
Donovan Glover 2022-10-25 12:28:05 -04:00
parent 7b3ac9d5df
commit 45ae547379
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 0 additions and 209 deletions

View File

@ -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-state> <label-mode>
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 = <animation-charging> <label-charging>
format-discharging = <ramp-capacity> <label-discharging>
format-full =  <label-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 =  <label-song>
[module/wifi]
type = internal/network
interface-type = wireless
format-connected = <label-connected>
format-disconnected = <label-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

View File

@ -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 <<EOL
width = $POLYBAR_WIDTH
height = $POLYBAR_HEIGHT
offset-x = ${POLYBAR_OFFSET_XY:-0}
offset-y = ${POLYBAR_OFFSET_XY:-0}
border-size = ${POLYBAR_BORDER_SIZE:-0}
dpi = $POLYBAR_DPI
EOL
# Save the top_padding amount for use by other scripts
echo $BSPWM_TOP_PADDING > $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

View File

@ -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