浏览代码

~/.config/sway: Add a shortcut to toggle (think)fan

Enabled it can be completely silent, but with too much load it gets too
loud.  This is a workaround, but works okay so far.
Lu Stadler 5 年之前
父节点
当前提交
73d1c17ab2
共有 2 个文件被更改,包括 11 次插入0 次删除
  1. 9 0
      .bin/toggle-fan
  2. 2 0
      .config/sway/config

+ 9 - 0
.bin/toggle-fan

@ -0,0 +1,9 @@
1
#!/bin/bash
2
3
if [ "$(systemctl is-active thinkfan)" = "active" ]; then
4
	notify-send --expire-time=1000 "disabling quieter fan profile"
5
	sudo systemctl stop thinkfan
6
else
7
	notify-send --expire-time=1000 "enabling quieter fan profile"
8
	sudo systemctl start thinkfan
9
fi

+ 2 - 0
.config/sway/config

@ -108,6 +108,8 @@ input type:touchpad events disabled
108 108
    bindsym XF86AudioMute        exec amixer set Master toggle
109 109
    bindsym XF86AudioPlay        exec playerctl play-pause
110 110
111
    bindsym $mod+Shift+f exec ~/.bin/toggle-fan
112
111 113
#
112 114
# Moving around:
113 115
#