diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index 67261a4..6956f5d 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -16,14 +16,15 @@ systemctl --user start spotifyd & picom & nm-applet & volumeicon & -polybar main & +# polybar main & +$HOME/.config/polybar/launch.sh # Ensure we have the correct cursor xsetroot -cursor_name left_ptr pgrep -x sxhkd > /dev/null || sxhkd & -bspc monitor -d CHAT DEV WEB MISC +bspc monitor -d chat dev web misc music bspc config border_width 1 bspc config window_gap 8 diff --git a/polybar/.config/polybar/config.ini b/polybar/.config/polybar/config.ini index 242daf8..1e12333 100644 --- a/polybar/.config/polybar/config.ini +++ b/polybar/.config/polybar/config.ini @@ -20,15 +20,16 @@ background = #282A2E background-alt = #373B41 foreground = #C5C8C6 -primary = #006699 +primary = #008888 secondary = #8ABEB7 alert = #A54242 disabled = #707880 [bar/main] +monitor = ${env:MONITOR:} width = 100% -height = 24pt -radius = 6 +height = 18pt +radius = 0 ; dpi = 96 @@ -48,9 +49,15 @@ module-margin = 1 separator = | separator-foreground = ${colors.disabled} -font-0 = monospace;2 +font-0 = "JetBrainsMono Nerd Font:style=Normal:size=12;3" +font-1 = "JetBrainsMono Nerd Font:style=Medium:size=9;3" +font-2 = "JetBrainsMono Nerd Font:style=Bold:size=9;3" +font-3 = "JetBrainsMono Nerd Font:style=Italic:size=9;3" +font-4 = "JetBrainsMono Nerd Font:style=Medium Italic:size=9;3" +font-5 = "JetBrainsMono Nerd Font:size=19;5" +font-6 = "mononoki Nerd Font" -modules-left = xworkspaces xwindow +modules-left = bspwm xwindow modules-right = filesystem battery pulseaudio memory cpu wlan date cursor-click = pointer @@ -64,136 +71,7 @@ wm-restack = bspwm ; override-redirect = true -[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 = %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 = -format-disconnected = -label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected - -[module/wlan] -inherit = network-base -interface-type = wireless -label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip% - -[module/eth] -inherit = network-base -interface-type = wired -label-connected = %{F#F0C674}%ifname%%{F-} %local_ip% - -[module/date] -type = internal/date -interval = 1 - -date = %H:%M -date-alt = %Y-%m-%d %H:%M:%S - -label = %date% -label-foreground = ${colors.primary} - -[module/battery] -type = internal/battery - -format-prefix = "BAT " - -; This is useful in case the battery never reports 100% charge -; Default: 100 -full-at = 99 - -; format-low once this charge percentage is reached -; Default: 10 -; New in version 3.6.0 -low-at = 5 - -; Use the following command to list batteries and adapters: -; $ ls -1 /sys/class/power_supply/ -; battery = BAT0 -; adapter = ADP1 -battery = BAT1 -adapter = ACAD - -; If an inotify event haven't been reported in this many -; seconds, manually poll for new values. -; -; Needed as a fallback for systems that don't report events -; on sysfs/procfs. -; -; Disable polling by setting the interval to 0. -; -; Default: 5 -poll-interval = 5 +include-file = include-modules.ini [settings] screenchange-reload = true diff --git a/polybar/.config/polybar/include-modules.ini b/polybar/.config/polybar/include-modules.ini new file mode 100644 index 0000000..42b169b --- /dev/null +++ b/polybar/.config/polybar/include-modules.ini @@ -0,0 +1,14 @@ +include-file = modules/battery.ini +include-file = modules/cpu.ini +include-file = modules/date.ini +include-file = modules/eth.ini +include-file = modules/filesystem.ini +include-file = modules/memory.ini +include-file = modules/network_base.ini +include-file = modules/pulseaudio.ini +include-file = modules/wlan.ini +include-file = modules/workspaces.ini +include-file = modules/xkeyboard.ini +include-file = modules/xwindow.ini +include-file = modules/xworkspaces.ini +include-file = modules/bspwm.ini diff --git a/polybar/.config/polybar/launch.sh b/polybar/.config/polybar/launch.sh new file mode 100755 index 0000000..b9d2007 --- /dev/null +++ b/polybar/.config/polybar/launch.sh @@ -0,0 +1,10 @@ +#!/bin/sh +pkill polybar +polybar --reload main & +# if type "xrandr"; then +# for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do +# MONITOR=$m polybar --reload main & +# done +# else +# polybar --reload main & +# fi diff --git a/polybar/.config/polybar/modules/battery.ini b/polybar/.config/polybar/modules/battery.ini new file mode 100644 index 0000000..314bf45 --- /dev/null +++ b/polybar/.config/polybar/modules/battery.ini @@ -0,0 +1,30 @@ +[module/battery] +type = internal/battery + +format-prefix = "BAT " + +; This is useful in case the battery never reports 100% charge +; Default: 100 +full-at = 99 + +; format-low once this charge percentage is reached +; Default: 10 +; New in version 3.6.0 +low-at = 5 + +; Use the following command to list batteries and adapters: +; $ ls -1 /sys/class/power_supply/ +; battery = BAT0 +; adapter = ADP1 +battery = BAT1 +adapter = ACAD + +; If an inotify event haven't been reported in this many +; seconds, manually poll for new values. +; +; Needed as a fallback for systems that don't report events +; on sysfs/procfs. +; +; Disable polling by setting the interval to 0. +; Default: 5 +poll-interval = 5 diff --git a/polybar/.config/polybar/modules/bspwm.ini b/polybar/.config/polybar/modules/bspwm.ini new file mode 100644 index 0000000..bc31944 --- /dev/null +++ b/polybar/.config/polybar/modules/bspwm.ini @@ -0,0 +1,55 @@ +[module/bspwm] +type = internal/bspwm + +; Only show workspaces defined on the same output as the bar +; NOTE: The bspwm and XRandR monitor names must match, which they do by default. +; But if you rename your bspwm monitors with bspc -n this option will no longer +; behave correctly. +; Default: true +pin-workspaces = true + +; Output mode flags after focused state label +; Default: false +inline-mode = false + +; Create click handler used to focus workspace +; Default: true +enable-click = true + +; Create scroll handlers used to cycle workspaces +; Default: true +enable-scroll = true + +; Set the scroll cycle direction +; Default: true +reverse-scroll = false + +; Use fuzzy (partial) matching on labels when assigning +; icons to workspaces +; Example: code;♚ will apply the icon to all workspaces +; containing 'code' in the label +; Default: false +fuzzy-match = true + +; Only scroll through occupied workspaces +; Default: false +; New in version 3.6.0 +occupied-scroll = true + +label-focused = " %icon% " +label-focused-underline = #006699 + +label-occupied = " %icon% " +label-occupied-foreground = #0088aa + +label-urgent = " %icon% " +label-urgent-underline = #9b0a20 + +label-empty = " %icon% " +label-empty-foreground = #555555 + +ws-icon-0 = chat;󰍡 +ws-icon-1 = dev; +ws-icon-2 = web; +ws-icon-3 = misc; +ws-icon-4 = music; diff --git a/polybar/.config/polybar/modules/cpu.ini b/polybar/.config/polybar/modules/cpu.ini new file mode 100644 index 0000000..b4fd38c --- /dev/null +++ b/polybar/.config/polybar/modules/cpu.ini @@ -0,0 +1,7 @@ +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = "󰻠 " +format-prefix-foreground = ${colors.primary} +label = %percentage:2%% + diff --git a/polybar/.config/polybar/modules/date.ini b/polybar/.config/polybar/modules/date.ini new file mode 100644 index 0000000..f73bd01 --- /dev/null +++ b/polybar/.config/polybar/modules/date.ini @@ -0,0 +1,9 @@ +[module/date] +type = internal/date +interval = 1 + +date = %H:%M +date-alt = %Y-%m-%d %H:%M:%S + +label = %date% +label-foreground = ${colors.primary} diff --git a/polybar/.config/polybar/modules/eth.ini b/polybar/.config/polybar/modules/eth.ini new file mode 100644 index 0000000..91f9ed7 --- /dev/null +++ b/polybar/.config/polybar/modules/eth.ini @@ -0,0 +1,5 @@ +[module/eth] +inherit = network-base +interface-type = wired +label-connected = %{F#F0C674}%ifname%%{F-} %local_ip% + diff --git a/polybar/.config/polybar/modules/filesystem.ini b/polybar/.config/polybar/modules/filesystem.ini new file mode 100644 index 0000000..b5cf20c --- /dev/null +++ b/polybar/.config/polybar/modules/filesystem.ini @@ -0,0 +1,11 @@ +[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} + diff --git a/polybar/.config/polybar/modules/memory.ini b/polybar/.config/polybar/modules/memory.ini new file mode 100644 index 0000000..1434e9e --- /dev/null +++ b/polybar/.config/polybar/modules/memory.ini @@ -0,0 +1,7 @@ +[module/memory] +type = internal/memory +interval = 2 +format-prefix = "󰍛 " +format-prefix-foreground = ${colors.primary} +label = %percentage_used:2%% + diff --git a/polybar/.config/polybar/modules/network_base.ini b/polybar/.config/polybar/modules/network_base.ini new file mode 100644 index 0000000..da6404e --- /dev/null +++ b/polybar/.config/polybar/modules/network_base.ini @@ -0,0 +1,7 @@ +[network-base] +type = internal/network +interval = 5 +format-connected = +format-disconnected = +label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected + diff --git a/polybar/.config/polybar/modules/pulseaudio.ini b/polybar/.config/polybar/modules/pulseaudio.ini new file mode 100644 index 0000000..b7309a7 --- /dev/null +++ b/polybar/.config/polybar/modules/pulseaudio.ini @@ -0,0 +1,12 @@ +[module/pulseaudio] +type = internal/pulseaudio + +format-volume-prefix = "󰖀 " +format-volume-prefix-foreground = ${colors.primary} +format-volume = + +label-volume = %percentage%% + +label-muted = muted +label-muted-foreground = ${colors.disabled} + diff --git a/polybar/.config/polybar/modules/wlan.ini b/polybar/.config/polybar/modules/wlan.ini new file mode 100644 index 0000000..35ea388 --- /dev/null +++ b/polybar/.config/polybar/modules/wlan.ini @@ -0,0 +1,5 @@ +[module/wlan] +inherit = network-base +interface-type = wireless +label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip% + diff --git a/polybar/.config/polybar/modules/workspaces.ini b/polybar/.config/polybar/modules/workspaces.ini new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/polybar/.config/polybar/modules/workspaces.ini @@ -0,0 +1 @@ + diff --git a/polybar/.config/polybar/modules/xkeyboard.ini b/polybar/.config/polybar/modules/xkeyboard.ini new file mode 100644 index 0000000..ad76d77 --- /dev/null +++ b/polybar/.config/polybar/modules/xkeyboard.ini @@ -0,0 +1,12 @@ +[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} + diff --git a/polybar/.config/polybar/modules/xwindow.ini b/polybar/.config/polybar/modules/xwindow.ini new file mode 100644 index 0000000..28b47d8 --- /dev/null +++ b/polybar/.config/polybar/modules/xwindow.ini @@ -0,0 +1,4 @@ +[module/xwindow] +type = internal/xwindow +label = %title:0:60:...% + diff --git a/polybar/.config/polybar/modules/xworkspaces.ini b/polybar/.config/polybar/modules/xworkspaces.ini new file mode 100644 index 0000000..a3870e0 --- /dev/null +++ b/polybar/.config/polybar/modules/xworkspaces.ini @@ -0,0 +1,19 @@ +[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 + diff --git a/setup b/setup index 855dcee..d600c08 100755 --- a/setup +++ b/setup @@ -18,7 +18,7 @@ else sudo pacman -Syyu echo "Installing tools/utils" sudo pacman -S ripgrep fd neovim make stow tmux - sudo pacman -S ripgrep fd neovim make stow tmux dmenu arandr autorandr volumeicon picom nitrogen network-manager-applet lxsession thunar lxappearance-gtk3 power-profiles-daemon thermald acpi arc-icon-theme playerctl bspwm sxhkd polybar xorg-xsetroot + sudo pacman -S ripgrep fd neovim make stow tmux dmenu arandr autorandr volumeicon picom nitrogen network-manager-applet lxsession thunar lxappearance-gtk3 power-profiles-daemon thermald acpi arc-icon-theme playerctl bspwm sxhkd polybar xorg-xsetroot ttf-jetbrains-mono-nerd sudo systemctl enable --now power-profiles-daemon sudo thermald --systemd sudo power-profiles-daemon set performance