From e152569c5dfded637c7c049b04b67d9d8e8bedb8 Mon Sep 17 00:00:00 2001 From: retrilzzy Date: Tue, 30 Dec 2025 16:11:37 +0500 Subject: [PATCH] Improve screenshot binds and scripts --- Configs/.config/bin/screenshot-chibisafe.sh | 18 +++++++++--------- Configs/.config/bin/screenshot-zipline.sh | 18 +++++++++--------- Configs/.config/hypr/hyprland/keybindings.conf | 11 +++++------ README-ru.md | 15 ++------------- README.md | 15 ++------------- Scripts/install.sh | 4 ++-- 6 files changed, 29 insertions(+), 52 deletions(-) diff --git a/Configs/.config/bin/screenshot-chibisafe.sh b/Configs/.config/bin/screenshot-chibisafe.sh index 81e1a74..043fea1 100755 --- a/Configs/.config/bin/screenshot-chibisafe.sh +++ b/Configs/.config/bin/screenshot-chibisafe.sh @@ -5,12 +5,12 @@ set -e -if [[ -f "$HOME/.config/hypr/scripts/.env" ]]; then - source "$HOME/.config/hypr/scripts/.env" +if [[ -f "$HOME/.config/bin/.env" ]]; then + source "$HOME/.config/bin/.env" fi if [[ -z "$CHIBISAFE_URL" || -z "$CHIBISAFE_API_KEY" ]]; then - echo "❌ CHIBISAFE_URL or CHIBISAFE_API_KEY is not set. Check the .env file." + echo "CHIBISAFE_URL or CHIBISAFE_API_KEY is not set. Check the .env file." exit 1 fi @@ -20,10 +20,10 @@ FILE_PATH="/tmp/$FILENAME" REGION=$(slurp) || exit 1 [ -n "$REGION" ] || exit 1 -grim -g "$REGION" "$FILE_PATH" || exit 1 +grim -c -g "$(slurp -d)" -t ppm - | satty --filename - --fullscreen --disable-notifications --initial-tool brush --early-exit --output-filename "$FILE_PATH" || exit 1 send_notification() { - notify-send "Chibisafe Uploader" "$1" -t 2000 + notify-send "Chibisafe Uploader" "$1" -i browser-download -t 2000 } copy_to_clipboard() { @@ -40,15 +40,15 @@ response=$(curl -s -X POST "$CHIBISAFE_URL/api/upload" \ url=$(echo "$response" | jq -r '.url // empty') if [[ -n "$url" ]]; then - echo "✅ File uploaded successfully." + echo "File uploaded successfully." echo "Response: $response" - send_notification "✅ File uploaded successfully" + send_notification "File uploaded successfully" copy_to_clipboard "$url" else - echo "❌ Upload failed" + echo "Upload failed" echo "Response: $response" - send_notification "❌ Upload failed" + send_notification "Upload failed" exit 1 fi diff --git a/Configs/.config/bin/screenshot-zipline.sh b/Configs/.config/bin/screenshot-zipline.sh index cafb3cd..665d8bc 100755 --- a/Configs/.config/bin/screenshot-zipline.sh +++ b/Configs/.config/bin/screenshot-zipline.sh @@ -5,22 +5,22 @@ set -e -if [[ -f "$HOME/.config/hypr/scripts/.env" ]]; then - source "$HOME/.config/hypr/scripts/.env" +if [[ -f "$HOME/.config/bin/.env" ]]; then + source "$HOME/.config/bin/.env" fi if [[ -z "$ZIPLINE_URL" || -z "$ZIPLINE_API_KEY" || -z "$ZIPLINE_FOLDER_ID" ]]; then - echo "❌ ZIPLINE_URL or ZIPLINE_API_KEY or ZIPLINE_FOLDER_ID is not set. Check the .env file." + echo "ZIPLINE_URL or ZIPLINE_API_KEY or ZIPLINE_FOLDER_ID is not set. Check the .env file." exit 1 fi FILENAME="$(date +%F_$((RANDOM % 10000))).png" FILE_PATH="/tmp/$FILENAME" -flameshot gui -p "$FILE_PATH" || exit 1 +grim -c -g "$(slurp -d)" -t ppm - | satty --filename - --fullscreen --disable-notifications --initial-tool brush --early-exit --output-filename "$FILE_PATH" || exit 1 send_notification() { - notify-send "Zipline Uploader" "$1" -t 2000 + notify-send "Zipline Uploader" "$1" -i browser-download -t 2000 } copy_to_clipboard() { @@ -43,16 +43,16 @@ response=$( url=$(echo "$response" | jq -r ".files[0].url // empty") if [[ -n "$url" ]]; then - echo "✅ File uploaded successfully." + echo "File uploaded successfully." echo "Response: $response" - send_notification "✅ File uploaded successfully" + send_notification "File uploaded successfully" copy_to_clipboard "$url" else - echo "❌ Upload failed" + echo "Upload failed" echo "Response: $response" - send_notification "❌ Upload failed" + send_notification "Upload failed" exit 1 fi diff --git a/Configs/.config/hypr/hyprland/keybindings.conf b/Configs/.config/hypr/hyprland/keybindings.conf index c18d187..ed6e819 100644 --- a/Configs/.config/hypr/hyprland/keybindings.conf +++ b/Configs/.config/hypr/hyprland/keybindings.conf @@ -40,9 +40,6 @@ bind = $mainMod, N, exec, swaync-client -t -sw bind = $mainMod ALT, P, exec, ~/.config/bin/change-wall.sh ~/Pictures/Wallpapers bind = $mainMod SHIFT, P, exec, ~/.config/bin/wall-selector.sh ~/Pictures/Wallpapers -# Screen Recording -bind = $mainMod SHIFT, R, exec, ~/.config/bin/record.sh - # Toggle Waybar bind = $mainMod, ESCAPE, exec, killall waybar || waybar -c ~/.config/waybar/config.jsonc -s ~/.config/waybar/styles.css @@ -50,6 +47,8 @@ bind = $mainMod, ESCAPE, exec, killall waybar || waybar -c ~/.config/waybar/conf # Toggle Microphone bind = $mainMod, M, exec, ~/.config/bin/mic-control.sh m +# Screen Recording +bind = $mainMod SHIFT, R, exec, ~/.config/bin/record.sh # Toggle NoScreenShare bind = $mainMod, H, exec, ~/.config/bin/toggle-noscreenshare.sh @@ -63,9 +62,9 @@ bindl = $mainMod ALT, S, exec, systemctl suspend # Screenshots -bind = , Print, exec, grim -c - | wl-copy && wl-paste > ~/Pictures/Screen/$(date +%F_%H-%M-%S)_grim.png && notify-send "Grim" "Screenshot of whole screen taken." -t 2000 -bind = SHIFT, Print, exec, hyprshot -m region -t 2000 -o ~/Pictures/Screen -f $(date +%F_%H-%M-%S)_hyprshot.png -bind = $mainMod SHIFT, F, exec, flameshot gui -r -p ~/Pictures/Screen | wl-copy --type image/png +bind = , Print, exec, hyprshot -m output -t 1500 -o ~/Pictures/Screen -f $(date +%F_%H-%M-%S)_hyprshot.png +bind = SHIFT, Print, exec, hyprshot -m region -t 1500 -o ~/Pictures/Screen -f $(date +%F_%H-%M-%S)_hyprshot.png +bind = $mainMod SHIFT, S, exec, grim -c -g "$(slurp -d)" -t ppm - | satty --filename - --fullscreen --disable-notifications --early-exit --initial-tool brush --output-filename ~/Pictures/Screen/$(date +%F_%H-%M-%S)_satty.png && notify-send "Satty" "Screenshot saved to ~/Pictures/Screen" -t 1500 -i format-add-node bind = $mainMod, PRINT, exec, ~/.config/bin/screenshot-zipline.sh diff --git a/README-ru.md b/README-ru.md index 3b6d474..6793e08 100644 --- a/README-ru.md +++ b/README-ru.md @@ -51,7 +51,6 @@ - [Swaync](#swaync) - уведомления. - [Waypaper](#waypaper) - GUI для простого управление обоями. - [Обои](#обои) - коллекция обоев/фонов. - - [Flameshot](#flameshot) - мощная утилита для скриншотов. - [Fastfetch](#fastfetch) - похвастаться Линуксом. > [!WARNING] @@ -139,7 +138,6 @@ | `base-devel` | Инструменты разработки для сборок AUR | | `brightnessctl` | Управление яркостью экрана | | `fastfetch` | Просмотр информации о системе | -| `flameshot` | Утилита для создания скриншотов | | `git` | Система контроля версий | | `gpu-screen-recorder` | Запись экрана с ускорением GPU | | `grim` | Утилита для скриншотов Wayland | @@ -149,6 +147,7 @@ | `network-manager-applet` | Апплет для управления сетью | | `pavucontrol` | GUI для управления звуком | | `playerctl` | Управление медиаплеерами | +| `satty` | Утилита для создания скриншотов | | `trash-cli` | Утилита корзины командной строки | | `uwsm` | Менеджер сессий Wayland | | `wl-clip-persist` | Сохранение содержимого буфера обмена | @@ -292,7 +291,7 @@ | :------------------------------------------------- | :--------------------------------------------------------------- | | Print | Скриншот всего экрана | | Shift + Print | Скриншот выделенной области | -| Super + Shift + F | Flameshot GUI (утилита для скриншотов) | +| Super + Shift + S | Satty (инструмент для скриншотов с аннотациями) | | Super + Print | Скриншот и авто загрузка на [Zipline](https://zipline.diced.sh/) | @@ -658,16 +657,6 @@ yay -S mpvpaper - [Matugen](https://share.rzx.ovh/folder/cmik5z0om005001pc7996irnv) - [Монохром](https://share.rzx.ovh/folder/cm8q1lxwp000mln01qsqbpb7f) -## Flameshot - -Мощная утилита для скриншотов. [[конфиг](./Configs/.config/flameshot/)] - -https://flameshot.org - -``` -yay -S flameshot-git -``` - ## Fastfetch Похвастаться линуксом [[конфиг](./Configs/.config/fastfetch/)] diff --git a/README.md b/README.md index 3179247..361b1e8 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,6 @@ - [Swaync](#swaync) - notifications. - [Waypaper](#waypaper) - GUI for easy wallpaper management. - [Wallpapers](#wallpapers) - collection of wallpapers. - - [Flameshot](#flameshot) - powerful screenshot utility. - [Fastfetch](#fastfetch) - show off your Linux. > [!WARNING] @@ -139,7 +138,6 @@ Packages installed by [`install.sh`](./Scripts/install.sh). | `base-devel` | Development tools for AUR builds | | `brightnessctl` | Brightness control | | `fastfetch` | System information viewer | -| `flameshot` | Screenshot tool | | `git` | Version control system | | `gpu-screen-recorder` | GPU-accelerated screen recorder | | `grim` | Wayland screenshot tool | @@ -149,6 +147,7 @@ Packages installed by [`install.sh`](./Scripts/install.sh). | `network-manager-applet` | Network management tray applet | | `pavucontrol` | PulseAudio volume control | | `playerctl` | Media player control | +| `satty` | Screenshot tool | | `trash-cli` | Command-line trash utility | | `uwsm` | Wayland session manager | | `wl-clip-persist` | Clipboard persistence | @@ -293,7 +292,7 @@ Dynamic tiling Wayland compositor. | :------------------------------------------------- | :----------------------------------------------------------------- | | Print | Screenshot of the entire screen | | Shift + Print | Screenshot of the selected area | -| Super + Shift + F | Flameshot GUI (screenshot utility) | +| Super + Shift + S | Satty (screenshot annotation tool) | | Super + Print | Screenshot and auto upload to [Zipline](https://zipline.diced.sh/) | @@ -659,16 +658,6 @@ yay -S mpvpaper - [Matugen](https://share.rzx.ovh/folder/cmik5z0om005001pc7996irnv) - [Monochrome](https://share.rzx.ovh/folder/cm8q1lxwp000mln01qsqbpb7f) -## Flameshot - -Powerful screenshot utility. [[config](./Configs/.config/flameshot/)] - -https://flameshot.org - -``` -yay -S flameshot-git -``` - ## Fastfetch Show off your linux [[config](./Configs/.config/fastfetch/)] diff --git a/Scripts/install.sh b/Scripts/install.sh index c8532de..bafc42a 100755 --- a/Scripts/install.sh +++ b/Scripts/install.sh @@ -415,8 +415,8 @@ main() { if [ "$SKIP_UTILITIES_TOOLS" = false ]; then print_section "Utilities and tools" - install_pacman brightnessctl imagemagick fastfetch grim tar lsd pavucontrol playerctl trash-cli uwsm wl-clipboard wl-clip-persist - install_yay flameshot-git gpu-screen-recorder nautilus network-manager-applet + install_pacman brightnessctl imagemagick fastfetch grim tar lsd pavucontrol playerctl satty trash-cli uwsm wl-clipboard wl-clip-persist + install_yay gpu-screen-recorder nautilus network-manager-applet else print_warning "Skipping Utilities and tools packages installation." fi