diff --git a/.config/hypr/keybinds/binds.conf b/.config/hypr/keybinds/binds.conf index f69e5d45..6d601868 100644 --- a/.config/hypr/keybinds/binds.conf +++ b/.config/hypr/keybinds/binds.conf @@ -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 diff --git a/.config/hypr/scripts/keybindings b/.config/hypr/scripts/keybindings index 3d14d899..9be42ce4 100755 --- a/.config/hypr/scripts/keybindings +++ b/.config/hypr/scripts/keybindings @@ -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 diff --git a/.config/hypr/scripts/rofi/screenshots_selection b/.config/hypr/scripts/rofi/screenshots_selection new file mode 100755 index 00000000..92edac17 --- /dev/null +++ b/.config/hypr/scripts/rofi/screenshots_selection @@ -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" diff --git a/.config/hypr/scripts/screenshots b/.config/hypr/scripts/screenshots deleted file mode 100755 index 13eb5200..00000000 --- a/.config/hypr/scripts/screenshots +++ /dev/null @@ -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