aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/gnome-set-config19
1 files changed, 13 insertions, 6 deletions
diff --git a/bin/gnome-set-config b/bin/gnome-set-config
index b199378..1ac9fc0 100755
--- a/bin/gnome-set-config
+++ b/bin/gnome-set-config
@@ -15,10 +15,17 @@ for i in $(seq 1 $NUM_WORKSPACES); do
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'"
+bindings="emacs org-mode"
+keybindings_key="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings"
+keybindings=$(echo $bindings | awk -v key="$keybindings_key" '{for(i=1;i<=NF;i++) printf("'\''" key "/" $i "/'\''%s", (i==NF ? "" : ","))}')
+keybindings="[$keybindings]"
-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'"
+dconf write "$keybindings_key" "$keybindings"
+
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/emacs/binding "'<Shift><Super>e'"
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/emacs/command "'emacsclient -c'"
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/emacs/name "'Emacs'"
+
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/org-mode/binding "'<Shift><Super>o'"
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/org-mode/command "'emacsclient -e \"(prot-window-popup-org-capture)\"'"
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/org-mode/name "'org-capture'"
nihil fit ex nihilo