Files
suckless/.xinitrc
T
2026-11-05 15:20:33 +01:00

42 lines
1.1 KiB
Bash

#!/bin/sh
# Start a D-Bus session if one is not already available
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
exec dbus-run-session -- "$0" "$@"
fi
# GTK Theming
export GTK_THEME=Adwaita:dark
# Set up monitors. Confirm these names with: xrandr --query
xrandr \
--output eDP-1 --mode 1920x1080 --rate 60 --primary \
--output DP-2-1 --mode 1920x1080 --same-as eDP-1
# Set the keyboard layouts
setxkbmap -layout "us,cz" -variant ",qwerty" -option "grp:alt_shift_toggle"
# Natural scrolling for the touchpad (requires xinput and the libinput driver)
xinput list --name-only | while IFS= read -r device; do
case "$device" in
*[Tt]ouch[Pp]ad*)
xinput set-prop "$device" "libinput Natural Scrolling Enabled" 1 2>/dev/null
;;
esac
done
# Start desktop services
bluetoothctl power off &
picom &
xbindkeys &
xss-lock -l slock &
feh --bg-scale "$HOME/Obrázky/wallpapers/glados.jpg" &
dwmblocks &
# ~~Keep this last: it replaces the script with dwm~~
exec dwm
# Restart audio services before starting the status bar
systemctl --user restart wireplumber pipewire pipewire-pulse;pkill -RTMIN+2 dwmblocks