- name: Unset particular default gnome keybinds dconf: key: "{{ item }}" value: [""] state: present loop: - "/org/gnome/shell/keybindings/switch-to-application-1" - "/org/gnome/shell/keybindings/switch-to-application-2" - "/org/gnome/shell/keybindings/switch-to-application-3" - "/org/gnome/shell/keybindings/switch-to-application-4" - "/org/gnome/shell/keybindings/switch-to-application-5" - "/org/gnome/desktop/wm/keybindings/switch-input-source" - "/org/gnome/desktop/wm/keybindings/switch-input-source-backwards" - "/org/gnome/settings-daemon/plugins/media-keys/screensaver" - "/org/gnome/desktop/wm/keybindings/switch-applications" - "/org/gnome/desktop/wm/keybindings/switch-applications-backward" - "/org/gnome/desktop/wm/keybindings/switch-windows" - "/org/gnome/desktop/wm/keybindings/switch-windows-backward" - name: Change existing gnome keybinds dconf: key: "{{ item.key }}" value: "{{ item.value }}" state: present loop: - {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-1", value: ["1"]} - {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-2", value: ["2"]} - {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-3", value: ["3"]} - {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-4", value: ["4"]} - {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-5", value: ["5"]} - {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-1", value: ["1"]} - {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-2", value: ["2"]} - {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-3", value: ["3"]} - {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-4", value: ["4"]} - {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-5", value: ["5"]} - {key: "/org/gnome/desktop/wm/keybindings/minimize", value: ["Space"]} - {key: "/org/gnome/desktop/wm/keybindings/toggle-fullscreen", value: ["F"]} - {key: "/org/gnome/desktop/wm/keybindings/close", value: ["Q"]} - {key: "/org/gnome/desktop/wm/keybindings/maximize-horizontally", value: ["H"]} - {key: "/org/gnome/desktop/wm/keybindings/maximize-vertically", value: ["V"]} - {key: "/org/gnome/desktop/wm/keybindings/move-to-center", value: ["C"]} - {key: "/org/gnome/desktop/wm/keybindings/switch-windows", value: ["Tab"]} - {key: "/org/gnome/desktop/wm/keybindings/switch-windows-backward", value: ["Tab"]} - {key: "/org/gnome/settings-daemon/plugins/media-keys/screensaver", value: ["L"]} - name: Set custom gnome keybinds include_tasks: _custom-bind.yml loop: - {command: "'gnome-terminal'", bind: "'Return'"} - {command: "'firefox'", bind: "'B'"} - {command: "'code'", bind: "'V'"} loop_control: index_var: index # Gnome requires an array of strings with the custom keybinds # this must match the number of keybinds defined above... - name: Set custom-keybinds array dconf: key: /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings value: "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/']"