r/i3wm • • 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

3 Upvotes

22 comments sorted by

4

u/Episode-1022 6d ago

just install flameshot.

1

u/Ornery-Building259 6d ago

Flameshot will make these commands work?

3

u/Episode-1022 6d ago

idk but you get a nice screenshot app .

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:

EXAMPLES
       Screenshot the active window and save it to the clipboard for quick past‐
       ing.

       maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png

1

u/Ornery-Building259 6d ago

No, I haven’t tried that yet because the command works on my other laptop. But to be real, I’m much less concerned with clipboard screenshotting, and moreso with save screenshotting

1

u/gbrennon 6d ago

just read help output...

it also have example for this...

1

u/Ornery-Building259 6d ago

What does the “…” mean? Is that a translation error?

1

u/gbrennon 6d ago

its the plain text named ellipsis

0

u/Ornery-Building259 6d ago

Well I’m aware of that, I’m wondering why you put them there because normally sentences end in periods, like this one.

1

u/gbrennon 6d ago

cli already contain answer and maim isnt part of i3wm.

try to think about documentation artifacts. if u rely in those things, try to uunderstand something will be better.

also u wont depend in a model to explain to u :D

1

u/Ornery-Building259 6d ago

I came here because i’m trying to implement it into an i3wm config file. And what does “model” mean here?

1

u/gbrennon 6d ago

ai model.

there are ppl that use ai agents(deterministic application that is llm driven) and ask questions or delegate tasks.

llm, large language model, is the new name for ai model

2

u/Ornery-Building259 6d ago

I see. I assumed such but was confused because I’d imagine nobody using ai would take to reddit to ask something that I can only assume from your responses is easier than I think it is. I don’t use ai, especially not for something others have already done.

→ More replies

2

u/laflexyo 5d ago

i think it's just "ragebait"

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/Ornery-Building259 6d ago

What lines would constitute “debugging lines”?

1

u/waterkip 6d ago

set -x, echo, print, etc. Anything that might hint at execution of the script so you can see more.

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):

bindsym Print exec --no-startup-id maim "/home/$USER/Pictures/$(date).png"
bindsym $mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) "/home/$USER/Pictures/$(date).png"
bindsym Shift+Print exec --no-startup-id maim --select "/home/$USER/Pictures/$(date).png"

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