-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoggle-panel-hide.sh
executable file
·21 lines (21 loc) · 1.01 KB
/
toggle-panel-hide.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# The panels-autohide value is an array of strings such as
# ['1:false', '2:true']
# In each string, the number before the colon selects a panel (of which there
# may be more than one), while the word after the colon corresponds to one of
# the Panel menu's "Auto-hide panel" options as follows:
# true == "Auto hide panel"
# false == "Always show panel"
# intel == "Intelligently hide panel"
# This script just toggles between the first two options, because if you trust
# the "intelligent" option's intelligence then you're probably not itching to
# have a custom keyboard shortcut executing a shell script that changes the
# setting on command, and all panels are toggled between these options at once,
# because I only have one panel and don't care about multiple-panel set-ups but
# I still wanted the script to be generally functional.
gsettings set org.cinnamon panels-autohide "$(
gsettings get org.cinnamon panels-autohide \
| sed s/false/swap/g \
| sed s/true/false/g \
| sed s/swap/true/g
)"