Compare commits
2 commits
b28f2da899
...
39ac3ca6c4
Author | SHA1 | Date | |
---|---|---|---|
39ac3ca6c4 | |||
583cc6680d |
2 changed files with 19 additions and 2 deletions
17
bin/screenshot
Executable file
17
bin/screenshot
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Get the type from arg
|
||||
type=$1
|
||||
|
||||
# Perform action based on type
|
||||
case "$type" in
|
||||
"interactive") # Take interactive screenshot
|
||||
grim -g "$(slurp -d)" - | wl-copy -t image/jpeg
|
||||
;;
|
||||
"plain") # Take plain screenshot
|
||||
grim - | wl-copy -t image/jpeg
|
||||
;;
|
||||
*) # Handle invalid type
|
||||
echo "Invalid type, use screenshot <interactive|plain>."
|
||||
;;
|
||||
esac
|
|
@ -31,10 +31,10 @@ riverctl map normal None XF86_MonBrightnessUp spawn "$HOME/.local/bin/brightness
|
|||
riverctl map normal None XF86_MonBrightnessDown spawn "$HOME/.local/bin/brightness"
|
||||
|
||||
# Print to spawn interactive screenshot
|
||||
#riverctl map normal None Print spawn "grim -g "$(slurp -d)" - | wl-copy -t image/jpeg"
|
||||
riverctl map normal None Print spawn "$HOME/.local/bin/screenshot interactive"
|
||||
|
||||
# Shift+Print to spawn screenshot
|
||||
#riverctl map normal Shift Print spawn "grim - | wl-copy -t image/jpeg"
|
||||
riverctl map normal Shift Print spawn "$HOME/.local/bin/screenshot plain"
|
||||
|
||||
|
||||
## Focused view mapping ##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue