lock tg on locking sway
This commit is contained in:
parent
45d25d6ac0
commit
e3a9e470f5
@ -31,7 +31,7 @@ bindsym --release XF86Go exec --no-startup-id pactl set-source-mute @DEFAULT_SOU
|
||||
|
||||
bindsym $mod+XF86AudioMicMute exec --no-startup-id pactl list short sources | awk '/input.*RUNNING/ {system("pactl set-source-mute " $1 " toggle")}' ## Find and mute mics
|
||||
|
||||
bindsym --to-code $mod+s exec ~/.config/sway/scripts/swap_workspaces.sh
|
||||
bindsym --to-code $mod+s exec ~/.config/sway/scripts/swap-workspaces.sh
|
||||
|
||||
bindsym --to-code $mod+Shift+q kill
|
||||
bindsym --to-code $mod+Shift+r reload
|
||||
@ -103,8 +103,8 @@ mode $exitmode {
|
||||
bindsym --to-code e exit
|
||||
bindsym --to-code r exec --no-startup-id reboot
|
||||
bindsym --to-code s exec --no-startup-id shutdown -h now
|
||||
bindsym --to-code u exec --no-startup-id systemctl suspend; mode "default"
|
||||
bindsym --to-code l exec swaylock -f; mode "default"
|
||||
bindsym --to-code u exec ~/.config/sway/scripts/lock-telegram.sh && systemctl suspend; mode "default"
|
||||
bindsym --to-code l exec ~/.config/sway/scripts/lock-telegram.sh && swaylock -f; mode "default"
|
||||
bindsym --to-code b exec magick canvas:none PNG:- | feh --class black -YFx -; mode "default"
|
||||
bindsym --to-code Shift+r exec --no-startup-id systemctl reboot --firmware-setup
|
||||
|
||||
|
||||
18
home/user/.config/sway/scripts/lock-telegram.sh
Executable file
18
home/user/.config/sway/scripts/lock-telegram.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
TELEGRAM_WINDOW=$(swaymsg -t get_tree | jq -r '.. | select(.app_id? == "org.telegram.desktop") | .id' | head -n 1)
|
||||
|
||||
if [ -z "${TELEGRAM_WINDOW}" ]; then
|
||||
echo "Telegram_not_found!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
swaymsg "[con_id=${TELEGRAM_WINDOW}] focus"
|
||||
|
||||
sleep 0.2
|
||||
|
||||
wtype -M ctrl l
|
||||
|
||||
swaymsg workspace back_and_forth
|
||||
|
||||
exit 0
|
||||
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "pacman -S sway swaybg i3blocks waybar swaylock swayidle wl-clipboard ydotool grim slurp mako wlr-randr rofi jq brightnessctl"
|
||||
echo "pacman -S sway swaybg i3blocks waybar swaylock swayidle wl-clipboard ydotool grim slurp mako wlr-randr rofi jq brightnessctl wtype"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user