Skip to content

Instantly share code, notes, and snippets.

@ibLeDy
Created February 23, 2020 05:09
Show Gist options
  • Save ibLeDy/553fd4f6cec37f8e1df89a558e23a48f to your computer and use it in GitHub Desktop.
Save ibLeDy/553fd4f6cec37f8e1df89a558e23a48f to your computer and use it in GitHub Desktop.
Set Flameshot as the default screenshot tool
# Release default `window-screenshot` keybinding (Ubuntu 19.10)
gsettings set org.gnome.settings-daemon.plugins.media-keys window-screenshot '[]'
# Replace default `screenshot` binding with the default from `window-screenshot`
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '<Alt>Print'
# Create a new custom keybinding (taking for granted that this would be the first created)
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
# Give it a name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'Flameshot'
# Set the command it executes
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command 'flameshot gui --path /home/bledy/Pictures/Screenshots'
# Bind it to PrtScr
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding 'Print'
@ibLeDy
Copy link
Author

ibLeDy commented Feb 23, 2020

# Get existing keybindings for screenshots
$ gsettings list-keys org.gnome.settings-daemon.plugins.media-keys | grep screenshot

# Get current value for specific keybinding
$ gsettings get org.gnome.settings-daemon.plugins.media-keys screenshot

@ibLeDy
Copy link
Author

ibLeDy commented Mar 7, 2020

Linux 5.3.0-40-generic x86_64 GNU/Linux (Ubuntu 19.10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment