ТОТАЛНИ ДЕФЕКТИ

Философия на безкрайността, чудесата и политическата мода

ПОРЪЧАЙ ТУК

или търси в книжарниците!

dwm

Обновена на: March 24, 2022

Multi monitor:
xrandr –output VGA-0 –auto –right-of DVI-0

Xinerama:
apt install libx11-dev libxinerama-dev libxft-devel

Layouts on scroll lock:
setxkbmap -layout us,bg -variant ,phonetic -option grp:sclk_toggle

stuff:
https://srobb.net/dwm.html

make hyper and keybindings?
https://github.com/ericpruitt/edge/blob/master/dwm-config.h

can’t compile because freetype?
ln -s /usr/include/freetype2/ft2build.h /usr/include/

status bar primer:
xsetroot -name “$(cat /sys/class/power_supply/BAT0/status): $(cat /sys/class/power_supply/BAT0/capacity)% $(find /sys -name “link_mode” 2> /dev/null | awk -F/ ‘{printf $(NF-1)”: “; system(“cat ” $0);}’ | head -2 | xargs echo -n) $(date ‘+%a, the %d of %b %H:%M’)”& sleep 60

To have dwm restart itself automatically when the binary changes. Restarting dwm doesn’t close apps or log you out (make ~/bin/dwm-start and run it AT THE BOTTOM of your .xinirc):

#!/bin/sh
csum=$(sha1sum $(which dwm))
new_csum=””
while true
do
if [ “$csum” != “$new_csum” ]
then
csum=$new_csum
dwm
else
exit 0
fi
new_csum=$(sha1sum $(which dwm))
sleep 0.5
done

my .xinitrc

 

 

while true; do dwm-xsetroot; done &
xrandr –output VGA-0 –auto –right-of DVI-0 &
setxkbmap -layout us,bg -variant ,phonetic -option grp:sclk_toggle &
compton -bcCGf -i 0.6 -e 0.8 –inactive-dim 2 –focus-exclude “x = 0 && y = 0” –backend glx –vsync opengl-swc –paint-on-overlay &
sh -c ‘while true; do xfce4-clipman; done’ &
feh –bg-tile ~/Pictures/tile1.jpg &
xset b off &
xmodmap -e “keycode 108 = Super_L” -e “remove mod1 = Super_L”
xmodmap -e “keycode 108 = Super_L” -e “remove mod1 = Super_L”

case “$1” in
awesome) awesome;;
dwm) /home/dach/bin/dwm-start;;
xfce) exec startxfce4;;
i3) i3;;
*) /home/dach/bin/dwm-start;;
esac

Remap Alt_R to Mod3 and use that, to have left Super and Alt free (in xinit)
xmodmap -e “remove mod1 = Alt_R” -e “add mod3 = Alt_R”

https://github.com/drdaffey/dwm

Nice xsetroot script with a FIFO and variable sleep times:
https://github.com/jsphsnkr/bin/blob/master/dwmstatus

#!/bin/sh
_fifo=/tmp/status.fifo
test -e “$_fifo” && rm “$_fifo”
mkfifo “$_fifo”

while :;do
echo “O$(date)”
sleep 1s;
done > “$_fifo” &

while :;do
echo “F$(date +%S)”;
sleep 5s;
done > “$_fifo” &

cat “$_fifo” | while read line; do
case $line in
O*) clock=${line#?};;
F*) next=${line#?};;
esac
xsetroot -name ” $next $clock “;
done