📦️ deps(hypr): make swappy optional

This commit is contained in:
Sergio Laín 2024-03-30 13:16:48 +01:00
parent a6105ab867
commit fe79ef3f4a
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
3 changed files with 33 additions and 25 deletions

View file

@ -60,7 +60,11 @@ function send_notification() {
"${message}" \
-t "$NOTIF_TIMEOUT" -i "${1}" -a Hyprshot)
if [ -n "$action" ]; then
xdg-open "${1}"
if command -v swappy &>/dev/null; then
swappy -f "$1"
else
xdg-open "$1"
fi
fi
}

View file

@ -4,4 +4,8 @@ IMAGE_DIR="$HOME/Imagenes/Capturas/PC"
SELECTION=$(find "$IMAGE_DIR" -type f -exec ls -t {} + | awk -F/ '{print $NF}' | rofi -dmenu)
if command -v swappy &>/dev/null; then
swappy -f "$IMAGE_DIR/$SELECTION"
else
xdg-open "$IMAGE_DIR/$SELECTION"
fi

8
.github/README.md vendored
View file

@ -105,7 +105,7 @@ Here is all the information about my setup:
<summary><b>🐧 System</b></summary>
| 📚 Entry | ✨ App |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------- |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **OS** | 💖 [Arch Linux](https://archlinux.org/) |
| **Package Manager** | [pacman](https://wiki.archlinux.org/title/Pacman) [:gear:](../.config/pacman/) |
| **AUR Helper** | 💖 [yay](https://github.com/Jguer/yay) [:gear:](../.config/yay/) |
@ -121,7 +121,7 @@ Here is all the information about my setup:
| **Lock Screen** | [hyprlock](https://github.com/hyprwm/hyprlock) [:gear:](../.config/hypr/hyprlock.conf) |
| **Idle Timeout** | [hypridle](https://github.com/hyprwm/hypridle) [:gear:](../.config/hypr/hypridle.conf) |
| **Color Picker** | [hyprpicker](https://github.com/hyprwm/hyprpicker) |
| **Screenshot Tool** | [hyprshot](https://github.com/Gustash/Hyprshot) |
| **Screenshot Tool** | [hyprshot](https://github.com/Gustash/Hyprshot) (Using [grim](https://sr.ht/~emersion/grim/) and [slurp](https://github.com/emersion/slurp)) |
| **Recording Tool** | [wf-recorder](https://github.com/ammen99/wf-recorder) |
| **Screenshot Editor** | [swappy](https://github.com/jtheoof/swappy) |
| **Logout Menu** | [wleave](https://github.com/AMNatty/wleave) [:gear:](../.config/wleave/) |
@ -217,7 +217,7 @@ Here is all the information about my setup:
yay -Sy hyprland hyprlock hypridle xdg-desktop-portal-hyprland hyprpicker \
swww waybar-cava wleave-git rofi-lboon-wayland swaync swayosd-git wl-clipboard wf-recorder \
pyprland qt5ct pavucontrol cliphist playerctl udiskie devify fzf jq eza fd \
catppuccin-gtk-theme-macchiato catppuccin-cursors-macchiato cava slurp grim swappy
catppuccin-gtk-theme-macchiato catppuccin-cursors-macchiato cava slurp grim
```
On the first line we have the hypr ecosystem packages and on the other lines we have the must have packages.
@ -255,7 +255,7 @@ Here is all the information about my setup:
- Useful GUI packages
```bash
yay -Sy pika-backup vesktop-bin nwg-displays nwg-look gnome-logs galculator gparted nm-connection-editor
yay -Sy pika-backup vesktop-bin nwg-displays nwg-look gnome-logs galculator gparted nm-connection-editor swappy
```
3. **Installing the dotfiles**: