From 414bb14b1b09a7a9dfcbad962082aa340c0c2ba1 Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Wed, 3 Aug 2022 21:28:16 +0200 Subject: [PATCH] - Fixed i3lock re-using the last image - Set up /etc/environment sharing --- CHANGELOG.md | 5 +++++ config/environment | 7 +++++++ i3/scripts/i3lock.sh | 20 ++++++++++---------- install.sh | 1 + 4 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 config/environment diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d0b335..a31e4f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to date versioning. +## [2022-08-03] + +- Fixed i3lock re-using the last image +- Set up /etc/environment sharing + ## [2022-07-26] - Added `vers=2.1` to `mount.cifs` command in [mounts.sh](./bash/mounts.sh) to fix an [upstream bug](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.18.y&id=ca83f50b43a099345e61950f74c4d9eb81c765fe) diff --git a/config/environment b/config/environment new file mode 100644 index 0000000..8502579 --- /dev/null +++ b/config/environment @@ -0,0 +1,7 @@ +# +# This file is parsed by pam_env module +# +# Syntax: simple "KEY=VAL" pairs on separate lines +# +XCURSOR_THEME="Adwaita" +EDITOR="nano" diff --git a/i3/scripts/i3lock.sh b/i3/scripts/i3lock.sh index e2f9b84..b96c0be 100644 --- a/i3/scripts/i3lock.sh +++ b/i3/scripts/i3lock.sh @@ -4,7 +4,7 @@ icon="$HOME/.config/i3/icons/lock.png" tmpbg='/tmp/screen.png' # detect whether tidal is running -isPlaying=$(~/.config/i3/scripts/tidal-cli.sh status); +isPlaying=$(~/.config/i3/scripts/tidal-cli.sh status) scrot "$tmpbg" convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg" @@ -15,15 +15,15 @@ convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg" # check whether the lockscreen is being activated because of a suspend if [[ $* == *--suspend ]]; then - # if it is, simply lock without no-fork - i3lock -f -i "$tmpbg"; + # if it is, simply lock without no-fork + i3lock -f -i "$tmpbg" else - # if it isn't suspended, enable no-fork - i3lock -n -f -i "$tmpbg"; - - # if tidal was playing before we locked, resume. - if [ $isPlaying == "playing" ]; then - ~/.config/i3/scripts/tidal-cli.sh play - fi; + # if it isn't suspended, enable no-fork + i3lock -n -f -i "$tmpbg" + # if tidal was playing before we locked, resume. + if [ $isPlaying == "playing" ]; then + ~/.config/i3/scripts/tidal-cli.sh play + fi + rm -rf $tmpbg fi diff --git a/install.sh b/install.sh index dca1ad6..39d0d6a 100644 --- a/install.sh +++ b/install.sh @@ -110,6 +110,7 @@ function install_config { sudo ln -sf "$PWD"/config/package-managers/makepkg.conf /etc/makepkg.conf sudo ln -sf "$PWD"/config/ntp.conf /etc/ntp.conf sudo ln -sf "$PWD"/bash/Completion/ /etc/bash_completion.d + sudo ln -sf "$PWD"/config/environment /etc/environment # create empty .custom alias file echo "" >~/.custom