.
This commit is contained in:
parent
3030258b6e
commit
4355e83743
6 changed files with 326 additions and 69 deletions
147
README.txt
147
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/<project>.
|
||||||
|
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 <username> --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
|
TODO
|
||||||
----
|
----
|
||||||
|
|
||||||
* change shell to /bin/zsh
|
|
||||||
|
|
||||||
* pass/otp setup
|
* pass/otp setup
|
||||||
* mblaze
|
* backups
|
||||||
* noise suppression
|
* some MUA, mblaze?
|
||||||
* custom plumber
|
* noise suppression, rnnoise, maybe use pipewire
|
||||||
* cgo config to always use plumber
|
* cupload script
|
||||||
* automatic backups with borg + script
|
* set user dirs + delete redundant
|
||||||
* cupload <<< file
|
|
||||||
* user dirs cleanup
|
|
||||||
* platinum9/nineicons for icons
|
* platinum9/nineicons for icons
|
||||||
|
|
||||||
requirements
|
|
||||||
------------
|
|
||||||
|
|
||||||
packages from ./pkgs.txt, use `xbps-install -y $(<pkgs.txt)`.
|
|
||||||
install michaelforney's velox, see self-compiled packages.
|
|
||||||
|
|
||||||
limitations
|
|
||||||
-----------
|
|
||||||
|
|
||||||
* no noise suppression(rnnoise would be good)
|
|
||||||
|
|
||||||
Guides
|
|
||||||
======
|
|
||||||
|
|
||||||
dbus
|
|
||||||
----
|
|
||||||
dbus is not provided by default, to use it:
|
|
||||||
|
|
||||||
install dbus, enable the service,
|
|
||||||
use `exec dbus-run-session swc-launch velox` in ~/.profile
|
|
||||||
|
|
||||||
|
|
||||||
self-compiled packages
|
|
||||||
----------------------
|
|
||||||
recommended: meh dwm cgo(see dl.kentoj.de/patches/cgo-*)
|
|
||||||
|
|
||||||
mkdir ~/pkg
|
|
||||||
clone all sources to ~/pkg,
|
|
||||||
~/pkg/* should have a Makefile with:
|
|
||||||
* build: compile
|
|
||||||
* install: install to /usr/local
|
|
||||||
* uninstall: uninstall from /usr/local
|
|
||||||
|
|
||||||
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 the conf file:
|
|
||||||
GETTY_ARGS="--autologin <username> --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
|
|
||||||
|
|
||||||
restart or simply:
|
|
||||||
rmmod pcspkr
|
|
||||||
|
|
|
||||||
2
add.sh
2
add.sh
|
|
@ -14,7 +14,7 @@ for arg in $@; do
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
cp -v "$arg" "${arg}.bak"
|
cp -rv "$arg" "${arg}.bak"
|
||||||
mkdir -vp "files/$(dirname "$file")"
|
mkdir -vp "files/$(dirname "$file")"
|
||||||
mv -iv "$arg" "files/$file"
|
mv -iv "$arg" "files/$file"
|
||||||
ln -vfs "$(realpath "files/$file")" "$arg"
|
ln -vfs "$(realpath "files/$file")" "$arg"
|
||||||
|
|
|
||||||
173
files/.config/dk/dkrc
Executable file
173
files/.config/dk/dkrc
Executable file
|
|
@ -0,0 +1,173 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# example dkrc to provide a close-to-default setup and
|
||||||
|
# show some basic command usage with error reporting
|
||||||
|
|
||||||
|
# determine where to place the log file
|
||||||
|
logfile="$HOME/.dkrc.log"
|
||||||
|
[ -d "$HOME/.local/share/xorg" ] && logfile="$HOME/.local/share/xorg/dkrc.log"
|
||||||
|
: > "$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(/</, "\<"); print}' "$logfile")"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
69
files/.config/dk/sxhkdrc
Normal file
69
files/.config/dk/sxhkdrc
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
# launcher
|
||||||
|
super + d
|
||||||
|
dmenu_run
|
||||||
|
|
||||||
|
# terminal
|
||||||
|
super + shift + Return
|
||||||
|
lxterminal
|
||||||
|
|
||||||
|
# screenshot and selection capture
|
||||||
|
super + s
|
||||||
|
screenshot
|
||||||
|
|
||||||
|
# dedicated volume keys
|
||||||
|
{XF86AudioRaiseVolume,XF86AudioLowerVolume}
|
||||||
|
pamixer {-i,-d} 2
|
||||||
|
|
||||||
|
# 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}
|
||||||
|
|
||||||
|
# close window
|
||||||
|
super + shift + d
|
||||||
|
dkcmd win kill
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# 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}
|
||||||
|
|
||||||
|
# vim:ft=sxhkdrc
|
||||||
Binary file not shown.
|
|
@ -1,3 +1,3 @@
|
||||||
sct 2500 &
|
sct 2500 &
|
||||||
setxkbmap de &
|
setxkbmap de &
|
||||||
exec dwm
|
exec dbus-run-session dk
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue