sleep
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
set $mod Mod1
|
||||
set $wallpaper_dir /sync/images/wallpapers
|
||||
set $terminal 'wezterm'
|
||||
set $terminal 'alacritty'
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:NotoSans 12
|
||||
@@ -38,7 +38,7 @@ exec --no-startup-id xset dpms 300 600 900
|
||||
exec --no-startup-id xss-lock -- ~/.config/i3/scripts/lock $wallpaper_dir
|
||||
|
||||
bindsym $mod+l exec ~/.config/i3/scripts/lock-now $wallpaper_dir
|
||||
bindsym $mod+Shift+o exec systemctl suspend
|
||||
bindsym $mod+Shift+o exec --no-startup-id ~/.config/i3/scripts/lock-then-suspend $wallpaper_dir
|
||||
bindsym $mod+Shift+p exec systemctl poweroff
|
||||
|
||||
bindsym Print exec --no-startup-id bash -c 'f="$(xdg-user-dir PICTURES)/$(date +%s_scrot.png)" && scrot -s "$f" && xclip -selection clipboard -t image/png -i "$f" && notify-send "Screenshot saved" "$f"'
|
||||
@@ -47,6 +47,7 @@ bindsym $mod+Print exec --no-startup-id bash -c 'f="$(xdg-user-dir PICTURES)/$(d
|
||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||
|
||||
# applets
|
||||
exec --no-startup-id snixembed --fork
|
||||
exec --no-startup-id picom --config ~/.config/picom/picom.conf
|
||||
exec --no-startup-id fcitx5 -d
|
||||
exec --no-startup-id nm-applet
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
wall_dir="${1:?wallpaper directory required}"
|
||||
img=$(find "$wall_dir" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) | shuf -n1)
|
||||
tmp=/tmp/lockscreen.png
|
||||
res=$(xrandr --current | awk '/ connected/ {getline; print $1; exit}')
|
||||
: "${res:=1920x1080}"
|
||||
if [ -n "$img" ] && convert "$img" -resize "${res}^" -gravity Center -extent "$res" "$tmp" 2>/dev/null; then
|
||||
i3lock -i "$tmp"
|
||||
else
|
||||
i3lock -c 000000
|
||||
fi
|
||||
systemctl suspend
|
||||
Reference in New Issue
Block a user