From 4355e83743d0426d2960ba7a71d8d5f2a02041d2 Mon Sep 17 00:00:00 2001 From: kento2 Date: Sat, 31 Jan 2026 12:19:05 +0100 Subject: [PATCH] . --- README.txt | 147 ++++++++++++++------------ add.sh | 2 +- files/.config/dk/dkrc | 173 +++++++++++++++++++++++++++++++ files/.config/dk/sxhkdrc | 69 ++++++++++++ files/.dooble/dooble_settings.db | Bin 36864 -> 36864 bytes files/.xinitrc | 4 +- 6 files changed, 326 insertions(+), 69 deletions(-) create mode 100755 files/.config/dk/dkrc create mode 100644 files/.config/dk/sxhkdrc diff --git a/README.txt b/README.txt index dd97648..2bba41f 100644 --- a/README.txt +++ b/README.txt @@ -1,71 +1,86 @@ +SETUP +----- + +do it in the order: BASICS, (if using laptop) POWER MANAGEMENT, SERVICES + +* SETUP + ----- + + $ xbps-install -Su xbps + $ xbps-install xtools + $ xi git make lr + $ xi tlp # if using laptop (for power management) + $ git clone git://kentoj.de/d.git ~/dots + $ cd ~/dots + $ xi $(cat pkgs.txt) + $ make + $ chsh -s /bin/zsh + $ su -c "echo 'permit nopass keepenv :wheel' > /etc/doas.conf" + +* POWER MANAGEMENT + ---------------- + + my /etc/tlp.conf: + # Battery charge level below which charging will begin. + START_CHARGE_THRESH_BAT0=75 + # Battery charge level above which charging will stop. + STOP_CHARGE_THRESH_BAT0=80 + +* SERVICES + -------- + + run the following command to register the services: + $ for sv in dbus tlp socklog-unix turnstiled; do + doas ln -vs "/etc/sv/$sv" /var/service + done + it will fail for `tlp` if you skipped the POWER MANAGEMENT section but that's + fine. + +knowledge +--------- + +* recommended packages + -------------------- + + - tlp for power management + - meh for image viewing (not packaged) + - dooble for browser + +* non-packaged packages + --------------------- + + keep source in ~/opt/. + have a makefile with an install and uninstall target in each + directory. + +* autologin voidlinux tty1 to x11 + ------------------------------- + you can do this if u want: + $ cp /etc/sv + $ cp -r agetty-tty1 agetty-autologin-tty1 + (naming is important) + + in /etc/sv/agetty-autologin-tty1/conf: + GETTY_ARGS="--autologin --noclear" + BAUD_RATE=38400 + TERM_NAME=linux + + now enable the service and disable the agetty-tty1 service. + +* no beep + ------- + + /etc/modprobe.d/no-beep.conf: + blacklist pcspkr + $ rmmod pcspkr + TODO ---- -* change shell to /bin/zsh - * pass/otp setup -* mblaze -* noise suppression -* custom plumber -* cgo config to always use plumber -* automatic backups with borg + script -* cupload <<< file -* user dirs cleanup +* backups +* some MUA, mblaze? +* noise suppression, rnnoise, maybe use pipewire +* cupload script +* set user dirs + delete redundant * platinum9/nineicons for icons - -requirements ------------- - -packages from ./pkgs.txt, use `xbps-install -y $( "$logfile" + +# load sxhkd for keybinds +pgrep sxhkd || sxhkd -c "$HOME/.config/dk/sxhkdrc" & + +# spawn a scratchpad terminal if not already (see sxhkdrc and rules for binds/setup) +# pgrep -f "st -c scratchpad" || st -c scratchpad & + +# adjust border widths based on the DPI of the monitor +px=$(xrandr | grep ' connected' | tail -n1 | grep -o '[0-9]\+x[0-9]\+' | cut -d'x' -f2) +mm=$(xrandr | grep ' connected' | tail -n1 | grep -o '[0-9]\+mm' | tail -n1 | sed 's/mm//') +dpi=$(( (px / mm) * 25 )) + +if [ $dpi -ge 140 ]; then + border_width=5 + border_outer_width=3 +elif [ $dpi -ge 120 ]; then + border_width=4 + border_outer_width=2 +else + border_width=2 + border_outer_width=1 +fi + +{ # compound command to redirect all output + + # workspace settings + # ------------------------ + + # initialize 6 workspaces (1-6) (default: 1/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=3 gap=0 msplit=0.55 ssplit=0.5 + + # use grid layout, padding, and gaps on last workspace + #dkcmd set ws=6 layout=grid pad left=200 right=200 top=100 bottom=100 gap=50 + + # change workspace names (default: number == name -> 1:1, 2:2, 3:3....) + # dkcmd set \ + # ws=1 name="edit" \ + # ws=2 name="web" \ + # ws=3 name="😀" \ + # ws=4 name="😠" \ + # ws=5 name="5" \ + # ws=6 name="6" \ + + # enable static workspaces assigned to monitors (relevant for multiple monitors) + # aside - + # If you come from this workspace model, try embracing the default behaviour + # and access to all workspaces from any monitor, you might end up liking it :) + # + # this could be done in the names section above if being used + # + # mon1='DisplayPort-0' + # mon2='HDMI-A-0' + # dkcmd set static_ws=true \ + # ws=1 mon=$mon1 \ + # ws=2 mon=$mon1 \ + # ws=3 mon=$mon1 \ + # ws=4 mon=$mon2 \ + # ws=5 mon=$mon2 \ + # ws=6 mon=$mon2 \ + + + # global settings + # --------------------- + + # 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=alt move=button1 resize=button3 + + # obey motif border hints on windows that draw their own (steam, easyeffects, etc.) + dkcmd set obey_motif=true + + + # borders + # --------- + + # traditional + # set border width and colour for each window state + # dkcmd set border width=$border_width colour focus='#6699cc' unfocus='#000000' urgent='#ee5555' + + # alternative + # enable split borders and colours, width is overall width, outer_width consumes some of width. + # outer_width must be less than width, outer_width of 0 will be single borders + dkcmd set border width=$border_width outer_width=$border_outer_width \ + colour \ + focus='#6699cc' \ + unfocus='#444444' \ + urgent='#ee5555' \ + outer_focus='#222222' \ + outer_unfocus='#222222' \ + outer_urgent='#222222' + + + # window rules + # -------------- + + # rule class, instance, and title regex are *always* case INSENSITIVE + + # open window(s) on a specific workspace (assigned monitor) + # dkcmd rule class="^gimp$" ws=2 + + # open window(s) on a monitor by number or name (active workspace on monitor) + # dkcmd rule class="^chromium$" mon="HDMI-A-0" + + # open window(s) and use a callback function (user defined in config.h) + # we also ignore_cfg=true to stop the window from being resized on it's own from events + # eg. mpv --x11-name=albumart /path/to/media + # dkcmd rule class="^mpv$" instance="^albumart$" float=true ignore_cfg=true callback=albumart bw=0 + + # open window(s) in a floating state + dkcmd rule class="^(pavucontrol|transmission-gtk|steam|lxappearance)$" float=true + + # open window(s) with a specific geometry and coordinates (floating only!) + # dkcmd rule class="^google-chrome$" title="^open files$" float=true w=1280 h=720 + + # open window(s) with ignore_msg=true to avoid focus being grabbed and changing workspace + # dkcmd rule class="^TelegramDesktop$" ignore_msg=true + + # define some terminals and allow them to be absorbed by spawned windows + dkcmd rule class="^(st|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 + + # send a window to the scratchpad + dkcmd rule class="^scratchpad$" scratch=true + + # focus window and workspace on opening + # dkcmd rule class="^firefox$" ws=1 focus=true + + # update or remove an existing rule with the same match patterns + # dkcmd rule class="^firefox$" mon="HDMI-A-0" + # dkcmd rule remove class="^firefox$" + + # apply current rule set to all existing windows (used mainly for WM restart) + dkcmd rule apply '*' + + # delete all rules + # dkcmd rule remove '*' + +} >> "$logfile" 2>&1 # append responses + +# 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(/BRY!Cprat5<9F`9H@nS< z;|$buGr75Y-sksy=R4&e+JunlVvaMJ%q=F9$qv88%K{Jd zw|JrAL*u{DM$ZS|aC=`j*__=b&kf$&-Tj^x*P`n+XSZux<9aNI5nu!u0Y-okU<4Qe zMt~7`2M}1&tyX^|f=+0F6QIC}tj<9378L9_IE%4|j38Dx@`8fW!Wo8d(tJtXSPl$CRzfpNt@rl#YwXw4*Y- zFz`ZFSB%em<2mr5#(DOuS6Tg?ooFdgiL!=Y@ncgxXvIvfeT9kFo6=xYlYgRfg(($# zD9xjoU|kZh)qms&I^nAv{guLkpv6=vqw}+}5}V^QN+z4(#bYrsqf1JgXC1Q-EEfDvE>7y(9r5nu!u z0Y-okU<4R}vz35@PK>?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