aboutsummaryrefslogtreecommitdiff
path: root/bin/gnome-set-config
blob: b199378eda34f7982aac36a8053375687a32ec7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Sets my preferred Gnome config.
# Find existing bindings with:
#   for e in $(gsettings list-schemas  | grep bind); do gsettings list-recursively $e; done

NUM_WORKSPACES=9

gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces $NUM_WORKSPACES

for i in $(seq 1 $NUM_WORKSPACES); do
    gsettings set org.gnome.shell.keybindings switch-to-application-$i '[]'
    gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-$i "['<Super>$i']"
    gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-$i   "['<Shift><Super>$i']"
done

# This configuration is not present in gsettings; we need to fall back to dconf
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding "'<Super>Return'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command "'kgx'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name "'Open terminal'"

dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/binding "'<Shift><Super>o'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/command "'emacsclient -e \"(prot-window-popup-org-capture)\"'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/name "'org-capture'"
nihil fit ex nihilo