X11: Move pieces from i3 and zshenv into xinitrc

Move everything that is desirable independent of the WM or shell into
xinitrc.
Move .Xresources and .Xmodmap into .config/X11.
Remove all unneeded GNOME bits from i3 config.
Make compositor launch script portable.
Add locker symlink and launch.sh similar to the compositor.
This commit is contained in:
2020-10-31 22:33:26 +01:00
parent feec02e267
commit 08c5c66e1e
9 changed files with 67 additions and 66 deletions

16
.config/X11/xmodmap Normal file
View File

@@ -0,0 +1,16 @@
! Bind Caps_Lock on Escape key, Ctrl_R on Caps_Lock key and Escape on Control_R
! The Caps_Lock key is also used for Escape through xcape
remove Control = Control_R
remove Lock = Caps_Lock
keycode 9 =
keycode 9 = Caps_Lock
keycode 66 =
keycode 66 = Control_R
keycode 105 =
keycode 105 = Escape
add Control = Control_R
add Lock = Caps_Lock

3
.config/X11/xresources Normal file
View File

@@ -0,0 +1,3 @@
Xft.dpi: 150
*.font: MesloLGS NF:style=Regular:pixelsize=24:antialias=true:autohint=true
*.alpha: 0.77

View File

@@ -1,7 +1,10 @@
#!/bin/sh
basedir="$(cd "$(dirname "$0")" && pwd -P)"
compositor="$(basename "$basedir")"
if [ "$1" = "-k" ]; then
killall -q compton
elif ! pgrep -ax compton >/dev/null 2>&1; then
compton --config "${XDG_CONFIG_HOME:-$HOME/.config}/compton/compton.conf" -b
killall -q "$compositor"
elif ! pgrep -ax "$compositor" >/dev/null 2>&1; then
"$compositor" --config "$basedir/$compositor".conf -b
fi

View File

@@ -13,6 +13,14 @@ hide_edge_borders smart
set $TERMINAL st
# Focus should not follow mouse
# focus_follows_mouse no
# Execs ########################################################################
# Multi monitor support
exec_always --no-startup-id ~/.config/i3/monitor-setup.sh &
# Keybindins ###################################################################
# Terminal
@@ -181,51 +189,4 @@ bindsym --release $mod+Print exec gnome-screenshot -a
# Zoom links in private browser
bindsym $mod+z exec ~/.local/bin/zoom-links
# Setup different stuff ########################################################
# Multi monitor support
exec_always --no-startup-id ~/.config/i3/monitor-setup.sh &
# Start locker
exec --no-startup-id xss-lock -l ~/.config/xsecurelock/transfer-sleep-lock.sh &
# Compositor for transparency and blur
exec --no-startup-id ~/.config/compositor/launch.sh
# Touchpad configuration
# Find touchpad: `xinput list`
# Find options: `xinput list-props $touchpad`
set $touchpad DLL082A:01 06CB:76AF Touchpad
exec xinput set-prop "$touchpad" "libinput Tapping Enabled" 1
exec xinput set-prop "$touchpad" "libinput Natural Scrolling Enabled" 1
exec xinput set-prop "$touchpad" "libinput Accel Speed" 0.45
# Keyboard Setup
# German layout without dead keys
exec setxkbmap de nodeadkeys -option
# Custom keymap (switches escape, control_r and caps_lock around)
exec xmodmap ~/.Xmodmap
# Control_R act as Escape when pressed alone and shortly
exec xcape -t 250 -e 'Control_R=Escape'
# Faster key repeat rate
exec xset r rate 500 25
# Muted at startup
exec amixer -q -D pulse sset Master mute
# Wallpaper
exec_always feh --bg-scale --no-fehbg ~/Pictures/Wallpapers/wallpaper
# Restore GNOME's settings
exec --no-startup-id /usr/libexec/gnome-settings-daemon-localeexec
# Fix a bug in gnome-settings-daemon: http://feeding.cloud.geek.nz/posts/creating-a-modern-tiling-desktop-environment-using-i3/
exec --no-startup-id dconf write /org/gnome/settings-daemon/plugins/cursor/active false
# Launch gnome-keyring
exec --no-startup-id gnome-keyring-daemon --start
# Focus should not follow mouse
# This is sometimes useful when picking colors on the screen in combination with deactivated dim
# focus_follows_mouse no
# vim: ft=i3

1
.config/locker Symbolic link
View File

@@ -0,0 +1 @@
xsecurelock

3
.config/xsecurelock/launch.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
xss-lock -l "$(cd "$(dirname "$0")" && pwd -P)"/transfer-sleep-lock.sh &