diff --git a/.Xmodmap b/.config/X11/xmodmap similarity index 100% rename from .Xmodmap rename to .config/X11/xmodmap diff --git a/.Xresources b/.config/X11/xresources similarity index 100% rename from .Xresources rename to .config/X11/xresources diff --git a/.config/compton/launch.sh b/.config/compton/launch.sh index 968b680..21bfdb0 100755 --- a/.config/compton/launch.sh +++ b/.config/compton/launch.sh @@ -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 diff --git a/.config/i3/config b/.config/i3/config index bef494a..e8579ab 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -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 diff --git a/.config/locker b/.config/locker new file mode 120000 index 0000000..4e68e8d --- /dev/null +++ b/.config/locker @@ -0,0 +1 @@ +xsecurelock \ No newline at end of file diff --git a/.config/xsecurelock/launch.sh b/.config/xsecurelock/launch.sh new file mode 100755 index 0000000..8075fe9 --- /dev/null +++ b/.config/xsecurelock/launch.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +xss-lock -l "$(cd "$(dirname "$0")" && pwd -P)"/transfer-sleep-lock.sh & diff --git a/.xinitrc b/.xinitrc index 4cde49f..299af88 100644 --- a/.xinitrc +++ b/.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} + +# acts as 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 diff --git a/.zshenv b/.zshenv index eb38b70..1734f6c 100644 --- a/.zshenv +++ b/.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" diff --git a/meta/install.conf.yaml b/meta/install.conf.yaml index 7c9a788..84cfc3c 100644 --- a/meta/install.conf.yaml +++ b/meta/install.conf.yaml @@ -20,10 +20,6 @@ stdout: true stderr: true - link: - ~/.Xmodmap: - path: .Xmodmap - ~/.Xresources: - path: .Xresources ~/.xinitrc: path: .xinitrc ~/.zshenv: