summaryrefslogtreecommitdiff
path: root/mango
diff options
context:
space:
mode:
authoranand <anand.panchdhari@gmail.com>2026-03-06 21:50:46 +0530
committeranand <anand.panchdhari@gmail.com>2026-03-06 21:50:46 +0530
commit6c6eaccb86c882059b8c74bbf5840370b10f2886 (patch)
tree7b74a5a6170e6c729fec4709d9fd688c742e90d7 /mango
parent61ffaae6e2c9937dbff8b38d59bf844bab9009ca (diff)
De-hypr-ed my configs
Diffstat (limited to 'mango')
-rwxr-xr-xmango/config.conf2
-rwxr-xr-xmango/screenshotwayland.sh23
2 files changed, 24 insertions, 1 deletions
diff --git a/mango/config.conf b/mango/config.conf
index 00dd941..a1185e8 100755
--- a/mango/config.conf
+++ b/mango/config.conf
@@ -151,7 +151,7 @@ bind=NONE,XF86AudioMicMute,spawn, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bind=NONE,XF86MonBrightnessUp,spawn, brillo -qA 5
bind=NONE,XF86MonBrightnessDown,spawn, brillo -qU 5
-bind=SUPER+SHIFT,s,spawn,/home/anand/dots/hypr/screenshotwayland.sh
+bind=SUPER+SHIFT,s,spawn,/home/anand/dots/mango/screenshotwayland.sh
# menu and terminal
bind=SUPER,space,spawn,rofi -show drun
diff --git a/mango/screenshotwayland.sh b/mango/screenshotwayland.sh
new file mode 100755
index 0000000..642da01
--- /dev/null
+++ b/mango/screenshotwayland.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+input_type=$(printf "region\nwindow" | rofi -dmenu)
+case "$input_type" in
+ "window")
+ # hyprshot -m window --clipboard-only
+ grim -g "$(slurp)" - | wl-copy
+ ;;
+ *)
+ # hyprshot -m region --clipboard-only
+ grim -g "$(slurp)" - | wl-copy
+ ;;
+esac
+
+choice=$(printf "save to clipboard\nsave to file" | rofi -dmenu)
+
+case "$choice" in
+ "save to file")
+ wl-paste > ~/Pictures/Screenshots/screenshot-$(date +%F_%H-%M-%S).png
+ ;;
+ *)
+ exit 0
+ ;;
+esac