♻️ refactor(hyprland): changed the screenshot selector and the bind selector to use rofi, just like the wallpaper switcher

This commit is contained in:
Sergio Laín 2023-10-07 22:58:28 +02:00
parent 4812602708
commit c9f5668973
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
4 changed files with 10 additions and 23 deletions

View file

@ -50,7 +50,7 @@ bind=SUPER,V,exec,pypr toggle volume
bind=SHIFT,Insert,exec, hyprshot -m output -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png
bind=SUPERSHIFT,Insert,exec, hyprshot -m window -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png
bind=CTRL,Insert,exec, hyprshot -m region -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png
bind=ALT,Insert,exec, ~/.config/hypr/scripts/screenshots
bind=ALT,Insert,exec, ~/.config/hypr/scripts/rofi/screenshots_selection
# Logout menu
bind=SUPER, space, exec, wleave

View file

@ -1,7 +1,4 @@
#!/usr/bin/bash
CONFIG=$(rofi -show file-browser-extended -theme ~/.config/rofi/style.rasi -file-browser-stdout -file-browser-dir $HOME/.config/keyb/bindings)
CONFIG=$(ls $HOME/.config/keyb/bindings/ | rofi -dmenu -i -p "Selecciona una configuracion de binds" -theme ~/.config/rofi/style.rasi)
if [ -n "$CONFIG" ]; then
kitty --class keyb-kitty keyb -k $HOME/.config/keyb/bindings/$CONFIG &
fi
kitty --class keyb-kitty keyb -k $CONFIG

View file

@ -0,0 +1,7 @@
#!/usr/bin/bash
IMAGE_DIR="$HOME/Imagenes/Capturas/PC/"
SELECTION=$(ls -t "$IMAGE_DIR" | rofi -show file-browser-extended -file-browser-stdin -theme ~/.config/rofi/style.rasi -file-browser-stdout -file-browser-dir "$IMAGE_DIR")
swappy -f "$SELECTION"

View file

@ -1,17 +0,0 @@
#!/usr/bin/bash
DIRECTORIO_IMAGENES="$HOME/Imagenes/Capturas/PC/"
IMAGENES=$(ls -t "$DIRECTORIO_IMAGENES"/*.png 2>/dev/null)
NOMBRES_IMAGENES=""
for IMAGEN in $IMAGENES; do
NOMBRES_IMAGENES+="$(basename "$IMAGEN")\n"
done
SELECCION=$(echo -e "$NOMBRES_IMAGENES" | rofi -dmenu -i -p "Selecciona una imagen" -theme ~/.config/rofi/style.rasi)
if [ -n "$SELECCION" ]; then
IMAGEN_SELECCIONADA="$DIRECTORIO_IMAGENES/$SELECCION"
swappy -f "$IMAGEN_SELECCIONADA" &
fi