Created
March 22, 2019 15:11
-
-
Save panther03/c823f5864d1245da713fe1e48946c051 to your computer and use it in GitHub Desktop.
BSPWM setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#w1=1 | |
#w2=2 | |
#w3=3 | |
#w4=4 | |
#w5=5 | |
#w6=1 | |
#w7=7 | |
#w8=8 | |
#w9=9 | |
#w10=10 | |
#w11=11 | |
#w12=12 | |
#w13=13 | |
#w14=14 | |
#w15=15 | |
#w16=16 | |
#w17=17 | |
#w18=18 | |
#w19=19 | |
#w20=20 | |
# Set environment | |
export BSPWM_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/bspwm" | |
export MONITOR=LVDS-1 | |
bspc config border_width 5 | |
bspc config window_gap 8 | |
bspc config top_padding 0 | |
bspc config split_ratio 0.50 | |
bspc config borderless_monocle true | |
bspc config gapless_monocle true | |
bspc config focus_follows_pointer false | |
bspc config history_aware_focus true | |
bspc monitor LVDS1 -d term www edit util chat mult play admn ext ext2 | |
bspc monitor VGA1 -d I II III IV V VI VII VIII IX X | |
# Launch keybinding daemon | |
sxhkd & | |
# Use monocle layout on desktop 1 | |
bspc desktop 'www' --layout monocle | |
# Make windows float on specific desktops | |
# https://github.com/baskerville/bspwm/issues/325 | |
bspc subscribe node_manage | while read event monitor desktop nodeid ipid; do | |
case "$desktop" in | |
www|play|6|play|7|9) | |
bspc node "$nodeid" --state floating | |
;; | |
esac | |
done & | |
# Script for external rules | |
bspc config external_rules_command "$BSPWM_CONFIG/scripts/external_rules" | |
# Send to www desktop | |
bspc rule --add Firefox desktop='www' follow=on | |
bspc rule --add Iceweasel desktop='www' follow=on | |
# Send to dev desktop | |
#bspc rule --add Atom desktop='dev' follow=on | |
#bspc rule --add Brackets desktop='dev' follow=on | |
#bspc rule --add Eclipse desktop='dev' follow=on | |
#bspc rule --add LightTable desktop='dev' follow=on | |
#bspc rule --add Ltbin desktop='dev' follow=on | |
#bspc rule --add Gvim desktop='dev' follow=on | |
#bspc rule --add Mysql-workbench-bin desktop='dev' follow=on | |
#bspc rule --add sun-awt-X11-XFramePeer desktop='dev' follow=on | |
bspc rule --add Emacs desktop='edit' follow=on | |
# Send to chat desktop | |
bspc rule --add gomuks desktop='chat' --one-shot follow=on | |
bspc rule --add discord desktop='chat' --one-shot follow=on | |
# Send to play desktop | |
bspc rule --add mGBA desktop='play' follow=on | |
# Floating windows | |
bspc rule --add feh state=floating | |
bspc rule --add mpv state=floating | |
bspc rule --add Pavucontrol state=floating | |
bspc rule --add Pcmanfm state=floating | |
bspc rule --add Remmina state=floating | |
# source the colors. | |
. "${HOME}/.cache/wal/colors.sh" | |
# Set the border colors. | |
bspc config normal_border_color "$color1" | |
bspc config active_border_color "$color2" | |
bspc config focused_border_color "$color15" | |
# Use the line below if you are on bspwm >= 0.9.4 | |
bspc config presel_feedback_color "$color1" | |
# Use the line below if you are on bspwm < 0.9.4 | |
#bspc config presel_border_color "$color1" | |
# Set wallpaper and load pywal | |
wpg -s wallhaven-549900.jpg | |
wal -R | |
# Load Polybar | |
$HOME/.config/polybar/launch.sh | |
# Load session | |
#. "$BSPWM_CONFIG/restore.cfg" | |
#if [ -e "$BSPWM_STATE" ] ; then | |
# bspc wm --load-state "$BSPWM_STATE" | |
# bspc wm --adopt-orphans | |
# rm "$BSPWM_STATE" | |
#fi | |
# Play startup sound | |
paplay $HOME/theme_include/startup.wav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ____ _____ | |
# | _ \_ _| Derek Taylor (DistroTube) | |
# | | | || | http://www.youtube.com/c/DistroTube | |
# | |_| || | http://www.gitlab.com/dwt1/ | |
# |____/ |_| | |
;===================================================== | |
; | |
; To learn more about how to configure Polybar | |
; go to https://github.com/jaagr/polybar | |
; | |
; The README contains alot of information | |
; Themes : https://github.com/jaagr/dots/tree/master/.local/etc/themer/themes | |
; https://github.com/jaagr/polybar/wiki/ | |
; https://github.com/jaagr/polybar/wiki/Configuration | |
; https://github.com/jaagr/polybar/wiki/Formatting | |
; | |
;===================================================== | |
;[global/wm] | |
;https://github.com/jaagr/polybar/wiki/Configuration#global-wm-settings | |
;margin-top = 10 | |
;margin-bottom = 10 | |
[settings] | |
;https://github.com/jaagr/polybar/wiki/Configuration#application-settings | |
throttle-output = 5 | |
throttle-output-for = 10 | |
throttle-input-for = 30 | |
screenchange-reload = true | |
compositing-background = over | |
compositing-foreground = over | |
compositing-overline = over | |
compositing-underline = over | |
compositing-border = over | |
; Define fallback values used by all module formats | |
format-foreground = #FF0000 | |
format-background = #00FF00 | |
format-underline = | |
format-overline = | |
format-spacing = | |
format-padding = | |
format-margin = | |
format-offset = | |
[colors] | |
; Nord theme ============ | |
;background = #1D2330 | |
;foreground = #c0c5ce | |
;alert = #bd2c40 | |
;volume-min = #a3be8c | |
;volume-med = #ebcb8b | |
;volume-max = #bf616a | |
; ======================= | |
; Gotham theme ========== | |
; background = #0a0f14 | |
; foreground = #99d1ce | |
; alert = #d26937 | |
; volume-min = #2aa889 | |
; volume-med = #edb443 | |
; volume-max = #c23127 | |
; ======================= | |
; INTRCPTR theme ============ | |
background = ${xrdb:color0:#222} | |
;background = #aa000000 | |
background-alt = #444 | |
foreground = ${xrdb:color7:#222} | |
;foreground = #fff | |
foreground-alt = #555 | |
primary = #ffb52a | |
secondary = #e60053 | |
alert = #bd2c40 | |
################################################################################ | |
################################################################################ | |
############ MAINBAR-BSPWM ############ | |
################################################################################ | |
################################################################################ | |
[bar/mainbar-bspwm] | |
monitor = ${env:MONITOR} | |
;monitor-fallback = HDMI1 | |
monitor-strict = false | |
override-redirect = false | |
bottom = false | |
fixed-center = true | |
width = 100% | |
height = 20 | |
;offset-x = 1% | |
;offset-y = 1% | |
background = ${xrdb:color0:#222} | |
foreground = ${xrdb:color7:#222} | |
; Background gradient (vertical steps) | |
; background-[0-9]+ = #aarrggbb | |
;background-0 = | |
radius = 0.0 | |
line-size = 2 | |
line-color = #000000 | |
wm-restack = bspwm | |
; Enable support for inter-process messaging | |
; See the Messaging wiki page for more details. | |
enable-ipc = true | |
;border-size = 0 | |
;border-left-size = 25 | |
;border-right-size = 25 | |
border-top-size = 2 | |
;border-bottom-size = 25 | |
border-color = ${xrdb:color0:#222} | |
module-margin-left = 0 | |
module-margin-right = 0 | |
;https://github.com/jaagr/polybar/wiki/Fonts | |
font-0 = "Fantasque Sans Mono:size=11;2" | |
font-1 = "FantasqueSansMono Nerd Font Mono:size=14;3" | |
modules-left = bspwm xwindow workspaces | |
modules-center = | |
modules-right = arrow1 mpd arrow2 memory2 arrow3 battery arrow4 pavolume arrow6 date | |
;dim-value = 1.0 | |
tray-position = right | |
tray-detached = false | |
tray-maxsize = 20 | |
tray-background = ${colors.background} | |
tray-offset-x = 0 | |
tray-offset-y = 0 | |
tray-padding = 4 | |
tray-scale = 1.0 | |
scroll-up = bspwm-desknext | |
scroll-down = bspwm-deskprev | |
click-right = rmenu_wi_1 | |
[module/workspaces] | |
type = internal/xworkspaces | |
label-active = " - %name%" | |
label-active-background = ${colors.background} | |
label-active-foreground = ${colors.foreground} | |
label-empty = | |
################################################################################ | |
################################################################################ | |
############ MODULE BSPWM ############ | |
################################################################################ | |
################################################################################ | |
[module/bspwm] | |
type = internal/bspwm | |
enable-click = true | |
enable-scroll = true | |
reverse-scroll = true | |
pin-workspaces = true | |
format = <label-state> <label-mode> | |
label-focused = | |
label-focused-background = ${colors.background} | |
label-focused-padding = 1 | |
label-focused-foreground = ${xrdb:color2:#222} | |
label-focused-font = 1 | |
label-occupied = | |
label-occupied-padding = 1 | |
label-occupied-background = ${colors.background} | |
label-urgent-padding = 1 | |
label-occupied-font = 1 | |
label-urgent-font = 1 | |
label-empty = | |
label-empty-foreground = ${colors.foreground} | |
label-empty-padding = 1 | |
label-empty-background = ${colors.background} | |
label-empty-font = 1 | |
label-monocle = " " | |
label-monocle-foreground = ${colors.foreground} | |
label-monocle-font = 1 | |
label-tiled = " " | |
label-tiled-foreground = ${colors.foreground} | |
label-tiled-font = 1 | |
label-fullscreen = " " | |
label-fullscreen-foreground = ${colors.foreground} | |
label-fullscreen-font = 1 | |
label-floating = " " | |
label-floating-foreground = ${colors.foreground} | |
label-floating-font = 1 | |
label-pseudotiled = " " | |
label-pseudotiled-foreground = ${colors.foreground} | |
label-pseudotiled-font = 1 | |
label-locked = " " | |
label-locked-foreground = ${colors.foreground} | |
label-locked-font = 1 | |
label-sticky = " " | |
label-sticky-font = 1 | |
label-sticky-foreground = ${colors.foreground} | |
label-private = " " | |
label-private-foreground = ${colors.foreground} | |
label-private-font = 1 | |
; Separator in between workspaces | |
;label-separator = | | |
;label-separator-padding = 10 | |
;label-separator-foreground = #ffb52a | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
################################################################################ | |
############################################################################### | |
############ MODULES ARROWS ############ | |
################################################################################ | |
################################################################################ | |
[module/arrow1] | |
; grey to Blue | |
type = custom/text | |
content = "%{T2} %{T-}" | |
content-font = 1 | |
content-foreground = ${xrdb:color1:#128} | |
content-background = ${xrdb:color0:#222} | |
# 1D2330 | |
[module/arrow2] | |
; grey to Blue | |
type = custom/text | |
content = "%{T2} %{T-}" | |
content-font = 1 | |
content-foreground = ${xrdb:color6:#128} | |
content-background = ${xrdb:color1:#128} | |
[module/arrow3] | |
; grey to Blue | |
type = custom/text | |
content = "%{T2} %{T-}" | |
content-font = | |
content-foreground = ${xrdb:color4:#128} | |
content-background = ${xrdb:color6:#128} | |
[module/arrow4] | |
; grey to Blue | |
type = custom/text | |
content = "%{T2} %{T-}" | |
content-font = 1 | |
content-foreground = ${xrdb:color5:#128} | |
content-background = ${xrdb:color4:#128} | |
[module/arrow5] | |
; grey to Blue | |
type = custom/text | |
content = "%{T2} %{T-}" | |
content-font = 1 | |
content-foreground = #AD69AF | |
content-background = #645377 | |
[module/arrow6] | |
; grey to Blue | |
type = custom/text | |
content = "%{T2} %{T-}" | |
content-font = 1 | |
content-foreground = ${xrdb:color0:#222} | |
# 1D2330 | |
content-background = ${xrdb:color5:#128} | |
################################################################################ | |
############################################################################### | |
############ MODULES A-Z ############ | |
################################################################################ | |
################################################################################ | |
[module/arch-aur-updates] | |
type = custom/script | |
exec = ~/.config/polybar/scripts/check-all-updates.sh | |
interval = 1000 | |
label = Updates: %output% | |
format-foreground = #ffffff | |
format-background = #AD69AF | |
format-prefix = " " | |
format-prefix-foreground = #ffffff | |
[module/aur-updates] | |
type = custom/script | |
exec = cower -u | wc -l | |
interval = 1000 | |
label = Aur: %output% | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-prefix = " " | |
format-prefix-foreground = #FFBB00 | |
format-underline = #FFBB00 | |
################################################################################ | |
[module/backlight-acpi] | |
inherit = module/xbacklight | |
type = internal/backlight | |
card = intel_backlight | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-prefix-foreground = #7D49B6 | |
format-prefix-underline = #7D49B6 | |
format-underline = #7D49B6 | |
################################################################################ | |
[module/backlight] | |
;https://github.com/jaagr/polybar/wiki/Module:-backlight | |
type = internal/backlight | |
; Use the following command to list available cards: | |
; $ ls -1 /sys/class/backlight/ | |
card = intel_backlight | |
; Available tags: | |
; <label> (default) | |
; <ramp> | |
; <bar> | |
format = <label> | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
; Available tokens: | |
; %percentage% (default) | |
label = %percentage%% | |
; Only applies if <ramp> is used | |
ramp-0 = 🌕 | |
ramp-1 = 🌔 | |
ramp-2 = 🌓 | |
ramp-3 = 🌒 | |
ramp-4 = 🌑 | |
; Only applies if <bar> is used | |
bar-width = 10 | |
bar-indicator = | | |
bar-fill = ─ | |
bar-empty = ─ | |
################################################################################ | |
[module/battery] | |
;https://github.com/jaagr/polybar/wiki/Module:-battery | |
type = internal/battery | |
battery = BAT0 | |
adapter = AC | |
full-at = 100 | |
format-charging = <animation-charging> <label-charging> | |
label-charging = %percentage%% | |
label-charging-foreground = #ffffff | |
format-charging-foreground = #ffffff | |
format-charging-background = ${xrdb:color4:128} | |
format-discharging = <ramp-capacity> <label-discharging> | |
label-discharging = %percentage%% | |
label-discharging-foreground = #ffffff | |
format-discharging-foreground = #ffffff | |
format-discharging-background = ${xrdb:color4:128} | |
format-full-prefix = " " | |
format-full-prefix-foreground = #ffffff | |
format-full-foreground = #ffffff | |
format-full-background = ${xrdb:color4:128} | |
format-foreground = #ffffff | |
format-background = ${xrdb:color4:128} | |
ramp-capacity-0 = " " | |
ramp-capacity-1 = " " | |
ramp-capacity-2 = " " | |
ramp-capacity-3 = " " | |
ramp-capacity-4 = " " | |
ramp-capacity-foreground = #ffffff | |
animation-charging-0 = " " | |
animation-charging-1 = " " | |
animation-charging-2 = " " | |
animation-charging-3 = " " | |
animation-charging-4 = " " | |
animation-charging-foreground = #ffffff | |
animation-charging-framerate = 750 | |
################################################################################ | |
[module/compton] | |
;https://github.com/jaagr/polybar/wiki/User-contributed-modules#compton | |
;type = custom/script | |
;exec = ~/.config/polybar/scripts/compton.sh | |
;click-left = ~/.config/polybar/scripts/compton-toggle.sh | |
;interval = 5 | |
;format-foreground = ${colors.foreground} | |
;format-background = ${colors.background} | |
;format-underline = #00AF02 | |
################################################################################ | |
[module/cpu1] | |
;https://github.com/jaagr/polybar/wiki/Module:-cpu | |
type = internal/cpu | |
; Seconds to sleep between updates | |
; Default: 1 | |
interval = 1 | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
; | |
format-prefix = " " | |
format-prefix-foreground = #cd1f3f | |
format-underline = #645377 | |
; Available tags: | |
; <label> (default) | |
; <bar-load> | |
; <ramp-load> | |
; <ramp-coreload> | |
format = <label> <ramp-coreload> | |
format-padding = 2 | |
; Available tokens: | |
; %percentage% (default) - total cpu load | |
; %percentage-cores% - load percentage for each core | |
; %percentage-core[1-9]% - load percentage for specific core | |
label-font = 3 | |
label = Cpu %percentage:3%% | |
ramp-coreload-0 = ▁ | |
ramp-coreload-0-font = 3 | |
ramp-coreload-0-foreground = #aaff77 | |
ramp-coreload-1 = ▂ | |
ramp-coreload-1-font = 3 | |
ramp-coreload-1-foreground = #aaff77 | |
ramp-coreload-2 = ▃ | |
ramp-coreload-2-font = 3 | |
ramp-coreload-2-foreground = #aaff77 | |
ramp-coreload-3 = ▄ | |
ramp-coreload-3-font = 3 | |
ramp-coreload-3-foreground = #aaff77 | |
ramp-coreload-4 = ▅ | |
ramp-coreload-4-font = 3 | |
ramp-coreload-4-foreground = #fba922 | |
ramp-coreload-5 = ▆ | |
ramp-coreload-5-font = 3 | |
ramp-coreload-5-foreground = #fba922 | |
ramp-coreload-6 = ▇ | |
ramp-coreload-6-font = 3 | |
ramp-coreload-6-foreground = #ff5555 | |
ramp-coreload-7 = █ | |
ramp-coreload-7-font = 3 | |
ramp-coreload-7-foreground = #ff5555 | |
################################################################################ | |
[module/cpu2] | |
;https://github.com/jaagr/polybar/wiki/Module:-cpu | |
type = internal/cpu | |
; Seconds to sleep between updates | |
; Default: 1 | |
interval = 1 | |
format-foreground = #ffffff | |
format-background = ${xrdb:color4:128} | |
format-prefix = " " | |
format-prefix-foreground = #ffffff | |
label-font = 1 | |
; Available tags: | |
; <label> (default) | |
; <bar-load> | |
; <ramp-load> | |
; <ramp-coreload> | |
format = <label> | |
; Available tokens: | |
; %percentage% (default) - total cpu load | |
; %percentage-cores% - load percentage for each core | |
; %percentage-core[1-9]% - load percentage for specific core | |
label = Cpu %percentage%% | |
################################################################################ | |
[module/date] | |
;https://github.com/jaagr/polybar/wiki/Module:-date | |
type = internal/date | |
; Seconds to sleep between updates | |
interval = 5 | |
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string | |
; NOTE: if you want to use syntax tags here you need to use %%{...} | |
date = "%Y-%m-%d" | |
date-alt = " %a %b %d, %Y" | |
time = %H:%M%p | |
time-alt = %H:%M%p | |
format-prefix = " " | |
format-prefix-foreground = ${colors.foreground} | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
label = " %date% %time% " | |
################################################################# | |
[module/ewmh] | |
type = internal/xworkspaces | |
pin-workspaces = false | |
enable-click = true | |
enable-scroll = true | |
reverse-scroll = true | |
;extra icons to choose from | |
;http://fontawesome.io/cheatsheet/ | |
; v | |
icon-0 = 1; | |
icon-1 = 2; | |
icon-2 = 3; | |
icon-3 = 4; | |
icon-4 = 5; | |
icon-5 = 6; | |
icon-6 = 7; | |
icon-7 = 8; | |
icon-8 = 9; | |
icon-9 = 10; | |
icon-default = " " | |
format = <label-state> | |
label-monitor = %name% | |
;label-active = %icon% %name% | |
label-active = %icon% | |
label-active-foreground = ${colors.foreground} | |
label-active-background = ${colors.background} | |
label-active-underline= #6790eb | |
label-active-padding = 1 | |
label-occupied = %icon% | |
label-occupied-background = ${colors.background} | |
label-occupied-padding = 1 | |
label-urgent = %icon% | |
label-urgent-foreground = ${colors.foreground} | |
label-urgent-background = ${colors.alert} | |
label-urgent-underline = ${colors.alert} | |
label-urgent-padding = 1 | |
label-empty = %icon% | |
label-empty-foreground = ${colors.foreground} | |
label-empty-padding = 1 | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
################################################################################ | |
[module/filesystem] | |
;https://github.com/jaagr/polybar/wiki/Module:-filesystem | |
type = internal/fs | |
; Mountpoints to display | |
mount-0 = / | |
;mount-1 = /home | |
;mount-2 = /var | |
; Seconds to sleep between updates | |
; Default: 30 | |
interval = 30 | |
; Display fixed precision values | |
; Default: false | |
fixed-values = false | |
; Spacing between entries | |
; Default: 2 | |
spacing = 4 | |
; Available tags: | |
; <label-mounted> (default) | |
; <bar-free> | |
; <bar-used> | |
; <ramp-capacity> | |
format-mounted = <label-mounted> | |
format-mounted-foreground = ${colors.foreground} | |
format-mounted-background = ${colors.background} | |
format-mounted-underline = #fe0000 | |
; Available tokens: | |
; %mountpoint% | |
; %type% | |
; %fsname% | |
; %percentage_free% | |
; %percentage_used% | |
; %total% | |
; %free% | |
; %used% | |
; Default: %mountpoint% %percentage_free%% | |
label-mounted = %mountpoint% : %used% used of %total% | |
; Available tokens: | |
; %mountpoint% | |
; Default: %mountpoint% is not mounted | |
label-unmounted = %mountpoint% not mounted | |
format-unmounted-foreground = ${colors.foreground} | |
format-unmounted-background = ${colors.background} | |
;format-unmounted-underline = ${colors.alert} | |
################################################################################ | |
[module/kernel] | |
type = custom/script | |
exec = uname -r | |
tail = false | |
interval = 1024 | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-prefix = " " | |
format-prefix-foreground = #0084FF | |
format-underline = #4B5665 | |
################################################################################ | |
[module/jgmenu] | |
type = custom/script | |
interval = 120 | |
exec = echo "ArcoLinux" | |
click-left = "jgmenu_run >/dev/null 2>&1 &" | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
################################################################################ | |
[module/load-average] | |
type = custom/script | |
exec = uptime | grep -ohe 'load average[s:][: ].*' | awk '{ print $3" "$4" "$5"," }' | sed 's/,//g' | |
interval = 100 | |
;HOW TO SET IT MINIMAL 10 CHARACTERS - HIDDEN BEHIND SYSTEM ICONS | |
;label = %output% | |
label = %output:10% | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-prefix = " " | |
format-prefix-foreground = #62FF00 | |
format-underline = #62FF00 | |
################################################################################ | |
[module/memory1] | |
;https://github.com/jaagr/polybar/wiki/Module:-memory | |
type = internal/memory | |
interval = 1 | |
; Available tokens: | |
; %percentage_used% (default) | |
; %percentage_free% | |
; %gb_used% | |
; %gb_free% | |
; %gb_total% | |
; %mb_used% | |
; %mb_free% | |
; %mb_total% | |
label = %percentage_used%% | |
bar-used-indicator = | |
bar-used-width = 10 | |
bar-used-foreground-0 = #3384d0 | |
bar-used-fill = | |
bar-used-empty = | |
bar-used-empty-foreground = #ffffff | |
format = <label> <bar-used> | |
format-prefix = " " | |
format-prefix-foreground = #3384d0 | |
format-underline = #4B5665 | |
format-foreground = #ffffff | |
format-background = ${colors.background} | |
################################################################################ | |
[module/memory2] | |
;https://github.com/jaagr/polybar/wiki/Module:-memory | |
type = internal/memory | |
interval = 1 | |
; Available tokens: | |
; %percentage_used% (default) | |
; %percentage_free% | |
; %gb_used% | |
; %gb_free% | |
; %gb_total% | |
; %mb_used% | |
; %mb_free% | |
; %mb_total% | |
label = %percentage_used%% | |
format = Mem <label> | |
format-prefix = " " | |
format-prefix-foreground = #ffffff | |
format-foreground = #ffffff | |
format-background = ${xrdb:color6:#128} | |
############################################################################### | |
[module/memory3] | |
;https://github.com/jaagr/polybar/wiki/Module:-memory | |
type = internal/memory | |
interval = 1 | |
; Available tokens: | |
; %percentage_used% (default) | |
; %percentage_free% | |
; %gb_used% | |
; %gb_free% | |
; %gb_total% | |
; %mb_used% | |
; %mb_free% | |
; %mb_total% | |
label = %gb_used%/%gb_free% | |
format = Mem <label> | |
format-prefix = " " | |
format-prefix-foreground = #3384d0 | |
format-underline = #3384d0 | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
################################################################################ | |
[module/mpd] | |
;https://github.com/jaagr/polybar/wiki/Module:-mpd | |
type = internal/mpd | |
;format-online = "<label-song> <icon-prev> <icon-stop> <toggle> <icon-next>" | |
format-online = " <label-song> <bar-progress>" | |
;format-online = "<label-song> <bar-progress> <icon-prev> <icon-stop> <toggle> <icon-next>" | |
format-online-prefix = " " | |
icon-prev = | |
icon-stop = | |
icon-play = | |
icon-pause = | |
icon-next = | |
label-song-maxlen = 40 | |
label-song-ellipsis = true | |
bar-progress-width = 10 | |
bar-progress-indicator = | |
bar-progress-indicator-foreground = #ffffff | |
bar-progress-indicator-background = ${xrdb:color1:#128} | |
bar-progress-fill = | |
bar-progress-empty = | |
bar-progress-empty-foreground = #ffffff | |
bar-progress-empty-background = ${xrdb:color1:#128} | |
bar-progress-fill-foreground = ${xrdb:color5:#128} | |
bar-progress-fill-background = ${xrdb:color1:#128} | |
format-online-foreground = #ffffff | |
format-online-background = ${xrdb:color1:#128} | |
################################################################################ | |
[module/networkspeedup] | |
;https://github.com/jaagr/polybar/wiki/Module:-network | |
type = internal/network | |
interface = wlp2s0 | |
;interface = enp14s0 | |
;interface = enp0s31f6 | |
;interface = enp3s0 | |
label-connected = "%upspeed:7%" | |
format-connected = <label-connected> | |
format-connected-prefix = " " | |
format-connected-prefix-foreground = #d7d7d7 | |
format-connected-foreground = #d7d7d7 | |
format-connected-background = ${colors.foreground} | |
################################################################################ | |
[module/networkspeeddown] | |
;https://github.com/jaagr/polybar/wiki/Module:-network | |
type = internal/network | |
interface = wlp2s0 | |
;interface = enp14s0 | |
;interface = enp0s31f6 | |
;interface = enp3s0 | |
label-connected = "%downspeed:7%" | |
format-connected = <label-connected> | |
format-connected-prefix = " " | |
format-connected-prefix-foreground = #d7d7d7 | |
format-connected-foreground = #d7d7d7 | |
format-connected-background = ${colors.foreground} | |
################################################################################ | |
[module/pacman-updates] | |
type = custom/script | |
;exec = pacman -Qu | wc -l | |
exec = checkupdates | wc -l | |
interval = 1000 | |
label = Repo: %output% | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-prefix = " " | |
format-prefix-foreground = #FFBB00 | |
format-underline = #FFBB00 | |
################################################################################ | |
[module/pavolume] | |
type = custom/script | |
tail = true | |
label = " %output%" | |
exec = ~/.config/polybar/scripts/pavolume.sh --listen | |
click-right = exec pavucontrol | |
click-left = ~/.config/polybar/scripts/pavolume.sh --togmute | |
scroll-up = ~/.config/polybar/scripts/pavolume.sh --up | |
scroll-down = ~/.config/polybar/scripts/pavolume.sh --down | |
format-foreground = #777777 | |
format-background = ${xrdb:color5:#128} | |
################################################################################ | |
[module/pub-ip] | |
;https://linuxconfig.org/polybar-a-better-wm-panel-for-your-linux-system | |
type = custom/script | |
exec = ~/.config/polybar/scripts/pub-ip.sh | |
interval = 100 | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-underline = #FFBB00 | |
label = %output% | |
format-prefix = " " | |
format-prefix-foreground = #FFBB00 | |
################################################################################ | |
[module/release] | |
type = custom/script | |
exec = (lsb_release -d | awk {'print $2'} ;echo " "; lsb_release -r | awk {'print $2'}) | tr -d '\n' | |
interval = 6000 | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-prefix = " " | |
format-prefix-foreground = #62FF00 | |
format-underline = #62FF00 | |
################################################################################ | |
[module/sep] | |
; alternative separator | |
type = custom/text | |
content = | |
content-foreground = ${colors.foreground} | |
content-background = ${colors.background} | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
################################################################################ | |
[module/spotify1] | |
;https://github.com/NicholasFeldman/dotfiles/blob/master/polybar/.config/polybar/spotify.sh | |
type = custom/script | |
exec = ~/.config/polybar/scripts/spotify1.sh | |
interval = 1 | |
;format = <label> | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-padding = 2 | |
format-underline = #0f0 | |
format-prefix = " " | |
format-prefix-foreground = #0f0 | |
label = %output:0:150% | |
################################################################################ | |
[module/temperature1] | |
;https://github.com/jaagr/polybar/wiki/Module:-temperature | |
type = internal/temperature | |
; Thermal zone to use | |
; To list all the zone types, run | |
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done | |
; Default: 0 | |
thermal-zone = 0 | |
; Full path of temperature sysfs path | |
; Use `sensors` to find preferred temperature source, then run | |
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done | |
; to find path to desired file | |
; Default reverts to thermal zone setting | |
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input | |
warn-temperature = 70 | |
format = <ramp> <label> | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-underline = #c72581 | |
format-warn = <ramp> <label-warn> | |
format-warn-underline = #c7254f | |
label = %temperature% | |
label-warn = %temperature% | |
label-warn-foreground = #c7254f | |
ramp-0 = | |
ramp-1 = | |
ramp-2 = | |
ramp-3 = | |
ramp-4 = | |
ramp-foreground =${colors.foreground} | |
################################################################################ | |
[module/temperature2] | |
type = custom/script | |
exec = ~/.config/polybar/scripts/tempcores.sh | |
interval = 2 | |
format-padding = 1 | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-underline = #C1B93E | |
format-prefix-foreground = #C1B93E | |
label = %output:0:150:% | |
################################################################################ | |
[module/uptime] | |
;https://github.com/jaagr/polybar/wiki/User-contributed-modules#uptime | |
type = custom/script | |
exec = uptime | awk -F, '{sub(".*up ",x,$1);print $1}' | |
interval = 100 | |
label = Uptime : %output% | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
format-prefix = " " | |
format-prefix-foreground = #C15D3E | |
format-underline = #C15D3E | |
################################################################################ | |
[module/volume] | |
;https://github.com/jaagr/polybar/wiki/Module:-volume | |
type = internal/volume | |
format-volume = "<label-volume> <bar-volume>" | |
label-volume = " " | |
label-volume-foreground = #40ad4b | |
label-muted = muted | |
bar-volume-width = 10 | |
bar-volume-foreground-0 = #40ad4b | |
bar-volume-foreground-1 = #40ad4b | |
bar-volume-foreground-2 = #40ad4b | |
bar-volume-foreground-3 = #40ad4b | |
bar-volume-foreground-4 = #40ad4b | |
bar-volume-foreground-5 = #40ad4b | |
bar-volume-foreground-6 = #40ad4b | |
bar-volume-gradient = false | |
bar-volume-indicator = | |
bar-volume-indicator-font = 2 | |
bar-volume-fill = | |
bar-volume-fill-font = 2 | |
bar-volume-empty = | |
bar-volume-empty-font = 2 | |
bar-volume-empty-foreground = ${colors.foreground} | |
format-volume-foreground = ${colors.foreground} | |
format-volume-background = ${colors.background} | |
format-muted-prefix = " " | |
format-muted-prefix-foreground = "#ff0000" | |
format-muted-foreground = ${colors.foreground} | |
format-muted-background = ${colors.background} | |
################################################################################ | |
[module/weather] | |
type = custom/script | |
interval = 10 | |
format = <label> | |
format-prefix = " " | |
format-prefix-foreground = #3EC13F | |
format-underline = #3EC13F | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
exec = python -u ~/.config/polybar/scripts/weather.py | |
tail = true | |
################################################################################# | |
[module/wired-network] | |
;https://github.com/jaagr/polybar/wiki/Module:-network | |
type = internal/network | |
interface = enp4s0 | |
;interface = enp14s0 | |
interval = 3.0 | |
; Available tokens: | |
; %ifname% [wireless+wired] | |
; %local_ip% [wireless+wired] | |
; %essid% [wireless] | |
; %signal% [wireless] | |
; %upspeed% [wireless+wired] | |
; %downspeed% [wireless+wired] | |
; %linkspeed% [wired] | |
; Default: %ifname% %local_ip% | |
label-connected = %ifname% | |
label-disconnected = %ifname% disconnected | |
format-connected-foreground = ${colors.foreground} | |
format-connected-background = ${colors.background} | |
format-connected-underline = #55aa55 | |
format-connected-prefix = " " | |
format-connected-prefix-foreground = #55aa55 | |
format-connected-prefix-background = ${colors.background} | |
format-disconnected = <label-disconnected> | |
format-disconnected-underline = ${colors.alert} | |
label-disconnected-foreground = ${colors.foreground} | |
################################################################################ | |
[module/wireless-network] | |
;https://github.com/jaagr/polybar/wiki/Module:-network | |
type = internal/network | |
interface = ${env:WIRELESS} | |
interval = 3.0 | |
label-connected = %essid% | |
format-connected = <label-connected> | |
;format-connected = <ramp-signal> <label-connected> | |
format-connected-foreground = ${colors.foreground} | |
format-connected-background = ${colors.background} | |
format-connected-prefix = " " | |
format-connected-prefix-foreground = #7e52c6 | |
format-connected-prefix-background = ${colors.background} | |
format-connected-underline = #7e52c6 | |
label-disconnected = %ifname% disconnected | |
label-disconnected-foreground = ${colors.alert} | |
label-disconnected-background = ${colors.background} | |
format-disconnected = <label-disconnected> | |
format-disconnected-foreground = ${colors.alert} | |
format-disconnected-background = ${colors.background} | |
format-disconnected-prefix = " " | |
format-disconnected-prefix-foreground = ${colors.alert} | |
format-disconnected-prefix-background = ${colors.background} | |
format-disconnected-underline =${colors.alert} | |
ramp-signal-0 = ▁ | |
ramp-signal-1 = ▂ | |
ramp-signal-2 = ▃ | |
ramp-signal-3 = ▄ | |
ramp-signal-4 = ▅ | |
ramp-signal-5 = ▆ | |
ramp-signal-6 = ▇ | |
ramp-signal-7 = █ | |
ramp-signal-foreground = #7e52c6 | |
################################################################################ | |
[module/xbacklight] | |
;https://github.com/jaagr/polybar/wiki/Module:-xbacklight | |
type = internal/xbacklight | |
format = <label> <bar> | |
format-prefix = " " | |
format-prefix-foreground = ${colors.foreground} | |
format-prefix-background = ${colors.background} | |
format-prefix-underline = #9f78e1 | |
format-underline = #9f78e1 | |
label = %percentage%% | |
bar-width = 10 | |
bar-indicator = | |
bar-indicator-foreground = #fff | |
bar-indicator-font = 2 | |
bar-fill = | |
bar-fill-font = 2 | |
bar-fill-foreground = #9f78e1 | |
bar-empty = | |
bar-empty-font = 2 | |
bar-empty-foreground = #fff | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
################################################################################ | |
[module/xkeyboard] | |
;https://github.com/jaagr/polybar/wiki/Module:-xkeyboard | |
type = internal/xkeyboard | |
blacklist-0 = num lock | |
format-prefix = " " | |
format-prefix-foreground = ${colors.foreground} | |
format-prefix-background = ${colors.background} | |
format-prefix-underline = #3ecfb2 | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
label-layout = %layout% | |
label-layout-underline = #3ecfb2 | |
label-indicator-padding = 2 | |
label-indicator-margin = 1 | |
label-indicator-background = ${colors.background} | |
label-indicator-underline = ${colors.foreground} | |
################################################################################ | |
[module/xwindow] | |
;https://github.com/jaagr/polybar/wiki/Module:-xwindow | |
type = internal/xwindow | |
; Available tokens: | |
; %title% | |
; Default: %title% | |
label = " %title%" | |
label-maxlen = 50 | |
label-empty= " no window" | |
format-foreground = ${colors.foreground} | |
format-background = ${colors.background} | |
############################################################################### | |
# vim:ft=dosini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Terminate already running bar instances | |
killall -q polybar | |
# Wait until the processes have been shut down | |
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done | |
for m in $(polybar --list-monitors | cut -d":" -f1); do | |
WIRELESS=$(ls /sys/class/net/ | grep ^wl | awk 'NR==1{print $1}') MONITOR=$m polybar --reload mainbar-bspwm & | |
done | |
echo "Bars launched..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#awk '{print $1;}' | |
# bspwm hotkeys | |
# | |
# Exit bspwm | |
super + shift + e | |
bspc quit | |
# Close window | |
super + shift + q | |
bspc node --close | |
# Rotate desktop | |
super + {_,shift + }r | |
bspc node @/ --rotate {90,-90} | |
# Circulate the leaves of the tree | |
super + {_,shift + }c | |
bspc node @/ --circulate {backward,forward} | |
# Make split ratios equal | |
super + equal | |
bspc node @/ --equalize | |
# Make split ratios balanced | |
super + minus | |
bspc node @/ --balance | |
# Toogle tiling of window | |
super + space | |
bspc query --nodes -n focused.tiled && state=floating || state=tiled; \ | |
bspc node --state \~$state | |
# Toogle pseudo tiling of window | |
super + shift + p | |
bspc node --state \~pseudo_tiled | |
# Toggle fullscreen of window | |
super + f | |
bspc node --state \~fullscreen | |
# Focus last window/desktop | |
alt + {grave, asciitilde} | |
bspc node --{focus, swap} last | |
super + grave | |
bspc desktop --focus last.local | |
# Focus next/previous window | |
alt + {shift,_} + Tab | |
bspc node --focus {prev,next} | |
# Focus next/previous desktop | |
super + {shift,_} + Tab | |
bspc desktop --focus {prev,next}.occupied | |
# Navigate to older/newer window in history | |
#super + {o,n} | |
# bspc wm --record-history off; \ | |
# bspc node --focus {older,newer}; \ | |
# bspc wm --record-history on | |
# Focus/move window to the biggest space | |
#super + {_,shift + }m | |
# bspc node --{focus,swap} biggest | |
# Focus/swap windows by direction | |
super + {_,shift + }{Left, Down, Up, Right} | |
bspc node --{focus,swap} {west,south,north,east} | |
# Move window to last split | |
# super + y | |
# bspc query --nodes -n focused.automatic \ | |
# && bspc node -n last.\!automatic \ | |
# || bspc node last.leaf -n focused | |
# Flip layout vertically/horizontally | |
#super + {_,shift + }s | |
# bspc node @/ --flip {vertical,horizontal} | |
# Focus parent/brother/first/second for preselection | |
super + ctrl + {p,b,comma,period} | |
bspc node --focus @{parent,brother,first,second} | |
# Preselect the splitting area for next window on leaf/parent | |
super + ctrl + {Left,Down,Up,Right} | |
bspc node --presel-dir \~{west,south,north,east} | |
# Define splitting ratio for next window on leaf/parent | |
super + ctrl + {_,shift +}{1-9} | |
bspc node {_,@/} --presel-ratio 0.{1-9} | |
# Cancel preselection | |
super + ctrl + space | |
bspc node --presel-dir cancel | |
# Expand tiled space | |
super + alt + {Left,Down,Up,Right} | |
bspc node {@west -r -10,@south -r +10,@north -r -10,@east -r +10} | |
# Contract tiled space | |
super + alt + shift + {Left,Down,Up,Right} | |
bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10} | |
# Move window to selected desktop | |
super + shift + {1-9,0} | |
bspc node --to-desktop ^{1-9,10} --focus | |
# Move window to left/right desktop | |
super + shift + {Left,Right} | |
bspc node --to-desktop {prev,next} --focus | |
# Move window to left/right desktop | |
ctrl + alt + shift + {Left,Right} | |
bspc node --to-desktop {prev,next} --focus | |
# Focus selected desktop | |
super + {1-9,0} | |
bspc desktop --focus ^{1-9,10} | |
alt + {1-9,0} | |
bspc desktop --focus VGA1:^{1-9,10} | |
alt + shift {1-9,0} | |
bspc node --to-desktop VGA1:^{1-9,10} | |
# Focus left/right occupied desktop | |
ctrl + alt + {Left,Right} | |
bspc desktop --focus {prev,next}.occupied | |
# Increase/decrease window gap on focused desktop | |
super + bracket{left,right} | |
bspc config -d focused window_gap $((`bspc config -d focused window_gap` {-,+} 5 )) | |
# Focus when clicking | |
~button1 | |
bspc pointer --grab focus | |
# Move/resize windows | |
alt + button{1-3} | |
; bspc pointer --grab {move,resize_side,resize_corner} | |
# Ungrab when releasing a mouse button | |
alt + @button{1-3} | |
bspc pointer --ungrab | |
# | |
# wm independent hotkeys | |
# | |
# Launch rofi | |
# with .desktop files | |
super + d | |
rofi -show drun -show-icons -drun-icon-theme Marwaita | |
# with commands | |
super + t | |
rofi -show run | |
# with ssh | |
super + s | |
rofi -show ssh | |
# with window | |
super + w | |
rofi -show window | |
# Lock & sleep the system | |
super + Escape | |
$HOME/Scripts/bspexit suspend | |
super + alt + Escape | |
$HOME/Scripts/power_options | |
super + Insert | |
$HOME/.config/bspwm/bspwmrc | |
super + alt + Insert | |
pkill -USR1 -x sxhkd | |
# Launch terminal | |
super + Return | |
exec $TERMINAL | |
# Move floating window | |
super + alt + {_,shift + }{Left,Down,Up,Right} | |
$BSPWM_CONFIG/scripts/move-window {_,edge-}{west,south,north,east} | |
# Emulate i3's scratchpad | |
F12 | |
xdotool search --onlyvisible --classname scratchpad windowunmap \ | |
|| ( xdotool search --classname scratchpad windowmap; xdotool search --classname scratchpad windowraise; ) \ | |
|| ( urxvtc -name scratchpad -geometry 220x20+400+0; xdotool search --classname scratchpad windowraise; ) | |
# Raise volume | |
# note: also ensures audio is enabled | |
XF86AudioRaiseVolume | |
pactl set-sink-volume 0 +5% | |
# Lower volume | |
# note: intentionally does not unmute | |
XF86AudioLowerVolume | |
pactl set-sink-volume 0 -5% | |
# Mute audio | |
# note: mute always sets audio off (intentially no toggle) | |
XF86AudioMute | |
pactl set-sink-mute 0 toggle | |
XF86AudioPlay | |
mpc toggle | |
XF86AudioPrev | |
mpc prev | |
XF86AudioNext | |
mpc next | |
XF86AudioStop | |
mpc stop | |
super + p | |
$HOME/Scripts/mpd-play.sh | |
super + Print | |
$HOME/Scripts/img_upload | |
super + shift + F1 | |
$HOME/.config/polybar/launch.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment