regolith-desktop
regolith-desktop copied to clipboard
PrtScn not mapped
Is your feature request related to a problem? Please describe. I want to take screenshots easily, something I do many many times a day
Describe the solution you'd like
PrtScn
= run gnome-screenshot
(or similar) to capture the whole screen
shift + PrtScn
= run gnome-screenshot -a
to allow area selection
alt + PrtScn
= run gnome-screenshot -w
for current window capture
Describe alternatives you've considered
I can't seem to map these myself, using the keyboard shortcuts options. it doesn't trigger gnome-screenshot correctly, no file is created.
Interactively running gnome-screenshot
works fine, though is very slow.
Additional context
Also note that -c
while being my preferred option (to copy the screenshot to the clipboard) doesn't appear to work. Unsure if that's a regolith problem or gnome-screenshot.
Thank you very much!
Context: I have tested this both on my laptop (thinkpad x1 carbon, 2019 edition, i7 + 16gb ram) and PC (Ryzen 5, 16gb ram). PC was a fresh install today, Laptop was on the beta, and I've just confirmed that even with today's updates the bug persists.
This screenshot was more annoying to take than it needed to be :laughing:
@0atman after upgrading to regolith 2.0, I have the same issue
@0atman I ended up installing flameshot and adding this to my 40_workspace-config file
bindsym Ctrl+Shift+Print exec "/usr/bin/flameshot gui --delay 1000"
(also, 'hello')
@pmahnke Ahoy!
Oh yeah, just using i3 to configure it - genius. I'll try that, thank you.
Similar problem here, potentially the same. I manually installed gnome-screenshot
on 2.0 because it wasn't installed by default I think. Now on 2.1.
This works:
- Using the launcher to launch the screenshot GUI, and interactively taking a screenshot with it. I don't get the shutter sound, but that is probably not significant.
-
gnome-screenshot -a -f "$filename"
shows the area selector and saves the resulting file correctly.
This doesn't work:
-
gnome-screenshot -a -c
shows the area selector but my clipboard remains empty. (while via the GUI it does work!) - I can set a custom keyboard shortcut in the gnome configuration (super-C) to call
gnome-screenshot
: same behavior (saving to file works, copying does not).
System:
Solved this by installing gnome-screenshot
and xclip
, then remap keys in settings
Settings -> Keyboard -> View and Customize Shortcuts -> Custom Shortcuts
For example add a hotkey for Ctrl + Shift + Print
sh -c "gnome-screenshot -c -a -f /tmp/test && cat /tmp/test | xclip -i -selection clipboard -target image/png"
That is a nice workaround! But that confirms that gnome-screenshot -c -a
does not actually place anything on the clipboard right?
A more portable (and gittable) solution, would be to create your own i3 partial in ~/.config/regolith2/i3/conf.d
, e.g. 99_personal-config
and add something like this:
## PrintScreen: selection
## Ctrl+PrintScreen: window
## Ctrl+Shift+PrintScreen: screen
bindsym --release Print exec --no-startup-id "scrot -s - | xclip -selection clipboard -target image/png"
bindsym --release Ctrl+Print exec --no-startup-id "scrot -u - | xclip -selection clipboard -target image/png"
bindsym --release Ctrl+Shift+Print exec --no-startup-id "scrot - | xclip -selection clipboard -target image/png"
My example uses scrot
because that can output to STDOUT so no need to do the dance with a temp file, but bindsym --release Print exec --no-startup-id "gnome-screenshot -c -a -f /tmp/test && cat /tmp/test | xclip -i -selection clipboard -target image/png"
should also work.
I have verified in unstable
of Regolith 2.1 I am able to use prtscr
keys in modes: desktop, window, region via meta keys. The files are placed in ~/Pictures
. Is this not what others are seeing, or is the ask to use a different screen capture program?
For me it currently doesn't work. After upgrading (from 1.6) it didn't work at all, then it worked for a while, then it stopped working again. I'm obviously not on a clean install, but had 1.6 on Ubuntu 20.04 originally and went with upgrading Ubuntu then Regolith, so I can imagine some mess coming from that.
I have noticed it not working on some of my machines from time to time. We'll keep monitoring the issue and once a root-cause is found we can fix.
@kgilmer can you confirm that gnome-screenshot -c
sends a screenshot to clipboard?
Confirmed
Thanks! Then I think all functionality is restored. I am on 2.1 main, should I try and get unstable
?
@bouke-sf I don't think it presents much risk to try and update from unstable
now, but would recommend that you do it temporarily unless you want to be always testing the latest updates. if you do opt to update I would like to know if the update resolves the problem for you.
I just did a completely fresh install, downloading Ubuntu 22.04.1 LTS, then installing Regolith 2.1.
The current behavior (not on unstable) is that no files are generated, and - i.e. - ctrl+shift+printsc does not provide the snipping interface it used to, printsc does (as far as I can tell) nothing at all.
I was going to take a screenshot of the monitor interface to show another error when I ran into this one :) :)
From the above it looks like this will be resolved with the next version of Regolith, so just reporting for completeness here.
I think there is no such binding configured in https://github.com/regolith-linux/regolith-i3-config/tree/master/partials
I added a file 61_screenshot_keybindings
to ~/.config/regolith2/config
with:
## Screenshot // Selection to File // Prtsc ##
bindsym --release Print exec --no-startup-id "scrot -s -F ~/Pictures/screenshot_`date +%Y-%m-%d_%H:%M:%S_selection`.png"
## Screenshot // Selection to Clipboard // <> Prtsc ##
bindsym --release $mod+Print exec --no-startup-id "scrot -s - | xclip -selection clipboard -target image/png"
## Screenshot // Window to File // Ctrl Prtsc ##
bindsym --release Ctrl+Print exec --no-startup-id "scrot -u -F ~/Pictures/screenshot_`date +%Y-%m-%d_%H:%M:%S_window`.png"
## Screenshot // Window to Clipboard // <> Ctrl Prtsc ##
bindsym --release $mod+Ctrl+Print exec --no-startup-id "scrot -u - | xclip -selection clipboard -target image/png"
## Screenshot // All to File// Shift Ctrl Prtsc ##
bindsym --release Ctrl+Shift+Print exec --no-startup-id "scrot -F ~/Pictures/screenshot_`date +%Y-%m-%d_%H:%M:%S_all`.png"
## Screenshot // All to Clipboard // <> Shift Ctrl Prtsc ##
bindsym --release $mod+Ctrl+Shift+Print exec --no-startup-id "scrot - | xclip -selection clipboard -target image/png"
Which I think is very useful and offers both options, clipboard and direct capture to file.
Consider flameshot instead of scrot?
Consider flameshot instead of scrot?
Oh, nice one. Could be handy to have all those features.
Good suggestion, I set flameshot gui
under the PrintScr key now.
Just upgraded from Ubuntu 20.04, Regolith 1.6 to Ubuntu 22.04, Regolith 2.2
I installed the gnome-screenshot
and created the file ~/.config/regolith2/i3/config.d/61_screenshot_keybindings
with two lines:
bindsym --release Print exec --no-startup-id "gnome-screenshot"
bindsym --release Shift+Print exec --no-startup-id "gnome-screenshot -a
I had to also disable gnome-flashback's built-in screenshot:
gsettings set org.gnome.gnome-flashback screenshot false
I had this issue after upgrading from Ubuntu 20.04 to 22.04 using the do-release-upgrade method after regolith3 was already installed and configured. I verified that gnome-screenshot
was installed.
@tomasfrtala fix worked -- but not yet sure why the basic print screen functions were not working after upgrading.