r/i3wm • u/Ornery-Building259 • 6d ago
Question Can't get screenshot functionality
I am using a t14 gen 5 ryzen 5 laptop running i3wm cachyos. I am using the same config file as I have used on my x240 but cannot get screenshot functionality. The section pertaining to screenshots from my config file is below, but not matter if I install maim, xclip, xdotool, an update the system and reload i3 and restart, I get absolutely no response from the laptop whatsoever and just simply don't have a key functionality that is necessary in my basic workflow. Any assistance at all is very much appreciated.
## Screenshots
bindsym Print exec --no-startup-id maim "/home/$USER/Pictures/$(date)"
bindsym $mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) "/home/$USER/Pictures/$(date)"
bindsym Shift+Print exec --no-startup-id maim --select "/home/$USER/Pictures/$(date)"
## Clipboard Screenshots
bindsym Ctrl+Print exec --no-startup-id maim | xclip -selection clipboard -t image/png
bindsym Ctrl+$mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) | xclip -selection clipboard -t image/png
bindsym Ctrl+Shift+Print exec --no-startup-id maim --select | xclip -selection clipboard -t image/png
4
u/Episode-1022 6d ago
just install flameshot.
2
u/gbrennon 6d ago
did u even try to read the help subcommand to see maim usage? there is a section specific for adding it to clipboard.
in the end of it there are some examples including:
1
u/waterkip 6d ago
I dont know maim, but what if you use scrot or.. i use the gnome screenshot tool i think. Works well.
Debugging would be for me: create a small script, add debugging lines in the script, watch the loglines while.pressing print screen. If works, problem with how you call your thing.
1
u/bgravato i3 6d ago
I use Xfce4-screenshooter and it works great.
To try to troubleshoot and figure out where the problem lies... try replacing your commands with something that you know for sure that works (like opening a terminal). So you can rule whether the shortcut is being activated or not.
In it works, then your next step could be putting those commands inside a shell script and call the script instead of a more complex command with redirects, etc...
1
u/s1d3b00b 4d ago
Try finding and using the bindcode instead of the bindsym for your Print key. I sometimes have to do that to get specific keys to work on some keyboards.
1
u/Yousef_Tele 2d ago edited 2d ago
Before doing anything, please ensure you install "maim". Then, do the following (this i3 config works for me on Debian 13 and i3 ver: 4.24):
If it didn't work, check: "man maim"
2
u/FewMirror259 5d ago
Copy the commands and run them in a terminal.
Another option is to switch to scrot using this:
bindsym Print exec --no-startup-id scrot -z
bindsym --release $mod+Print exec --no-startup-id scrot -s