Add BSPWM config, clean dont't use configs

This commit is contained in:
Smirnov Olexandr 2021-01-22 11:27:54 +02:00
parent ed62788b9e
commit 246dc34d13
28 changed files with 303 additions and 727 deletions

4
config/bspwm/bar.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
polybar -c ~/.config/bspwm/polybar bar&

49
config/bspwm/bspwmrc Executable file
View file

@ -0,0 +1,49 @@
#!/bin/sh
# Smirnov-O <ss2316544@gmail.com>
# BSPWM config file
## == Functions
Run() {
if ! pgrep $1; then $@& fi
}
## == Autostart
setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" &
Run sxhkd -c .config/bspwm/sxhkd &
~/.config/bspwm/bar.sh &
Run nitrogen --restore &
Run lxsession &
Run picom &
## == BSPWM
bspc monitor -d 1 2 3 4 5 6 7 8 9
bspc config border_width 2
bspc config window_gap 8
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config click_to_focus true
bspc config single_monocle false
bspc config borderless_monocle true
# Colors
bspc config normal_border_color "#262A2B"
bspc config active_border_color "#1F2324"
bspc config focused_border_color "#008DCD"
bspc config presel_feedback_color "#51AFEF"
bspc config urgent_border_color "#FF6C6B"
# Rules
bspc rule -a Alacritty desktop='^1' focus=on follow=on
bspc rule -a firefox desktop='^2' focus=on
bspc rule -a VSCodium desktop='^3' focus=on follow=on
bspc rule -a '*:nvim' desktop='^3' focus=on follow=on
bspc rule -a '*:ranger' desktop='^4' focus=on follow=on
bspc rule -a Thunar desktop='^4' focus=on follow=on
bspc rule -a Joplin desktop='^5' focus=on
bspc rule -a discord descord='^6' focus=on
bspc rule -a TelegramDesktop descord='^6' focus=on
bspc rule -a Spotify descord='^9' focus=on
bspc rule -a google-tasks-desktop state=floating

99
config/bspwm/polybar Normal file
View file

@ -0,0 +1,99 @@
[settings]
enable-ipc = true
screenchange-reload = true
pseudo-transparency = true
[colors]
background = #262A2B
foreground = #DFDFDF
secondary = #008DCD
alert = #FF6C6B
[bar/bar]
width = 100%
height = 24
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
wm-restack = bspwm
module-margin-left = 1
module-margin-right = 1
font-0 = Iosevka Nerd Font:style=Medium:size=8;3
font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5
modules-left = windowname
modules-center = bspwm
modules-right = pulseaudio archupd wifi-signal weather memory cpu keyboard time date
tray-position = right
[module/bspwm]
type = internal/bspwm
pin-workspaces = true
enable-click = true
fuzzy-match = true
enable-scroll = true
label-focused = 
label-focused-foreground = ${colors.secondary}
label-focused-padding = 2
label-occupied = 
label-occupied-foreground = ${colors.foreground}
label-occupied-padding = 2
label-urgent = 
label-urgent-foreground = ${colors.alert}
label-urgent-padding = 2
label-empty = 
label-empty-foreground = #58676C74
label-empty-padding = 2
[module/pulseaudio]
type = internal/pulseaudio
interval = 2
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 
ramp-volume-0 = 
[module/weather]
type = custom/script
exec = python3 ~/.config/polybar/scripts/weather.py
interval = 60
[module/archupd]
type = custom/script
exec = ~/.config/polybar/scripts/updates-pacman-aur.sh
interval = 60
[module/keyboard]
type = internal/xkeyboard
format-prefix = ""
label-layout =  %layout%
blacklist-0 = num lock
blacklist-1 = scroll lock
blacklist-2= caps lock
[module/cpu]
type = internal/cpu
format-prefix = " "
interval = 2
[module/memory]
type = internal/memory
interval = 2
label = %percentage_used%%
format-prefix = " "
[module/windowname]
type = internal/xwindow
label = %title%
label-maxlen = 90
[module/date]
type = internal/date
interval = 600
date = %d.%m.%Y
label =  %date%
[module/time]
type = internal/date
time = %H:%M
label =  %time%

BIN
config/bspwm/screen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

91
config/bspwm/sxhkd Normal file
View file

@ -0,0 +1,91 @@
# Smirnov-O <ss2316544@gmail.com>
# BSPWM/SXKBD config file
## == USER keys
super + Return
alacritty
super + shift + w
firefox
super + shift + f
alacritty --class="ranger" -e ranger
super + shift + e
alacritty --class="nvim" -e nvim
super + shift + c
vscodium
super + shift + d
org.zealdocs.Zeal
super + shift + q
xkill
## == USER Menus
super + shift + Return
rofi -location 2 -show drun
super + Escape
~/.script/dmenu/dmenu-power.sh
super + ctrl + i
passmenu -h 24 -p Passwords
super + ctrl + u
~/.script/dmenu/dmenu-config-edit.sh
## == BSPWM keys
super + q
bspc node -{c,k}
super + control + r
bspc wm -r && pkill -USR1 -x sxhkd
## == BSPWM windows
## Resize window
super + ctrl + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# Resize floating window
#super + shift + {h,j,k,l}
# bspc node -v {-20 0,0 20,0 -20,20 0}
# Change focus & move focus window
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# Change focus window
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
# Preselect the direction
super + alt + {h,j,k,l}
bspc node -p {west,south,north,east}
# Preselect the ratio
super + alt + {1-9}
bspc node -o 0.{1-9}
# Cancel the preselection
super + ctrl + space
bspc node -p cancel
## == BSPWM workspace
## Next/Prev workspace
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# Change WP & send window to WP
super + {_,shift + }{1-9}
bspc {desktop -f,node -d} focused:'^{1-9}'
## == BSPWM windwo layouts
# Set window layouts for specific window
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
# Change windows layout
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}