bspwm
in my case i use
> pacman -S \
xorg-server \
xorg-xinit \
xorg-xrandr
pulseaudio \
pulsemixer \
bspwm \
sxhkd \
picom \
dmenu \
lxappearance \
brightnessctl \
upower \
xsecurelock \
x11-ssh-askpass \
feh \
tmux \
zsh \
htop \
mc \
xf86-video-amdgpu \
zsh-syntax-highlighting \
openssh \
urxvt \
rsync \
ranger
keepassxc
restic
ccid
opensc
pcsc-tools (systemctl enable pcscd)
libp11
mutt
nc
pcmanfm
urlview
edit /etc/systemd/system/lock.service
[Unit]
Description=Lock X session using xsecurelock
After=suspend.target
[Service]
Type=simple
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/%i/.Xauthority
ExecStart=/usr/sbin/xsecurelock
[Install]
WantedBy=suspend.target
.xinitrc
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# ssh agent
ssh-agent > ~/.ssh-agent
source ~/.ssh-agent
# terminal
[ -f $(which urxvt) ] && urxvt &
# start sxhkd in bg
sxhkd &
# run bspwm
exec bspwm
bspwmrc
#! /bin/sh
pgrep -x sxhkd > /dev/null || sxhkd &
sxhkd &
feh --bg-fill ~/docs/pictures/wallpaper/cat-roof.jpg &
setxkbmap de -option grp:alt_shift_toggle &
xss-lock -- xsecurelock &
picom &
xrandr \
--output DVI-D-0 --mode 1680x1050 --pos 0x0 --rotate normal --left-of HDMI-A-0 \
--output HDMI-A-0 --mode 2560x1080 --pos 720x2700 --rotate normal --preferred \
--output DisplayPort-0 --mode 1280x1024 --pos 2688x0 --rotate normal --right-of HDMI-A-0
bspc monitor DVI-D-0 -d I II III && \
bspc monitor HDMI-A-0 -d IV V VI && \
bspc monitor DisplayPort-0 -d VII VIII
bspc config border_width 0
bspc config window_gap 5
bspc config split_ratio 1
bspc config top_padding 0
bspc config borderless_monocle true
bspc config gapless_monocle true
.Xresources
URxvt.scrollBar: false
URxvt.font: xft:monospace:size=12
!URxvt.font: xft:adobe-source-code-pro:size=15
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
URxvt.keysym.Control-Meta-c: builtin-string:
URxvt.keysym.Control-Meta-v: builtin-string:
URxtv.perl-ext-common: default
URxvt-depth: 32
URxvt.internalBorder: 1
URxvt.foreground: Grey
!URxvt.lineSpace: -1
URxvt.letterSpace: -1
## jump words
URxvt.keysym.Control-Left: \033[1;5D
URxvt.keysym.Shift-Control-Left: \033[1;6D
URxvt.keysym.Control-Right: \033[1;5C
URxvt.keysym.Shift-Control-Right: \033[1;6C
URxvt.keysym.Control-Up: \033[1;5A
URxvt.keysym.Shift-Control-Up: \033[1;6A
URxvt.keysym.Control-Down: \033[1;5B
URxvt.keysym.Shift-Control-Down: \033[1;6B
## ==
URxvt.iso14755: false
URxvt.iso14755_52: false
! special
*.foreground: #c3e0dc
*.background: #040606
*.cursorColor: #c3e0dc
! black
*.color0: #080b0b
!*.color0: #57C8B1
*.color8: #f7a1b2
! red
!*.color1: #131817
!*.color1: #57C8B1
*.color1: #50FA7B
*.color9: #89beed
! green
!*.color2: #232a29
!*.color10: #bd9538
!*.color2: #50FA7B
*.color2: #57C8B1
*.color10: #5AF78E
! yellow
!*.color3: #394341
!*.color11: #eca9fa
*.color3: #F1FA8C
*.color11: #F4F99D
! blue
*.color4: #556260
!*.color12: #73d839
*.color12: #808080
! magenta
*.color5: #778986
*.color13: #cfa54c
! cyan
*.color6: #9eb6b2
*.color14: #fb95ab
! white
*.color7: #cbe9e4
*.color15: #21a1e6
sxhkdrc
# wm independent hotkeys
## == terminal
super + Return
urxvt
## == apps
super + @space
dmenu_run
## == wm & sxhkd reload config
super + Escape
bspc wm -r ; pkill -USR1 -x sxhkd
# bspwm hotkeys
# change DPs
ctrl + alt + Right
bspc monitor -f next
ctrl + alt + Left
bspc monitor -f prev
# brightnes
super + ü
brightnessctl s +20%
super + ä
brightnessctl s 20%-
## == xfce-terminal
super + r
flatpak run im.riot.Riot
## == xfce-terminal
super + v
virt-manager
## == xfce-terminal
super + x
xfce4-screenshoter
## == keepass
super + k
flatpak run org.keepassxc.KeePassXC
## == discord
super + d
flatpak run com.discordapp.Discord
## == geany
super + g
geany
### == thunar
super + t
thunar
## == browser // # flatpak run com.github.Eloston.UngoogledChromium
super + b
chromium
## == screenlock
super + l
xsecurelock
# Cycle desktops
#alt + ctrl + {Right,Down,Left,Up}
# .desktop {next,next,prev,prev}
# Cycle nodes
#shift + alt + {Right,Down,Left,Up}
# bspc node -f {next,next,prev,prev}.local
super + Up
bspc node @parent -R 90
super + Down
bspc node @parent -R 270
super + Right
bspc node @parent -R 180
super + Left
bspc node @parent -R 180
# quit/restart bspwm
super + alt + {q,r}
bspc {quit,wm -r}
# close and kill
super + {_,shift + }w
bspc node -{c,k}
# alternate between the tiled and monocle layout
super + m
bspc desktop -l next
# send the newest marked node to the newest preselected node
super + y
bspc node newest.marked.local -n newest.!automatic.local
# swap the current node and the biggest window
super + y
bspc node -s biggest.window
#
# state/flags
#
# set the window state
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
# set the node flags
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
#
# focus/swap
#
# focus the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# focus the next/previous window in the current desktop
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# focus the older or newer node in the focus history
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
#
# preselect
#
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize
#
# expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
09-09-2021