mirror of
https://github.com/agresdominik/dotfiles.git
synced 2026-04-21 18:05:50 +00:00
lock script, styling
This commit is contained in:
+11
-9
@@ -5,7 +5,7 @@ set $down j
|
|||||||
set $up k
|
set $up k
|
||||||
set $right l
|
set $right l
|
||||||
set $term alacritty
|
set $term alacritty
|
||||||
set $menu wmenu-run
|
set $menu wmenu-run -l 5
|
||||||
|
|
||||||
# Font
|
# Font
|
||||||
font pango:MesloLGL Nerd Font Mono 10
|
font pango:MesloLGL Nerd Font Mono 10
|
||||||
@@ -17,14 +17,8 @@ output * bg /home/agres/.config/sway/wallpaper/wallpaper.jpg fill
|
|||||||
gaps inner 2
|
gaps inner 2
|
||||||
gaps outer 2
|
gaps outer 2
|
||||||
|
|
||||||
# exec swayidle -w \
|
# Screen Locker
|
||||||
# timeout 300 'swaylock -f -c 000000' \
|
exec_always /home/agres/.config/sway/scripts/lock-sway.sh
|
||||||
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
|
||||||
# before-sleep 'swaylock -f -c 000000'
|
|
||||||
#
|
|
||||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
|
||||||
# your displays after another 300 seconds, and turn your screens back on when
|
|
||||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
|
||||||
|
|
||||||
# Key bindings
|
# Key bindings
|
||||||
bindsym $mod+Return exec $term
|
bindsym $mod+Return exec $term
|
||||||
@@ -33,6 +27,7 @@ gaps outer 2
|
|||||||
floating_modifier $mod normal
|
floating_modifier $mod normal
|
||||||
bindsym $mod+Shift+r reload
|
bindsym $mod+Shift+r reload
|
||||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||||
|
bindsym $mod+q exec /home/agres/.config/sway/scripts/lock-sway-instant.sh
|
||||||
|
|
||||||
# Moving around:
|
# Moving around:
|
||||||
bindsym $mod+$left focus left
|
bindsym $mod+$left focus left
|
||||||
@@ -143,5 +138,12 @@ output eDP-1 {
|
|||||||
scale_filter linear
|
scale_filter linear
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Opacity Settings
|
||||||
|
for_window [app_id="Alacritty"] opacity 0.98
|
||||||
|
|
||||||
|
# Border Colors
|
||||||
|
client.focused #00b5af #00b5af #fdf6e3 #073642
|
||||||
|
client.focused_inactive #073642 #073642 #fdf6e3 #073642
|
||||||
|
client.unfocused #073642 #073642 #fdf6e3 #073642
|
||||||
|
|
||||||
include /etc/sway/config.d/*
|
include /etc/sway/config.d/*
|
||||||
|
|||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
IMG_PATH="${XDG_RUNTIME_DIR:-/tmp}/lock.png"
|
||||||
|
|
||||||
|
grim -t png "$IMG_PATH"
|
||||||
|
magick "$IMG_PATH" -blur 0x12 "$IMG_PATH"
|
||||||
|
swaylock -f -i "$IMG_PATH"
|
||||||
|
|
||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
IMG_PATH="${XDG_RUNTIME_DIR:-/tmp}/lock.png"
|
||||||
|
|
||||||
|
exec swayidle -w \
|
||||||
|
timeout 30 "grim -t png \"$IMG_PATH\" && magick \"$IMG_PATH\" -blur 0x12 \"$IMG_PATH\" && swaylock -f -i \"$IMG_PATH\"" \
|
||||||
|
timeout 600 'swaymsg "output * power off"' \
|
||||||
|
resume 'swaymsg "output * power on"' \
|
||||||
|
before-sleep "grim -t png \"$IMG_PATH\" && magick \"$IMG_PATH\" -blur 0x12 \"$IMG_PATH\" && swaylock -f -i \"$IMG_PATH\""
|
||||||
@@ -4,5 +4,5 @@ cpu=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {printf "
|
|||||||
bat=$(cat /sys/class/power_supply/macsmc-battery/capacity 2>/dev/null || echo "N/A")
|
bat=$(cat /sys/class/power_supply/macsmc-battery/capacity 2>/dev/null || echo "N/A")
|
||||||
time=$(date "+%d.%m %H:%M:%S")
|
time=$(date "+%d.%m %H:%M:%S")
|
||||||
|
|
||||||
echo "CPU: $cpu | MEM: $mem | BAT: $bat% | $time"
|
echo "$USER | CPU: $cpu | MEM: $mem | BAT: $bat% | $time"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user