Add bash_profile support for xsecurelock, add config.fish supportt for xsecurelock

This commit is contained in:
Roland Thomas Jr 2023-06-29 00:13:36 -04:00
parent db4e9431f1
commit d19fd744a5
4 changed files with 49 additions and 8 deletions

View File

@ -4,6 +4,21 @@
[[ -f ~/.bashrc ]] && . ~/.bashrc [[ -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 [ -z "${DISPLAY}"] && [ "${XDG_VTNR}" == 1 ]; then
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx exec startx

View File

@ -1,26 +1,52 @@
#!/usr/bin/env fish
# Exports # Exports
set --export EDITOR "vim" set --export EDITOR "vim"
set --export PF_INFO "ascii title os host kernel uptime pkgs memory wm shell editor palette" 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 MANPAGER "sh -c 'col -bx | bat -l man -p'"
set --export QT_QPA_PLATFORMTHEME "gtk2" 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 if status is-interactive
end end
# Start X at login # Start X at login
if status --is-login if status --is-login
while pactl load-module module-detect if set -q DISPLAY
end xset s 300 5
if not pactl set-default-sink alsa_output.0.hdmi-stereo xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
pactl set-default-sink alsa_output.1.hdmi-stereo while pactl load-module module-detect
end end
if test -z "$DISPLAY" -a $XDG_VTNR = 1 if not pactl set-default-sink alsa_output.0.hdmi-stereo
exec startx -- -keeptty pactl set-default-sink alsa_output.1.hdmi-stereo
end
picom --animations --no-fading-openclose -b
end end
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/.local/bin"
fish_add_path "$HOME/.cargo/bin" fish_add_path "$HOME/.cargo/bin"
fish_add_path "/usr/lib/xsecurelock"
source "$HOME/.config/fish/abbreviations.fish" source "$HOME/.config/fish/abbreviations.fish"

View File

@ -157,6 +157,7 @@ keys = [
Key([mod], "w", lazy.window.kill(), desc="Kill focused window"), Key([mod], "w", lazy.window.kill(), desc="Kill focused window"),
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"), Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"),
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), 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], "r", lazy.spawn(rofi), desc="Launch rofi"),
Key([mod, "shift"], "y", lazy.spawn(hotkeys), desc="Show Hotkeys"), 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"), Key([mod], "n", lazy.screen.next_group(skip_empty=True), desc="Switch to next group"),

View File

@ -32,5 +32,4 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then
unset f unset f
fi fi
picom --animations --no-fading-openclose -b
exec qtile start exec qtile start