目录
~/.config/i3/config
# 浮动窗口
for_window [class="Thunar"] floating enable
for_window [class="Xarchiver"] floating enable
# 快捷键绑定
bindsym $mod+e exec thunar # 冲突!!
# 截图
bindsym --release Print exec flameshot gui
# 关机
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Pause mode "$mode_system"
# jgmenu
bindsym $mod+z exec jgmenu_run
# kdeconnect
exec_always kdeconnect-indicator
# 剪贴板
exec_always copyq
/usr/bin/i3exit
#!/bin/sh
lock() {
i3lock
}
case "$1" in
lock)
lock
;;
logout)
i3-msg exit
;;
suspend)
lock && systemctl suspend
;;
hibernate)
lock && systemctl hibernate
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
*)
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
exit 2
esac
exit 0
标签:i3wm,bindsym,exec,default,lock,配置,mode,i3exit
From: https://www.cnblogs.com/mutuu/p/16724707.html