diff --git a/.bash_profile b/.bash_profile index 94d4e80..88fe911 100644 --- a/.bash_profile +++ b/.bash_profile @@ -4,6 +4,21 @@ [[ -f ~/.bashrc ]] && . ~/.bashrc +export XSECURELOCK_SAVER=saver_xscreensaver +export XSECURELOCK_PASSWORD_PROMPT=time_hex +export XSECURELOCK_XSCREENSAVER_PATH="/usr/lib/xscreensaver" +export XSECURELOCK_SHOW_KEYBOARD_LAYOUT=0 +export XSECURELOCK_AUTH_BACKGROUND_COLOR="#2E3440" +export XSECURELOCK_AUTH_FOREGROUND_COLOR="#D8DEE9" +export XSECURELOCK_AUTH_SOUNDS=1 +export XSECURELOCK_DIM_COLOR="#2E3440" +export XSECURELOCK_NO_COMPOSITE=1 + +xset s 300 5 +xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock & +pactl set-default-sink xrdp-sink +picom --animations --no-fading-openclose -b + #if [ -z "${DISPLAY}"] && [ "${XDG_VTNR}" == 1 ]; then if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then exec startx diff --git a/.config/fish/config.fish b/.config/fish/config.fish index f4d4d79..bd36499 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,26 +1,52 @@ +#!/usr/bin/env fish # Exports set --export EDITOR "vim" set --export PF_INFO "ascii title os host kernel uptime pkgs memory wm shell editor palette" set --export MANPAGER "sh -c 'col -bx | bat -l man -p'" set --export QT_QPA_PLATFORMTHEME "gtk2" +set --export XSECURELOCK_SAVER saver_xscreensaver +set --export XSECURELOCK_PASSWORD_PROMPT time_hex +set --export XSECURELOCK_XSCREENSAVER_PATH /usr/lib/xscreensaver +set --export XSECURELOCK_SHOW_KEYBOARD_LAYOUT 0 +set --export XSECURELOCK_AUTH_BACKGROUND_COLOR "#2E3440" +set --export XSECURELOCK_AUTH_FOREGROUND_COLOR "#D8DEE9" +set --export XSECURELOCK_AUTH_SOUNDS 1 +set --export XSECURELOCK_DIM_COLOR "#2E3440" +set --export XSECURELOCK_NO_COMPOSITE 1 if status is-interactive end # Start X at login if status --is-login - while pactl load-module module-detect - end - if not pactl set-default-sink alsa_output.0.hdmi-stereo - pactl set-default-sink alsa_output.1.hdmi-stereo - end - if test -z "$DISPLAY" -a $XDG_VTNR = 1 - exec startx -- -keeptty + if set -q DISPLAY + xset s 300 5 + xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock & + while pactl load-module module-detect + end + if not pactl set-default-sink alsa_output.0.hdmi-stereo + pactl set-default-sink alsa_output.1.hdmi-stereo + end + picom --animations --no-fading-openclose -b end end +switch $DISPLAY + case ':10.0' + if test -z "$XSECURELOCK_XRDP" + set --export XSECURELOCK_XRDP 1 + xset s 300 5 + xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock & + pactl set-default-sink xrdp-sink + picom --animations --no-fading-openclose -b + end +end + +# Check if DISPLAY is set + fish_add_path "$HOME/.local/bin" fish_add_path "$HOME/.cargo/bin" +fish_add_path "/usr/lib/xsecurelock" source "$HOME/.config/fish/abbreviations.fish" diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 6cf4a37..cbf8ff4 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -157,6 +157,7 @@ keys = [ Key([mod], "w", lazy.window.kill(), desc="Kill focused window"), Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"), Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), + Key([mod], "p", lazy.spawn('xset s activate'), desc="Lock Session"), Key([mod], "r", lazy.spawn(rofi), desc="Launch rofi"), Key([mod, "shift"], "y", lazy.spawn(hotkeys), desc="Show Hotkeys"), Key([mod], "n", lazy.screen.next_group(skip_empty=True), desc="Switch to next group"), diff --git a/.xinitrc b/.xinitrc index d5d8e3e..52b81fa 100755 --- a/.xinitrc +++ b/.xinitrc @@ -32,5 +32,4 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then unset f fi -picom --animations --no-fading-openclose -b exec qtile start