From 7215c3373585328aff8ad6a3321cdc4aefcc10fa Mon Sep 17 00:00:00 2001 From: q3aql Date: Mon, 13 Dec 2021 21:55:51 +0100 Subject: [PATCH] Dotfiles config update (2021-12-13) --- .config/i3/config | 4 ++-- .config/i3/config.i3blocks | 4 ++-- .config/i3/config.i3status | 4 ++-- .config/i3/config.polybar | 4 ++-- .config/i3/startscreensaver.sh | 19 +++++++++++++++++++ .config/polybar/config | 2 +- .config/spectrwm/spectrwm-main.conf | 4 ++-- .config/spectrwm/spectrwm-polybar.conf | 4 ++-- .config/spectrwm/spectrwm.conf | 4 ++-- .config/spectrwm/startscreensaver.sh | 19 +++++++++++++++++++ .config/sway/startwlrscreensaver.sh | 3 ++- README-i3-i3blocks.md | 13 ++++++++++++- README-i3-polybar.md | 13 ++++++++++++- README-i3.md | 15 +++++++++++++-- README-spectrwm-polybar.md | 13 ++++++++++++- README-sway.md | 4 ++-- README.md | 13 ++++++++++++- 17 files changed, 118 insertions(+), 24 deletions(-) create mode 100755 .config/i3/startscreensaver.sh create mode 100755 .config/spectrwm/startscreensaver.sh diff --git a/.config/i3/config b/.config/i3/config index ec9c9bc..545e5b9 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -46,8 +46,8 @@ exec --no-startup-id "sleep 15 && picom &" # Configure wallpaper exec --no-startup-id "sleep 3 && nitrogen --set-scaled ~/wallpapers/dark-city.jpg" -# Configure xscreensaver -exec --no-startup-id "sleep 5 && xscreensaver &" +# Configure screensaver +exec --no-startup-id ~/.config/i3/startscreensaver.sh & # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status diff --git a/.config/i3/config.i3blocks b/.config/i3/config.i3blocks index 2b966a9..f72c108 100644 --- a/.config/i3/config.i3blocks +++ b/.config/i3/config.i3blocks @@ -46,8 +46,8 @@ exec --no-startup-id "sleep 15 && picom &" # Configure wallpaper exec --no-startup-id "sleep 3 && nitrogen --set-scaled ~/wallpapers/abstract.png" -# Configure xscreensaver -exec --no-startup-id "sleep 5 && xscreensaver &" +# Configure screensaver +exec --no-startup-id ~/.config/i3/startscreensaver.sh & # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status diff --git a/.config/i3/config.i3status b/.config/i3/config.i3status index ec9c9bc..545e5b9 100644 --- a/.config/i3/config.i3status +++ b/.config/i3/config.i3status @@ -46,8 +46,8 @@ exec --no-startup-id "sleep 15 && picom &" # Configure wallpaper exec --no-startup-id "sleep 3 && nitrogen --set-scaled ~/wallpapers/dark-city.jpg" -# Configure xscreensaver -exec --no-startup-id "sleep 5 && xscreensaver &" +# Configure screensaver +exec --no-startup-id ~/.config/i3/startscreensaver.sh & # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status diff --git a/.config/i3/config.polybar b/.config/i3/config.polybar index c615eba..a36c852 100644 --- a/.config/i3/config.polybar +++ b/.config/i3/config.polybar @@ -46,8 +46,8 @@ exec --no-startup-id "sleep 15 && picom &" # Configure wallpaper exec --no-startup-id "sleep 3 && nitrogen --set-scaled ~/wallpapers/dark-city.jpg" -# Configure xscreensaver -exec --no-startup-id "sleep 5 && xscreensaver &" +# Configure screensaver +exec --no-startup-id ~/.config/i3/startscreensaver.sh & # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status diff --git a/.config/i3/startscreensaver.sh b/.config/i3/startscreensaver.sh new file mode 100755 index 0000000..69b10a4 --- /dev/null +++ b/.config/i3/startscreensaver.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Basic configuration variables +ScreensaverProgram="xautolock" # Options: xautolock or xscreensaver +ScreensaverTime="20" # 20 minutes (only for xautolock) + +# Init screensaver +sleep 5 +if [ "${ScreensaverProgram}" == "xautolock" ] ; then + echo "Using 'xautolock' as screensaver program" + xautolock -time ${ScreensaverTime} -locker "xset dpms force off" +elif [ "${ScreensaverProgram}" == "xscreensaver" ] ; then + echo "Using 'xscreensaver' as screensaver program" + xscreensaver & +else + echo "Using 'xautolock' as screensaver program" + xautolock -time ${ScreensaverTime} -locker "xset dpms force off" +fi + diff --git a/.config/polybar/config b/.config/polybar/config index 3695182..16073c8 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -38,7 +38,7 @@ monitor = ${env:MONITOR:} ;monitor = ${env:MONITOR:DisplayPort-0} ;monitor = ${env:MONITOR:DisplayPort-1} width = 100% -height = 26 +height = 28 ;override-redirect = true ;offset-x = 25% ;offset-y = 0% diff --git a/.config/spectrwm/spectrwm-main.conf b/.config/spectrwm/spectrwm-main.conf index 269cf04..ff4fa60 100644 --- a/.config/spectrwm/spectrwm-main.conf +++ b/.config/spectrwm/spectrwm-main.conf @@ -84,8 +84,8 @@ autorun = ws[1]:~/.config/spectrwm/startxrandr.sh # Load compton of picom autorun = ws[1]:~/.config/spectrwm/startcompositor.sh -# Start xscreensaver -autorun = ws[1]:xscreensaver +# Start screensaver +autorun = ws[1]:~/.config/spectrwm/startscreensaver.sh # Autostart script #autorun = ws[1]:~/.config/spectrwm/autostart.sh diff --git a/.config/spectrwm/spectrwm-polybar.conf b/.config/spectrwm/spectrwm-polybar.conf index 1b6886d..fa064d7 100644 --- a/.config/spectrwm/spectrwm-polybar.conf +++ b/.config/spectrwm/spectrwm-polybar.conf @@ -84,8 +84,8 @@ autorun = ws[1]:~/.config/spectrwm/startxrandr.sh # Load compton of picom autorun = ws[1]:~/.config/spectrwm/startcompositor.sh -# Start xscreensaver -autorun = ws[1]:xscreensaver +# Start screensaver +autorun = ws[1]:~/.config/spectrwm/startscreensaver.sh # Autostart script autorun = ws[1]:~/.config/spectrwm/autostart.sh diff --git a/.config/spectrwm/spectrwm.conf b/.config/spectrwm/spectrwm.conf index 269cf04..ff4fa60 100644 --- a/.config/spectrwm/spectrwm.conf +++ b/.config/spectrwm/spectrwm.conf @@ -84,8 +84,8 @@ autorun = ws[1]:~/.config/spectrwm/startxrandr.sh # Load compton of picom autorun = ws[1]:~/.config/spectrwm/startcompositor.sh -# Start xscreensaver -autorun = ws[1]:xscreensaver +# Start screensaver +autorun = ws[1]:~/.config/spectrwm/startscreensaver.sh # Autostart script #autorun = ws[1]:~/.config/spectrwm/autostart.sh diff --git a/.config/spectrwm/startscreensaver.sh b/.config/spectrwm/startscreensaver.sh new file mode 100755 index 0000000..69b10a4 --- /dev/null +++ b/.config/spectrwm/startscreensaver.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Basic configuration variables +ScreensaverProgram="xautolock" # Options: xautolock or xscreensaver +ScreensaverTime="20" # 20 minutes (only for xautolock) + +# Init screensaver +sleep 5 +if [ "${ScreensaverProgram}" == "xautolock" ] ; then + echo "Using 'xautolock' as screensaver program" + xautolock -time ${ScreensaverTime} -locker "xset dpms force off" +elif [ "${ScreensaverProgram}" == "xscreensaver" ] ; then + echo "Using 'xscreensaver' as screensaver program" + xscreensaver & +else + echo "Using 'xautolock' as screensaver program" + xautolock -time ${ScreensaverTime} -locker "xset dpms force off" +fi + diff --git a/.config/sway/startwlrscreensaver.sh b/.config/sway/startwlrscreensaver.sh index 1158a57..f4aab20 100755 --- a/.config/sway/startwlrscreensaver.sh +++ b/.config/sway/startwlrscreensaver.sh @@ -1,7 +1,7 @@ #!/bin/bash # Basic configuration variables -ScreensaverTime="900" # 15 minutes +ScreensaverTime="1200" # 20 minutes monitorOne="DP-1" # First monitor monitorTwo="DP-2" # Second monitor monitorThree="" # Third monitor @@ -71,6 +71,7 @@ if [ -z "${1}" ] ; then # Kill previous process echo "Trying to kill previous process" killall -9 swayidle + sleep 3 # Init swayidle command swayidle timeout ${ScreensaverTime} "bash ${0} sleep" resume "bash ${0} resume" elif [ "${1}" == "sleep" ] ; then diff --git a/README-i3-i3blocks.md b/README-i3-i3blocks.md index ae4ee98..2cfce10 100644 --- a/README-i3-i3blocks.md +++ b/README-i3-i3blocks.md @@ -24,7 +24,7 @@ dotfiles - My tiling i3 + i3blocks configuration (for Devuan/Debian) nitrogen lxrandr pnmixer conky xterm exa fish bat zsh dmenu fzf apcalc rofi picom \ engrampa xarchiver mpv ffmpeg pcmanfm ranger vlc vim geany git nodejs node-base \ python3 npm make cmake gcc cargo neofetch screenfetch lm-sensors pavucontrol \ - xfce4-screenshooter xscreensaver alsa-utils ristretto + xfce4-screenshooter xscreensaver alsa-utils ristretto xautolock ```` * I use `Connman` instead of `NetWorkManager` (`don't install if you prefer or use NetWorkManager`): @@ -92,6 +92,17 @@ dotfiles - My tiling i3 + i3blocks configuration (for Devuan/Debian) exec --no-startup-id "sleep 3 && nitrogen --set-scaled ~/wallpapers/abstract.png" ```` + * **`Set Screensaver (Optional):`** + + * The configuration file set `xautolock` with 20 minutes as screensaver: + * You can change the program between `xautolock` and `xscreensaver` editing the file `~/.config/i3/startscreensaver.sh`: + + ```shell + # Basic configuration variables + ScreensaverProgram="xautolock" # Options: xautolock or xscreensaver + ScreensaverTime="20" # 20 minutes (only for xautolock) + ```` + * **`Enable Gaps (Optional):`** * My config work on vanilla i3wm and gaps are disabled. diff --git a/README-i3-polybar.md b/README-i3-polybar.md index cdc9f07..2548d3a 100644 --- a/README-i3-polybar.md +++ b/README-i3-polybar.md @@ -24,7 +24,7 @@ dotfiles - My tiling i3 + polybar configuration (for Devuan/Debian) nitrogen lxrandr pnmixer conky xterm exa fish bat zsh dmenu fzf apcalc rofi picom \ engrampa xarchiver mpv ffmpeg pcmanfm ranger vlc vim geany git nodejs node-base \ python3 npm make cmake gcc cargo neofetch screenfetch lm-sensors pavucontrol \ - xfce4-screenshooter xscreensaver alsa-utils ristretto polybar + xfce4-screenshooter xscreensaver alsa-utils ristretto polybar xautolock ```` * I use `Connman` instead of `NetWorkManager` (`don't install if you prefer or use NetWorkManager`): @@ -92,6 +92,17 @@ dotfiles - My tiling i3 + polybar configuration (for Devuan/Debian) exec --no-startup-id "sleep 3 && nitrogen --set-scaled ~/wallpapers/abstract.png" ```` + * **`Set Screensaver (Optional):`** + + * The configuration file set `xautolock` with 20 minutes as screensaver: + * You can change the program between `xautolock` and `xscreensaver` editing the file `~/.config/i3/startscreensaver.sh`: + + ```shell + # Basic configuration variables + ScreensaverProgram="xautolock" # Options: xautolock or xscreensaver + ScreensaverTime="20" # 20 minutes (only for xautolock) + ```` + * **`Enable Gaps (Optional):`** * My config work on vanilla i3wm and gaps are disabled. diff --git a/README-i3.md b/README-i3.md index ababdf9..f8afe9f 100644 --- a/README-i3.md +++ b/README-i3.md @@ -24,7 +24,7 @@ dotfiles - My tiling i3 + i3status configuration (for Devuan/Debian) nitrogen lxrandr pnmixer conky xterm exa fish bat zsh dmenu fzf apcalc rofi picom \ engrampa xarchiver mpv ffmpeg pcmanfm ranger vlc vim geany git nodejs node-base \ python3 npm make cmake gcc cargo neofetch screenfetch lm-sensors pavucontrol \ - xfce4-screenshooter xscreensaver alsa-utils ristretto + xfce4-screenshooter xscreensaver alsa-utils ristretto xautolock ```` * I use `Connman` instead of `NetWorkManager` (`don't install if you prefer or use NetWorkManager`): @@ -91,7 +91,18 @@ dotfiles - My tiling i3 + i3status configuration (for Devuan/Debian) exec --no-startup-id "sleep 3 && nitrogen --set-scaled ~/wallpapers/dark-city.jpg" ```` - * **`Enable Gaps (Optional):`** + * **`Set Screensaver (Optional):`** + + * The configuration file set `xautolock` with 20 minutes as screensaver: + * You can change the program between `xautolock` and `xscreensaver` editing the file `~/.config/i3/startscreensaver.sh`: + + ```shell + # Basic configuration variables + ScreensaverProgram="xautolock" # Options: xautolock or xscreensaver + ScreensaverTime="20" # 20 minutes (only for xautolock) + ```` + +* **`Enable Gaps (Optional):`** * My config work on vanilla i3wm and gaps are disabled. * You can enable it editing 2 lines on file `~/.config/i3/config` and pressing `Win+Shift+r`: diff --git a/README-spectrwm-polybar.md b/README-spectrwm-polybar.md index f7f26c7..04c7beb 100644 --- a/README-spectrwm-polybar.md +++ b/README-spectrwm-polybar.md @@ -19,7 +19,7 @@ dotfiles - My tiling spectrwm + polybar configuration (for Devuan/Debian) * Open the terminal and type the following commands: ```shell - $ sudo apt-get install spectrwm compton arc-theme breeze-cursor-theme \ + $ sudo apt-get install spectrwm compton arc-theme breeze-cursor-theme xautolock \ fonts-noto papirus-icon-theme lxappearance nitrogen lxrandr pnmixer tint2 \ conky xterm exa fish bat zsh dmenu fzf apcalc rofi picom engrampa ristretto \ xarchiver mpv ffmpeg pcmanfm ranger vlc vim geany git nodejs node-base \ @@ -93,6 +93,17 @@ dotfiles - My tiling spectrwm + polybar configuration (for Devuan/Debian) nitrogen --set-scaled ~/wallpapers/abstract.png ```` + * **`Set Screensaver (Optional):`** + + * The configuration file set 'xautolock' with 20 minutes as screensaver: + * You can change the program between `xautolock` and `xscreensaver` editing the file `~/.config/spectrwm/startscreensaver.sh`: + + ```shell + # Basic configuration variables + ScreensaverProgram="xautolock" # Options: xautolock or xscreensaver + ScreensaverTime="20" # 20 minutes (only for xautolock) + ```` + * **`Compositor (Compton or Picom):`** * By default, the config load `Picom` compositor. diff --git a/README-sway.md b/README-sway.md index c210d10..81bd55d 100644 --- a/README-sway.md +++ b/README-sway.md @@ -80,12 +80,12 @@ dotfiles - My tiling sway configuration (for Devuan/Debian) * **`Screensaver:`** - * The configuration file use my monitor configuration and set the time in 15 minutes: + * The configuration file use my monitor configuration and set the time in 20 minutes: * Use the command `wlr-randr` for show your monitors & edit the file `~/.config/sway/startwlrscreensaver.sh`: ```shell # Basic configuration variables - ScreensaverTime="900" # 15 minutes + ScreensaverTime="1200" # 20 minutes monitorOne="DP-1" # First monitor monitorTwo="DP-2" # Second monitor monitorThree="" # Third monitor diff --git a/README.md b/README.md index 99643d2..55e4efc 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ dotfiles - My tiling spectrwm, i3 & sway configurations (for Devuan/Debian) * Open the terminal and type the following commands: ```shell - $ sudo apt-get install spectrwm compton arc-theme breeze-cursor-theme \ + $ sudo apt-get install spectrwm compton arc-theme breeze-cursor-theme xautolock \ fonts-noto papirus-icon-theme lxappearance nitrogen lxrandr pnmixer tint2 \ conky xterm exa fish bat zsh dmenu fzf apcalc rofi picom engrampa ristretto \ xarchiver mpv ffmpeg pcmanfm ranger vlc vim geany git nodejs node-base \ @@ -92,6 +92,17 @@ dotfiles - My tiling spectrwm, i3 & sway configurations (for Devuan/Debian) nitrogen --set-scaled ~/wallpapers/abstract.png ```` + * **`Set Screensaver (Optional):`** + + * The configuration file set 'xautolock' with 20 minutes as screensaver: + * You can change the program between `xautolock` and `xscreensaver` editing the file `~/.config/spectrwm/startscreensaver.sh`: + + ```shell + # Basic configuration variables + ScreensaverProgram="xautolock" # Options: xautolock or xscreensaver + ScreensaverTime="20" # 20 minutes (only for xautolock) + ```` + * **`Compositor (Compton or Picom):`** * By default, the config load `Picom` compositor.