Skip to content

Instantly share code, notes, and snippets.

@hleb-albau
Last active October 24, 2023 03:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hleb-albau/c70987dfc03be3887d54af12dfd40d70 to your computer and use it in GitHub Desktop.
Save hleb-albau/c70987dfc03be3887d54af12dfd40d70 to your computer and use it in GitHub Desktop.
Simple script to configure static 8 gnome workspaces with hotkey binding.
#!/bin/bash
# This script:
# 1) Disable dynamic workspaces.
# 2) Set number of static workspaces to 8.
# 3) Bind hotkey 'super+{x}' to switch to {x} workspace
gsettings set org.gnome.shell.overrides dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces 8
for x in {1..8}
do
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-$x "[\"<Super>$x\"]"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment