hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.97k stars 912 forks source link

Some commands don't work in bind exec #572

Closed mshzsh closed 2 years ago

mshzsh commented 2 years ago

Some scripts do not work in bind exec in hyprland.conf , like: awk 'NR==2 { print $3 }' for example: bind=SUPERALT,P,exec,slurp -p | grim -g - - | convert - txt: | awk 'NR==2 { print $3 }' | wl-copy or --preview='cat {}' (in fzf) for example: bind=SUPER,G,exec,alacritty -e clipman pick --print0 --tool=CUSTOM --tool-args="fzf --prompt 'pick > ' --bind 'tab:up' --cycle --read0 --color=bw --border=rounded --preview='cat {}' --preview-window=top:30%:wrap"

It should be noted that all these commands work in the system terminal

viperML commented 2 years ago

Why not put that long command in a script, and reference that instead?

vaxerski commented 2 years ago

your command is launched like this:

/bin/sh -c "WAYLAND_DISPLAY=[set by hl] DISPLAY=[set by hl] [your command]"

(DISPLAY wont be set if no xwayland)

if that interferes with your script, you need to update it accordingly.

mshzsh commented 2 years ago

@viperML 's idea was a good idea, I think I should use the same method

mshzsh commented 2 years ago

What are your ideas for switching between the latest workspaces? like back_and_forth in i3

JustSimplyKyle commented 2 years ago

It is supported, the workspace previous combined with an option(binds:allow_workspace_cycle) gives you the exact same result Post Edit: if you have a question, use github discussion or discord, don't chat in unrelated issues

vaxerski commented 2 years ago

Closing. No activity + not an issue really. Use a script.