From a59605c756b614bd5c536fe03a643b73ac04d1f2 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 13 May 2019 16:35:38 +0100 Subject: [PATCH] Support alternative lock screen Also adds some rules for the Compton configuration so, that the lock screen isn't transparent. --- configs/laptop/misc/.config/i3/config.device | 3 +++ configs/shared/misc/.config/compton.conf | 14 ++++++++++++-- configs/shared/misc/.config/i3/config.shared | 4 ++-- configs/shared/shell/.profile | 7 +++++++ configs/shared/x_server/.xsessionrc.shared | 5 ++++- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/configs/laptop/misc/.config/i3/config.device b/configs/laptop/misc/.config/i3/config.device index 3d68b26db..d96ffdb2b 100644 --- a/configs/laptop/misc/.config/i3/config.device +++ b/configs/laptop/misc/.config/i3/config.device @@ -16,3 +16,6 @@ bindsym XF86AudioNext exec --no-startup-id playerctl next # screen brightness controls bindsym XF86MonBrightnessUp exec xbacklight -inc 15 bindsym XF86MonBrightnessDown exec xbacklight -dec 15 + +# suspend laptop +bindsym Ctrl+Escape exec systemctl suspend \ No newline at end of file diff --git a/configs/shared/misc/.config/compton.conf b/configs/shared/misc/.config/compton.conf index 51e8c8aaa..ae06b19ab 100644 --- a/configs/shared/misc/.config/compton.conf +++ b/configs/shared/misc/.config/compton.conf @@ -10,5 +10,15 @@ inactive-opacity = 0.8; # transitions fading = true; -fade-in-step = 0.03; -fade-out-step = 0.03; \ No newline at end of file +fade-in-step = 0.07; +fade-out-step = 0.07; + +# lock screen +# NOTE: Need this rule here because I set XSECURELOCK_NO_COMPOSITE=1 in +# ~/.profile. Without this, the lock screen will adopt the opacity settings +# above, which is a security risk if you lock your screen while it has sensitive +# content on it. +# +# NOTE: For some reason, `100:class_g` doesn't work, so settling for +# `99:class_g` instead. +opacity-rule = [ "99:class_g = 'xsecurelock'" ]; diff --git a/configs/shared/misc/.config/i3/config.shared b/configs/shared/misc/.config/i3/config.shared index 2e3926687..1cf570a82 100644 --- a/configs/shared/misc/.config/i3/config.shared +++ b/configs/shared/misc/.config/i3/config.shared @@ -120,8 +120,8 @@ bindsym $mod+v split vertical bindsym $mod+Shift+v split horizontal # lock the screen (Window's famous Ctrl-Alt-Delete) -bindsym $mod+Ctrl+Delete exec "/usr/share/goobuntu-desktop-files/xsecurelock.sh" -bindsym $mod+Shift+q exec "/usr/share/goobuntu-desktop-files/xsecurelock.sh" +bindsym $mod+Ctrl+Delete exec xsecurelock +bindsym $mod+Shift+q exec xsecurelock # sound applet exec --no-startup-id gnome-sound-applet diff --git a/configs/shared/shell/.profile b/configs/shared/shell/.profile index 0afaec690..0bb636e22 100644 --- a/configs/shared/shell/.profile +++ b/configs/shared/shell/.profile @@ -18,6 +18,13 @@ export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" export DOTFILES="$HOME/Dropbox/dotfiles" export ORG_DIRECTORY="$HOME/Dropbox/org" +# Prevent compton from fading to the lock screen. This also prevents the white +# overlay that compton was causing to appear. Still unsure why that was +# happening. +# For more information, see the following GitHub issue: +# https://github.com/google/xsecurelock/issues/28 +export XSECURELOCK_NO_COMPOSITE=1 + # This fixes nixpkgs that rely on glibc-2.27, which allegedly breaks locale # issues. # See this thread for more details: https://github.com/NixOS/nixpkgs/issues/8398 diff --git a/configs/shared/x_server/.xsessionrc.shared b/configs/shared/x_server/.xsessionrc.shared index 3b42e1062..13886fe75 100644 --- a/configs/shared/x_server/.xsessionrc.shared +++ b/configs/shared/x_server/.xsessionrc.shared @@ -6,6 +6,9 @@ export DESKTOP_SESSION=cinnamon # gnome for trusty. # NOTE: This may break your compose key. # See http://g/i3-users/YBexXGbik7E for more details. +# NOTE: IM_MODULE is an "Input Method" module, which I believe affects the way +# keyboard events are processed. `xim` is "X Input Method"; other options +# include: `ibus`, `fcitx`, but I'm unsure what features each offers. export GTK_IM_MODULE=xim # Desktop background color. @@ -23,7 +26,7 @@ clipmenud & # Start the Emacs server emacs --daemon -# start comption +# start compton for shadows, transparency, fading, etc. compton & # set kbds