Add keyboard shortcut to upload screenshots to remote server
This commit is contained in:
parent
86c4a236f5
commit
bee635b5d3
2 changed files with 21 additions and 1 deletions
17
files/bin/flameshot-upload
Executable file
17
files/bin/flameshot-upload
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
filename=$(date '+%s').png
|
||||
save_path=$HOME/Upload/img/$filename
|
||||
temp_file=$(mktemp)
|
||||
|
||||
flameshot gui -r > "$temp_file"
|
||||
|
||||
if grep -Fq "screenshot aborted" "$temp_file"; then
|
||||
rm "$temp_file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv "$temp_file" "$save_path"
|
||||
echo "Saved to $save_path."
|
||||
|
||||
echo "https://img.theorangeone.net/$filename" | xclip -i -selection c
|
|
@ -47,9 +47,12 @@ bindsym $mod+Shift+c exec --no-startup-id vscode-project-list
|
|||
|
||||
|
||||
# Screenshots
|
||||
bindsym Shift+Print exec --no-startup-id flameshot screen -c
|
||||
bindsym Print exec --no-startup-id flameshot gui
|
||||
bindsym XF86LaunchB exec --no-startup-id flameshot gui
|
||||
bindsym Shift+Print exec --no-startup-id flameshot screen -c
|
||||
bindsym Shift+XF86LaunchB exec --no-startup-id flameshot screen -c
|
||||
bindsym $mod+Print exec --no-startup-id flameshot-upload
|
||||
bindsym $mod+XF86LaunchB exec --no-startup-id flameshot-upload
|
||||
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
|
|
Loading…
Reference in a new issue