Commit a6f6ae1
Changed files (2)
.scripts
.scripts/screenshot.sh
@@ -0,0 +1,42 @@
+#!/bin/zsh
+
+OPTIONS=(
+ "๐ธ Capture region"
+ "๐ Capture region (to clipboard)"
+ "๐ช Capture active window"
+ "๐ฅ๏ธ Capture full screen"
+ "๐ Open screenshots folder"
+ "๐งน Clear screenshots folder"
+)
+
+# Show rofi menu and get selected option
+CHOICE=$(printf "%s\n" "${OPTIONS[@]}" | rofi -dmenu -i -p "Screenshot Menu" -theme $HOME/.scripts/scripts.rofi.rasi -theme-str 'listview {lines:6;}' 2>/dev/null)
+
+SCREENSHOT_DIR=$HOME/dev/desktop/screenshots
+mkdir -p "$SCREENSHOT_DIR" # Ensure directory exists
+
+case "$CHOICE" in
+ "๐ธ Capture region")
+ hyprshot -m region -o "$SCREENSHOT_DIR" && \
+ notify-send "Screenshot Taken" "Region saved to $SCREENSHOT_DIR"
+ ;;
+ "๐ Capture region (to clipboard)")
+ hyprshot -m region --clipboard-only && \
+ notify-send "Screenshot Copied" "Region copied to clipboard"
+ ;;
+ "๐ช Capture active window")
+ hyprshot -m window -m active -o "$SCREENSHOT_DIR" && \
+ notify-send "Screenshot Taken" "Window saved to $SCREENSHOT_DIR"
+ ;;
+ "๐ฅ๏ธ Capture full screen")
+ hyprshot -m output -o "$SCREENSHOT_DIR" && \
+ notify-send "Screenshot Taken" "Full screen saved to $SCREENSHOT_DIR"
+ ;;
+ "๐ Open screenshots folder")
+ xdg-open "$SCREENSHOT_DIR" &>/dev/null
+ ;;
+ "๐งน Clear screenshots folder")
+ rm -i "$SCREENSHOT_DIR"/* && \
+ notify-send "Screenshots Cleared" "All files deleted from $SCREENSHOT_DIR"
+ ;;
+esac
\ No newline at end of file
.scripts/scripts.rofi.rasi
@@ -0,0 +1,21 @@
+@import "custom-rasi-theme.rasi"
+
+mainbox {
+ padding: 0px;
+ margin: 0px;
+}
+
+inputbar {
+ enabled:false;
+ padding:0px;
+}
+
+listview {
+ margin:0px;
+ lines:5;
+}
+
+element {
+ padding: 10px 0px;
+ spacing: 0px;
+}