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:
@@ -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
|
||||
|
||||
@@ -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
1
.config/locker
Symbolic link
@@ -0,0 +1 @@
|
||||
xsecurelock
|
||||
3
.config/xsecurelock/launch.sh
Executable file
3
.config/xsecurelock/launch.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
xss-lock -l "$(cd "$(dirname "$0")" && pwd -P)"/transfer-sleep-lock.sh &
|
||||
57
.xinitrc
57
.xinitrc
@@ -1,23 +1,64 @@
|
||||
#!/bin/sh
|
||||
|
||||
sysresources=/etc/X11/xinit/.Xresources
|
||||
userresources="${XDG_CONFIG_HOME:-$HOME/.config}"/X11/xresources
|
||||
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||
userresources="$HOME"/.Xresources
|
||||
usermodmap="$HOME"/.Xmodmap
|
||||
usermodmap="${XDG_CONFIG_HOME:-$HOME/.config}"/X11/xmodmap
|
||||
sysxinitrcd=/etc/X11/xinit/xinitrc.d
|
||||
userxinitrcd="${XDG_CONFIG_HOME:-$HOME/.config}"/X11/xinitrc.d
|
||||
|
||||
[ ! -f "$sysresources" ] || xrdb -merge "$sysresources"
|
||||
[ ! -f "$sysmodmap" ] || xmodmap "$sysmodmap"
|
||||
|
||||
[ ! -f "$userresources" ] || xrdb -merge "$userresources"
|
||||
|
||||
[ ! -f "$sysmodmap" ] || xmodmap "$sysmodmap"
|
||||
[ ! -f "$usermodmap" ] || xmodmap "$usermodmap"
|
||||
|
||||
unset {sys,user}{resources,modmap}
|
||||
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
||||
if [ -d "$sysxinitrcd" ] ; then
|
||||
for f in "$sysxinitrcd"/?*.sh ; do
|
||||
[ ! -x "$f" ] || . "$f"
|
||||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
if [ -d "$userxinitrcd" ] ; then
|
||||
for f in "$userxinitrcd"/?*.sh ; do
|
||||
[ ! -x "$f" ] || . "$f"
|
||||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
unset {sys,user}{resources,modmap,xinitrcd}
|
||||
|
||||
# <right-CTRL> acts as <ESC> when pressed alone and shortly.
|
||||
xcape -t 250 -e 'Control_R=Escape'
|
||||
# Key repeat rate
|
||||
xset r rate 500 25
|
||||
|
||||
touchpad="DLL082A:01 06CB:76AF Touchpad"
|
||||
xinput set-prop "$touchpad" "libinput Tapping Enabled" 1
|
||||
xinput set-prop "$touchpad" "libinput Natural Scrolling Enabled" 1
|
||||
xinput set-prop "$touchpad" "libinput Accel Speed" 0.45
|
||||
unset touchpad
|
||||
|
||||
# Muted at startup
|
||||
amixer -q -D pulse sset Master mute
|
||||
|
||||
# SSH
|
||||
eval $(ssh-agent)
|
||||
|
||||
# Compositor
|
||||
compositor="${XDG_CONFIG_HOME:-$HOME/.config}"/compositor/launch.sh
|
||||
[ ! -x "$compositor" ] || "$compositor"
|
||||
unset compositor
|
||||
|
||||
# Wallpaper
|
||||
wallpaper="$HOME"/pics/wallpapers/wallpaper
|
||||
feh --bg-scale --no-fehbg "$wallpaper"
|
||||
unset wallpaper
|
||||
|
||||
# Locker
|
||||
locker="${XDG_CONFIG_HOME:-$HOME/.config}"/locker/launch.sh
|
||||
[ ! -x "$locker" ] || "$locker"
|
||||
unset locker
|
||||
|
||||
exec i3
|
||||
|
||||
4
.zshenv
4
.zshenv
@@ -3,10 +3,6 @@
|
||||
|
||||
setopt NO_GLOBAL_RCS
|
||||
|
||||
if [ -n "$DESKTOP_SESSION" ] && [ -e /run/user/1000/keyring/ssh ]; then
|
||||
export SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
|
||||
fi
|
||||
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
|
||||
@@ -20,10 +20,6 @@
|
||||
stdout: true
|
||||
stderr: true
|
||||
- link:
|
||||
~/.Xmodmap:
|
||||
path: .Xmodmap
|
||||
~/.Xresources:
|
||||
path: .Xresources
|
||||
~/.xinitrc:
|
||||
path: .xinitrc
|
||||
~/.zshenv:
|
||||
|
||||
Reference in New Issue
Block a user