From 9d420498374e670e38c524cd60ccbce6ad1f7158 Mon Sep 17 00:00:00 2001 From: odweta Date: Tue, 20 Oct 2026 18:24:33 +0200 Subject: [PATCH] update xinitrc and added natural scrolling and force dark GTK theming --- .xinitrc | 53 +++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 24 deletions(-) mode change 100644 => 100755 .xinitrc diff --git a/.xinitrc b/.xinitrc old mode 100644 new mode 100755 index de1bc9b..8fee79e --- a/.xinitrc +++ b/.xinitrc @@ -1,31 +1,36 @@ -dwmblocks & -xbindkeys & -picom & -xss-lock -l slock & -feh --bg-scale $HOME/Pictures/wallpapers/glados.jpg & -bluetoothctl power off & -setxkbmap -layout "us,cz" -variant ",qwerty" -option "grp:alt_shift_toggle" & +#!/bin/sh -export DISPLAY=:0 -export XAUTHORITY=/home/imp/.Xauthority - -xrandr --output DP-2-1 --off -sleep 2 +# GTK Theming +export GTK_THEME=Adwaita:dark +# Set up monitors. Confirm these names with: xrandr --query xrandr \ - --output eDP-1 \ - --mode 1920x1080 \ - --rate 60 \ - --pos 0x0 \ - --primary \ - --output DP-2-1 \ - --mode 1920x1080 \ - --rate 60 \ - --pos 0x0 \ - --same-as eDP-1 + --output eDP-1 --mode 1920x1080 --rate 60 --primary \ + --output DP-2-1 --mode 1920x1080 --same-as eDP-1 -xset dpms force on +# 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 -systemctl --user restart wireplumber pipewire pipewire-pulse; pkill -RTMIN+2 dwmblocks +# Restart audio services before starting the status bar +systemctl --user restart wireplumber pipewire pipewire-pulse;pkill -RTMIN+2 dwmblocks