This commit is contained in:
kento2 2026-04-02 18:06:04 +02:00
parent f58a60b892
commit 8fe0ce856f
3 changed files with 4 additions and 153 deletions

View file

@ -1,74 +0,0 @@
#!/bin/sh
set -e
# determine where to place the log file
logfile="$HOME/.dkrc.log"
: > "$logfile"
border_width=5
border_outer_width=3
{
# 9 workspaces per monitor
dkcmd set numws=9
# default workspace '_' values used when allocating new workspaces
# can be applied to all existing workspaces when passed 'apply' after ws=_
dkcmd set ws=_ apply layout=tile master=1 stack=4 gap=6 msplit=0.55 ssplit=0.5
# focus windows when receiving activation and enable focus-follows-mouse
dkcmd set focus_open=true focus_urgent=true focus_mouse=true
# place clients at the tail and ignore size hints on tiled windows
dkcmd set tile_tohead=0 tile_hints=false
# minimum width/height for resizing, and minimum allowed on-screen when moving
dkcmd set win_minwh=50 win_minxy=10
# disable gaps and borders in single window layouts
dkcmd set smart_gap=true smart_border=true
# define mouse mod and move/resize buttons
dkcmd set mouse mod=super move=button1 resize=button3
# obey motif border hints on windows that draw their own (steam, easyeffects, etc.)
dkcmd set obey_motif=true
dkcmd set border width=$border_width outer_width=$border_outer_width \
colour \
focus='#fd0c0c' \
unfocus='#222222' \
urgent='#ee5555' \
outer_focus='#222222' \
outer_unfocus='#3030ef' \
outer_urgent='#222222'
dkcmd rule class="^(dooble|firefox|librewolf)$" ws=2
dkcmd rule class="^discord$" ws=6
dkcmd rule class="^spotify$" ws=8
dkcmd rule class="^(mpv|nsxiv)$" float=true
# define some terminals and allow them to be absorbed by spawned windows
dkcmd rule class="^(st|lxterminal|st-256color|urxvt|kitty|alacritty|xterm|xterm-256color)$" terminal=true
# set a window to never absorb other windows, like the xev event tester
dkcmd rule title="^Event Tester$" no_absorb=true
# focus window and workspace on opening
# dkcmd rule class="^firefox$" ws=1 focus=true
# apply current rule set to all existing windows (used mainly for WM restart)
dkcmd rule apply '*'
} >> "$logfile" 2>&1
# inform of any errors in a notification
if grep -q 'error:' "$logfile"; then
hash notify-send && notify-send -t 0 -u critical "dkrc has errors" \
"$(awk '/error:/ {sub(/^error: /, ""); gsub(/</, "\<"); print}' "$logfile")"
exit 1
fi
env | while read -r pair; do
turnstile-update-runit-env "$(cut -d= -f1 <<< "$pair")"
done

View file

@ -1,78 +0,0 @@
# launcher
super + d
dmenu_run
# terminal
super + shift + Return
lxterminal
# screenshot and selection capture
super + s
screenshot
super + Tab
dkcmd ws view last
# reload sxhkd
super + shift + x
pkill -USR1 -x sxhkd
# reload dkrc
super + shift + r
$HOME/.config/dk/dkrc
# quit dk
super + ctrl + shift + q
dkcmd exit
# restart dk
super + ctrl + shift + r
dkcmd restart
# focus next or previous window
super + {j,k}
dkcmd win focus {next,prev}
# swap window in master
super + Return
dkcmd win swap
# toggle fullscreen and fake fullscreen (enable manipulating fullscreen window)
{_,super + }F11
dkcmd win {full,fakefull}
# fullscreen
super + x
dkcmd win full
# toggle floating
super + shift + space
dkcmd win float
# resize master size
super + {h,l}
dkcmd set msplit={-,+}0.05
# view, send, or follow to a workspace (by number)
super + {_,shift + ,ctrl + }{1-9}
dkcmd ws {view,send,follow} {1-9}
# view, send, or follow to the next, previous, or last active monitor
super + {_,shift + ,ctrl + }{comma,period,backslash}
dkcmd mon {view,send,follow} {prev,next,last}
# change number of windows in master or first stack
super + {_,shift + }{c,v}
dkcmd set {master,stack} {+1,-1}
# volume keys
{XF86AudioRaiseVolume,XF86AudioLowerVolume}
vol {+,-}
{XF86AudioMute,XF86AudioMicMute}
vol {.,!}
# media keys
super + {y,less,greater}
playerctl {play-pause,previous,next}
# vim:ft=sxhkdrc

View file

@ -5,7 +5,7 @@ sticky yes
# Default font # Default font
fontname "Iosevka:pixelsize=14:bold" fontname "Iosevka:pixelsize=14:bold"
# Appearance # Appearance
borderwidth 2 borderwidth 2
color activeborder "#5294E2" color activeborder "#5294E2"
@ -28,6 +28,9 @@ vtile 50
# How many pixels a window gets moved by # How many pixels a window gets moved by
moveamount 20 moveamount 20
# Commands
command term /usr/bin/lxterminal
# Key bindings # Key bindings