commit a2bdf977d93c10e5c377e88cfcea9f7448bb9fa4 Author: dqnid Date: Mon Apr 3 17:47:42 2023 +0200 New folder structure diff --git a/Applets/monitor.sh b/Applets/monitor.sh new file mode 100755 index 0000000..106f881 --- /dev/null +++ b/Applets/monitor.sh @@ -0,0 +1,69 @@ +#!/bin/bash +interno=eDP +externo=HDMI-A-0 +externo2=DisplayPort-0 +eleccion="" + +#Todo mal pero tremendo palo cambiarlo: +# ejecutar un solo randr con variables +# modificar las variables en función de la entrada +# igual renta sacar las opciones del propio xrandr usando awk y grep +if xrandr | grep "$externo connected" && xrandr | grep "$externo2 connected"; then + eleccion="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'System' -width 12 -line-padding 3 -lines 3 -theme /home/danih/Scripts/Temas/monitor.rasi <<< "Una|Dos|Tres")" + case "$eleccion" in + Dos) + xrandr --output "$interno" --off --output "$externo2" --above "$interno" --auto --output "$externo" --auto --rotate left --right-of "$externo2" + ;; + Tres) + xrandr --output "$interno" --auto --output "$externo2" --above "$interno" --auto --output "$externo" --auto --right-of "$externo2" + ;; + Una) + xrandr --output "$externo" --off --output "$externo2" --off --output "$interno" --auto + ;; + esac +elif xrandr | grep "$externo connected"; then + eleccion="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'System' -width 12 -line-padding 3 -lines 6 -theme /home/danih/Scripts/Temas/monitor.rasi <<< "Dual Side|Dual Top|Dual Side Vertical|Interna|Externa|Duplicar")" + case "$eleccion" in + "Dual Top") + xrandr --output "$interno" --auto --mode 1920x1080 --output "$externo" --auto --above "$interno" --output "$externo2" --off + ;; + "Dual Side") + xrandr --output HDMI-A-0 --primary --mode 1920x1080 --rate 120 --pos 1920x0 --rotate normal --output eDP --mode 1920x1080 --rate 60 --pos 0x600 --rotate normal --output DisplayPort-0 --off --output DisplayPort-1 --off + ;; + "Dual Side Vertical") + xrandr --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate right --output eDP --primary --mode 1920x1080 --pos 1080x1762 --rotate normal --output DisplayPort-0 --off --output DisplayPort-1 --off + ;; + Duplicar) + xrandr --output "$interno" --auto --output "$externo" --same-as "$interno" --output "$externo2" --off + ;; + Externa) + xrandr --output "$interno" --auto --output "$externo" --auto --above "$interno" --output "$externo2" --off + xrandr --output "$externo" --mode 1920x1080 --rate 144 --output "$interno" --off --output "$externo2" --off + ;; + Interna) + xrandr --output "$externo" --off --output "$externo2" --off --output "$interno" --auto + ;; + esac +elif xrandr | grep "$externo2 connected"; then + eleccion="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'System' -width 12 -line-padding 3 -lines 4 -theme /home/danih/Scripts/Temas/monitor.rasi <<< "Dual|Interna|Externa|Duplicar")" + case "$eleccion" in + Dual) + xrandr --output "$interno" --auto --primary --output "$externo2" --above "$interno" --auto --output "$externo" --off + ;; + Duplicar) + xrandr --output "$interno" --auto --output "$externo2" --same-as "$interno" --output "$externo" --off + ;; + Externa) + xrandr --output "$interno" --auto --primary --output "$externo2" --above "$interno" --auto --output "$externo" --off + xrandr --output "$externo2" --output "$interno" --off --output "$externo" --off + ;; + Interna) + xrandr --output "$externo" --off --output "$externo2" --off --output "$interno" --auto + ;; + esac +else + xrandr --output "$externo" --off --output "$externo2" --off --output "$interno" --auto +fi +[[ "eleccion" = "" ]] && exit 1 +i3 restart +#bspc wm -r diff --git a/Applets/mountRofiUSB.sh b/Applets/mountRofiUSB.sh new file mode 100755 index 0000000..325278f --- /dev/null +++ b/Applets/mountRofiUSB.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +pgrep -x rofi && exit + +get_passwd() { + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "Password : "\ + -theme ~/Scripts/rofi/confirm.rasi +} +get_dir(){ + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "usr@dir: "\ + -theme ~/Scripts/rofi/getinfo.rasi +} + +class=$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'Type of drive: ' -theme ~/Scripts/rofi/drives.rasi <<< "NORMAL|ENCRYPTED|SERVER") +[[ "$class" = "" ]] && exit 1 + +if test $class == "SERVER"; then + dir=$(get_dir) + passw=$(get_passwd) + sshfs -p 2222 $dir /mnt/Server <<< $passw + if test $? -eq 0; then + notify-send "Mounted" "Server mounted to /mnt/Server" + exit 1 + else + notify-send "Error mounting" "Couldn't mount the drive" + exit 0 + fi +fi + +montable=$(lsblk -lp | grep "part $" | grep -v "nvme"| grep -v "sda" | grep -v "sdb" | grep -v "sdc" | awk '{print $1, "(" $4 ")"}') +if test "$montable" == ""; then + notify-send "Error" "No discs found to mount" + exit 1 +fi +eleccion=$(rofi -no-config -no-lazy-grab -sep "\n" -dmenu -i -p '¿Disco a montar?' -theme ~/Scripts/rofi/drives.rasi <<< "$montable" | awk '{print($1)}') +#eleccion=$(echo "$montable" | dmenu -i -p "¿Disco a montar?" -nb '#'$colorFondo -sf '#'$colorFondo -sb '#'$colorAzul -nf '#'$colorAzul -fn 'Envy Code R-12' | awk '{print($1)}') +[[ "$eleccion" = "" ]] && exit 1 + +case "$class" in + ENCRYPTED) + passwd=$(get_passwd &) + + echo $passwd | sudo -A cryptsetup luksOpen $eleccion dqnid + sudo -A mount /dev/mapper/dqnid /mnt/Encrypted + if test $? -eq 0;then + notify-send "Mounted" "Disc mounted at /mnt/Encrypted" + fi + ;; + NORMAL) + udisksctl mount -b "$eleccion" + ;; +esac diff --git a/Applets/redesWifi.sh b/Applets/redesWifi.sh new file mode 100755 index 0000000..ef4958d --- /dev/null +++ b/Applets/redesWifi.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +#Versión megabásica que no diferencia entre redes con passphrase y password +#A parte parece que puede fallar el scan + +contra() { + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "¿Contraseña? : "\ + -theme ~/Scripts/Temas/confirm.rasi +} + +antena="wlan0" + +# Refresco primero +iwctl station $antena get-networks +redes=$(iwctl station $antena get-networks | grep '*' | awk '{print $2}') +[[ $? == 1 ]] && exit 1 + +eleccion=$(rofi -no-config -no-lazy-grab -sep "\n" -dmenu -i -p '¿Red a conectar?' -theme ~/Scripts/Temas/discos.rasi <<< $redes) +[[ "$eleccion" == "" ]] && exit 1 + +pass=$(contra &) +[[ $pass == "" ]] && exit 1 +iwctl --passphrase $pass station $antena connect $eleccion +[[ $? == 1 ]] && exit 1 diff --git a/Applets/umountRofiUSB.sh b/Applets/umountRofiUSB.sh new file mode 100755 index 0000000..947b8c3 --- /dev/null +++ b/Applets/umountRofiUSB.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +pgrep -x dmenu && exit + +class=$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'Type of disc?' -theme ~/Scripts/rofi/drives.rasi <<< "NORMAL|ENCRYPTED|SERVER") +[[ "$class" = "" ]] && exit 1 + +case "$class" in + ENCRYPTED) + sudo -A umount /mnt/Encrypted + sudo -A cryptsetup luksClose dqnid + if test $? -eq 0;then + notify-send "Unmounted" "Disc unmounted" + fi + ;; + NORMAL) + montable=$(lsblk -lp | grep "part /." | grep -v "nvme" | awk '{print $1, "(" $4 ")"}') + if test "$montable" == ""; then + notify-send "Error" "No discs found to umount" + exit 1 + fi + eleccion=$(rofi -no-config -no-lazy-grab -sep "\n" -dmenu -i -p 'Disc to unmount?' -theme ~/Scripts/rofi/drives.rasi <<< "$montable" | awk '{print($1)}') + [[ "$eleccion" = "" ]] && exit 1 + udisksctl unmount -b "$eleccion" + ;; + SERVER) + umount /mnt/Server + ;; +esac diff --git a/Compilers/compilaKotlin.sh b/Compilers/compilaKotlin.sh new file mode 100755 index 0000000..453b4b2 --- /dev/null +++ b/Compilers/compilaKotlin.sh @@ -0,0 +1,29 @@ +#!/bin/bash +bin="bin" +if test $# -eq 1; then + dir=$(pwd) + jar=$(echo $1 | awk -F'.kt' '{print $1}') + if test -d "$dir/$bin"; then + kotlinc "$dir/$1" -include-runtime -d "$dir/$bin/$jar.jar" + else + kotlinc "$dir/$1" -include-runtime -d "$dir/$jar.jar" + fi +elif test $# -ge 2; then + dir=$(pwd) + jar=$(echo $2 | awk -F'.kt' '{print $1}') + if test $1 -eq 1; then + if test -d "$dir/$bin"; then + kotlinc "$dir/$2" -include-runtime -d "$dir/$bin/$jar.jar" + java -jar "$dir/$bin/$jar.jar" + else + kotlinc "$dir/$2" -include-runtime -d "$dir/$jar.jar" + java -jar "$dir/$jar.jar" + fi + fi +else + echo "Use:" + echo -e " $ \u001b[32mck name.kt \u001b[0m" + echo -e " $ \u001b[33mck name.kt 1\u001b[0m" + echo -e "**note: if a bin folder exists, will output .jar there" + exit 1 +fi diff --git a/Compilers/compilaLatexPDF.sh b/Compilers/compilaLatexPDF.sh new file mode 100755 index 0000000..ee32634 --- /dev/null +++ b/Compilers/compilaLatexPDF.sh @@ -0,0 +1,11 @@ +#!/bin/bash +if [ $# -ne 2 ] +then + echo "./ejecutable auxiliar/ fichero.tex" + exit 1 +fi +dir=$(pwd) +#pdflatex --output-directory="$dir/$1" "$dir/$2" +xelatex --output-directory="$dir/$1" "$dir/$2" +pdf=$(echo $2 | awk -F'.tex' '{print $1}') +mv "$dir/$1/$pdf.pdf" "$dir/" diff --git a/README.md b/README.md new file mode 100755 index 0000000..c3695c9 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Scripts +My shell scripts and other utilities. diff --git a/System/ShowHelp.sh b/System/ShowHelp.sh new file mode 100755 index 0000000..847c3b5 --- /dev/null +++ b/System/ShowHelp.sh @@ -0,0 +1,8 @@ +#!/bin/bash +groff -ms -D UTF-8 ~/Documents/Anotaciones/Ficheros\ Fuente/Documentación_Linux.ms -T pdf > ~/Documents/Anotaciones/Documentación_Linux.pdf +groff -ms -D UTF-8 ~/Documents/Anotaciones/Ficheros\ Fuente/Atajos.ms -T pdf > ~/Documents/Anotaciones/Atajos.pdf +if test $1 -eq 1; then + mupdf-x11 ~/Documents/Anotaciones/Documentación_Linux.pdf +else + mupdf-x11 ~/Documents/Anotaciones/Atajos.pdf +fi diff --git a/System/ajustaBrillo.sh b/System/ajustaBrillo.sh new file mode 100755 index 0000000..e8e58be --- /dev/null +++ b/System/ajustaBrillo.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +x=$(cat /sys/class/backlight/amdgpu_bl0/brightness) +if test $1 -eq 1; then + x=$(($x + $2)) + echo $x > /sys/class/backlight/amdgpu_bl0/brightness +elif test $1 -eq 0; then + x=$(($x - $2)) + echo $x > /sys/class/backlight/amdgpu_bl0/brightness +elif test $1 -eq 2; then + echo 20 > /sys/class/backlight/amdgpu_bl0/brightness +fi diff --git a/System/ajustaBrilloTeclado.sh b/System/ajustaBrilloTeclado.sh new file mode 100755 index 0000000..e4c6904 --- /dev/null +++ b/System/ajustaBrilloTeclado.sh @@ -0,0 +1,9 @@ +#!/bin/bash +max=$(cat /sys/class/leds/asus::kbd_backlight/max_brightness) +actual=$(cat /sys/class/leds/asus::kbd_backlight/brightness) +if test $actual == $max; then + echo 0 > /sys/class/leds/asus::kbd_backlight/brightness +else + nueva=$(($actual + 1)) + echo $nueva > /sys/class/leds/asus::kbd_backlight/brightness +fi diff --git a/System/ajustaSonido.sh b/System/ajustaSonido.sh new file mode 100755 index 0000000..aae5c6a --- /dev/null +++ b/System/ajustaSonido.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +volumen="100|90|80|70|60|50|40|30|20|10|0" +elegirPorcentaje (){ + eleccion=$(rofi -no-config -no-lazy-grab -hover-select -me-select-entry '' -me-accept-entry MousePrimary -sep "|" -dmenu -i -p ¿Volumen? -theme ~/Scripts/Temas/pulsemenu.rasi <<< "$volumen") + echo "$eleccion" +} + +if [ $1 -eq 1 ]; then + eleccion="$(elegirPorcentaje)" + pamixer --set-volume $eleccion +else + opciones="Salida|Entrada|V.Salida|V.Entrada|Pavucontrol" + eleccion=$(rofi -no-config -no-lazy-grab -hover-select -me-select-entry '' -me-accept-entry MousePrimary -sep "|" -dmenu -i -p ¿Acción? -theme ~/Scripts/Temas/pulsemenu.rasi <<< "$opciones") + + case $eleccion in + Salida) + dispositivo=$(pamixer --list-sinks | grep -v "Sinks:" | awk '{print $1}') + eleccion=$(rofi -no-config -no-lazy-grab -hover-select -me-select-entry '' -me-accept-entry MousePrimary -sep "\n" -dmenu -i -p ¿Dispositivo? -theme ~/Scripts/Temas/pulsemenu.rasi <<< "$dispositivo") + # No funciona, no encuentro herramienta que lo haga sencillo. pacmd parece que tocará. + pacmd list-sinks | grep "alsa.name" + pacmd set-default-sink $eleccion + ;; + Entrada) + ;; + V.Salida) + eleccion="$(elegirPorcentaje)" + pamixer --set-volume $eleccion + ;; + V.Entrada) + eleccion="$(elegirPorcentaje)" + # Chapuza, solo cambia el volumen del micrófono del portátil, debería cambiar el que esté predeterminado. + dispositivo=$(pamixer --list-sources | grep "Digital Microphone" | awk '{print $1}') + pamixer --source $dispositivo --set-volume $eleccion + ;; + Pavucontrol) + pavucontrol + ;; + *) + exit 1 + ;; + esac + sinks=$(pamixer --list-sinks) + sources=$(pamixer --list-sources) +fi +#awk '/Raptors/,/Celtics/ { print $1 }' diff --git a/System/ajustaTouchpad.sh b/System/ajustaTouchpad.sh new file mode 100755 index 0000000..8f32c61 --- /dev/null +++ b/System/ajustaTouchpad.sh @@ -0,0 +1,15 @@ +#!/bin/bash +id=$(xinput list | grep Touchpad | awk '{print $6}' | grep -o '[0-9]\+') +tap=$(xinput list-props $id | grep "Tapping Enabled (" | awk '{print $4}' | grep -o '[0-9]\+') +speed=$(xinput list-props $id | grep "Accel Speed (" | awk '{print $4}' | grep -o '[0-9]\+') +scroll=$(xinput list-props $id | grep "Natural Scrolling Enabled (" | awk '{print $5}' | grep -o '[0-9]\+') + +echo $id $tap $speed + +xinput set-prop $id $tap 1 +xinput set-prop $id $speed 0.4 +xinput set-prop $id $scroll 1 + +unset id +unset prop +unset val diff --git a/System/confirmKilli3.sh b/System/confirmKilli3.sh new file mode 100755 index 0000000..7cf520e --- /dev/null +++ b/System/confirmKilli3.sh @@ -0,0 +1,8 @@ +#!/bin/bash +confirm="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p '¿Cerrar ventana?' -width 12 -line-padding 3 -lines 3 -theme /home/danih/Scripts/Temas/confirm_kill.rasi <<< "No|Si")" +case "$confirm" in + Si) + echo "Si confirmado" + i3-msg kill + ;; +esac diff --git a/System/focusMode.sh b/System/focusMode.sh new file mode 100755 index 0000000..7ab4d66 --- /dev/null +++ b/System/focusMode.sh @@ -0,0 +1,11 @@ +#!/bin/bash +state=$(cat ~/Scripts/.focusState) +if test $state -eq 0; then + polybar-msg cmd hide + i3-msg gaps inner all set 0 + echo 1 > ~/Scripts/.focusState +else + polybar-msg cmd show + i3-msg gaps inner all set 30 + echo 0 > ~/Scripts/.focusState +fi diff --git a/System/montaServer.sh b/System/montaServer.sh new file mode 100644 index 0000000..dae8ecc --- /dev/null +++ b/System/montaServer.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo sshfs -o allow_other,default_permissions -o ssh_command="ssh -i ~/.ssh/id_local" dqnid@192.168.0.109:/home/dqnid /mnt/LocalServer diff --git a/System/resetBluetooth.sh b/System/resetBluetooth.sh new file mode 100644 index 0000000..05a76c7 --- /dev/null +++ b/System/resetBluetooth.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +#bluez +#bluetoothctl + +sudo modprobe -r btusb +sudo modprobe btusb + +sudo rmmod btusb +sudo modprobe btusb + +connmanctl disable bluetooth +connmanctl enable bluetooth + +bluetoothctl power off +bluetoothctl power on diff --git a/System/sincV8.sh b/System/sincV8.sh new file mode 100755 index 0000000..012141e --- /dev/null +++ b/System/sincV8.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# To-do: Add Eww widgets or other interface + +theme="~/Scripts/Temas/" + +server_routes=("Anotaciones" "Universidad/Segundo[[:space:]]Cuatrimestre/" "Universidad/TFG/") +local_full=("Documents/Anotaciones/" "Documents/Proyectos/" "Documents/Universidad/" "Images/Carteles[[:space:]]OZ/" "Images/Proyectos/") + +dotfiles=(".bashrc" ".config/nvim/" ".config/polybar/" ".config/i3/" ".config/mpd/" ".config/ncmpcpp/" ".config/mpv/" ".config/nemo/" ".config/dunst/" ".config/glava/" ".config/ranger/" ".config/sxhkd/" ".config/picom.conf") + + +net="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'Network' -width 12 -line-padding 3 -lines 2 -theme /home/danih/Scripts/Temas/sinc.rasi <<< "LAN|WAN")" +case "$net" in + LAN) + operation="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'Action' -width 12 -line-padding 3 -lines 2 -theme /home/danih/Scripts/Temas/sinc.rasi <<< "PUSH|PULL")" + case "$operation" in + PUSH) + origin="/home/danih/" + dest="dqnid@192.168.0.109:/home/dqnid/" + ;; + PULL) + dest="/home/danih/" + origin="dqnid@192.168.0.109:/home/dqnid/" + ;; + esac + files_to_sync="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'Files To Sync' -width 12 -line-padding 3 -lines 2 -theme /home/danih/Scripts/Temas/sinc.rasi <<< "Documents|Images|Videos|Music|Dotfiles|All")" + case "$files_to_sync" in + Documents | Images | Videos | Music) + for dir in "$origin$files_to_sync"/* + rsync -vrP -e "ssh -i ~/.ssh/id_rsa_dqnid" --delete-after $origin/$dir $dest/$dir + ;; + Dotfiles) + for i in "${dotfiles[@]}" + do + rsync -vrP -e "ssh -i ~/.ssh/id_rsa_dqnid" --delete-after $origin/$i $dest/$i + if test $? -eq 0; then + notify-send "Éxito - $i" "$i sincronizadas correctamente" + else + notify-send "Error - $i" "Fallo en sincronización de $i" + fi + done + ;; + esac + ;; + WAN) + for i in "${server_routes[@]}" + do + rsync -vrP -e "ssh -i ~/.ssh/id_rsa_dqnid" --delete-after /home/danih/Documents/$i dqnid@dqnid.com:/home/dqnid/Documents + if test $? -eq 0; then + notify-send "Éxito - $i" "$i sincronizadas correctamente" + else + notify-send "Error - $i" "Fallo en sincronización de $i" + fi + done + ;; +esac diff --git a/System/soundApplets.sh b/System/soundApplets.sh new file mode 100755 index 0000000..150a4f8 --- /dev/null +++ b/System/soundApplets.sh @@ -0,0 +1,17 @@ +#!/bin/sh +SERVICE1="pa-applet" +SERVICE2="blueman-applet" +if pgrep -x "$SERVICE1" >/dev/null +then + killall "$SERVICE1" +else + ~/Paquetes/pa-applet/src/pa-applet & +fi + +bluetoothctl power on +if pgrep -x "$SERVICE2" >/dev/null +then + killall "$SERVICE2" +else + $SERVICE2 & +fi diff --git a/Tools/cleanDisk.sh b/Tools/cleanDisk.sh new file mode 100755 index 0000000..2bc0c84 --- /dev/null +++ b/Tools/cleanDisk.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +#limpiar cache de paquetes +paccache -r + +# Eliminar huérfanos +paquetes=$(sudo pacman -Qtdq) + +sudo pacman -Rns $paquetes diff --git a/Tools/comprimeImagenesDir.py b/Tools/comprimeImagenesDir.py new file mode 100644 index 0000000..8a51d02 --- /dev/null +++ b/Tools/comprimeImagenesDir.py @@ -0,0 +1,65 @@ +# run this in any directory +# add -v for verbose +# get Pillow (fork of PIL) from +# pip before running --> +# pip install Pillow + +# import required libraries +import os +import sys +from PIL import Image + +# define a function for +# compressing an image +def compressMe(file, verbose = False): + + # Get the path of the file + filepath = os.path.join(os.getcwd(), + file) + + # open the image + picture = Image.open(filepath) + + # Save the picture with desired quality + # To change the quality of image, + # set the quality variable at + # your desired level, The more + # the value of quality variable + # and lesser the compression + # En porcentaje + picture.save("Compressed_"+file, + "JPEG", + optimize = True, + quality = 9) + return + +# Define a main function +def main(): + + verbose = False + + # checks for verbose flag + if (len(sys.argv)>1): + + if (sys.argv[1].lower()=="-v"): + verbose = True + + # finds current working dir + cwd = os.getcwd() + + formats = ('.jpg', '.jpeg', '.png') + + # looping through all the files + # in a current directory + for file in os.listdir(cwd): + + # If the file format is JPG or JPEG + if os.path.splitext(file)[1].lower() in formats: + print('compressing', file) + compressMe(file, verbose) + + print("Done") + +# Driver code +if __name__ == "__main__": + main() diff --git a/Tools/csv_to_json.py b/Tools/csv_to_json.py new file mode 100755 index 0000000..5f578c8 --- /dev/null +++ b/Tools/csv_to_json.py @@ -0,0 +1,19 @@ +import csv +import json + +def make_json(csvFilePath, jsonFilePath): + data = {} + with open(csvFilePath, encoding='UTF-8') as csvf: + csvReader = csv.DictReader(csvf) + + for rows in csvReader: + key = rows['id'] + data[key] = rows + + with open(jsonFilePath, 'w', encoding='UTF-8') as jsonf: + jsonf.write(json.dumps(data, indent=4)) + +csvFilePath = r'zona_rec_filtrado.csv' +jsonFilePath = r'zona_rec.json' + +make_json(csvFilePath, jsonFilePath) \ No newline at end of file diff --git a/Tools/gdx-setup.jar b/Tools/gdx-setup.jar new file mode 100755 index 0000000..f48ef53 Binary files /dev/null and b/Tools/gdx-setup.jar differ diff --git a/Tools/generaLaTeX.sh b/Tools/generaLaTeX.sh new file mode 100755 index 0000000..03b9ecd --- /dev/null +++ b/Tools/generaLaTeX.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +home="/home/danih" +modelos="$home/Documents/Modelos" +biblio="$modelos/biblio.bib" +dir=$(pwd) + +preguntaNombre() { + rofi -dmenu\ + -i\ + -no-fixed-num-lines\ + -p "Nombre : "\ + -theme ~/Scripts/Temas/confirm_visible.rasi +} + +plantilla="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'Plantilla' -width 12 -line-padding 3 -lines 3 -theme ~/Scripts/Temas/latex.rasi <<< "Base|Universidad|Simple")" +if [[ $plantilla == "" ]]; then + exit 1 +fi + +images=false +case "$plantilla" in + "Base") + plantilla="base.tex" + ;; + "Universidad") + plantilla="usal.tex" + images=true + ;; + "Simple") + plantilla="simple.tex" + ;; + *) + plantilla="base.tex" + ;; +esac + +base=$modelos/$plantilla + +nombre=$(preguntaNombre &) +if [[ $nombre == "" ]]; then + exit 1 +fi + +final=$(echo $nombre | awk -F'.tex' '{print $1}') + +cp $biblio "$dir" +if test -f "$dir/${final}.tex"; then + cp $base "$dir/${final}$(date +"%m%d%Y").tex" +else + cp $base "$dir/$final.tex" +fi + +if [[ $images == true ]]; then + cp -r "$modelos/images $dir" +fi +exit 0 diff --git a/Tools/parsekml_csv.py b/Tools/parsekml_csv.py new file mode 100755 index 0000000..3656dc4 --- /dev/null +++ b/Tools/parsekml_csv.py @@ -0,0 +1,35 @@ +from pykml import parser +import csv +fields = ['lat','lng','id','nombre','superficie','web','acceso'] +filename = "zona_rec_filtrado.csv" +with open (filename, 'w') as csvfile: + csvwriter = csv.writer(csvfile) + csvwriter.writerow(fields) + with open('zona_rec.kml','r',encoding="utf-8") as f: + doc = parser.parse(f).getroot() + line = ['0','0','0','0','0','0','0'] + for place in doc.Document.Folder.Placemark: + cadena = str(place.Point.coordinates) + coords = cadena.split(",") + line[0] = coords[1] + line[1] = coords[0] + contador = 0 + for field in place.ExtendedData.SchemaData.SimpleData: + if (contador == 0): + atr_id = str(field) + line[2] = atr_id + contador+=1 + with open('zona_rec.csv') as f: + reader = csv.DictReader(f, delimiter=',') + for row in reader: + iden = row['atr_gr_id'] + name = row['equip_b_nombre'] + plain = row['equip_b_superficie_aprox'] + web = row['web'] + access = row['equip_b_acceso_modo'] + if (iden == atr_id): + line[3] = name + line[4] = plain + line[5] = web + line[6] = access + csvwriter.writerow(line) \ No newline at end of file diff --git a/Tools/teclado.py b/Tools/teclado.py new file mode 100755 index 0000000..d7ea069 --- /dev/null +++ b/Tools/teclado.py @@ -0,0 +1,12 @@ +from pynput.keyboard import Key, Listener + +def show(key): + + print('\nYou Entered {0}'.format( key)) + + if key == Key.delete: + # Stop listener + return False + +with Listener(on_press = show) as listener: + listener.join() diff --git a/Tools/ttfToWoff2.py b/Tools/ttfToWoff2.py new file mode 100755 index 0000000..b434410 --- /dev/null +++ b/Tools/ttfToWoff2.py @@ -0,0 +1,11 @@ +#!/bin/bash +# Dependencies: +# $ pip install fontTools +# $ pip install brotli +from fontTools.ttLib import TTFont +import sys +if len(sys.argv) != 2: + raise ValueError('Argumentos incorrectos:\n $ python ttfToWoff2.py fuente.tipo') +f = TTFont(sys.argv[1]) +f.flavor='woff2' +f.save(sys.argv[1]+'.woff2') diff --git a/Tools/youtubedw.sh b/Tools/youtubedw.sh new file mode 100755 index 0000000..99e22cc --- /dev/null +++ b/Tools/youtubedw.sh @@ -0,0 +1,6 @@ +#!/bin/bash +if test $# -eq 1; then + yt-dlp -f 'ba' -x --audio-format mp3 $1 -o '%(title)s.%(ext)s' +else + echo "$ youtubedw.sh 'enlace'" +fi diff --git a/rofi/colors.rasi b/rofi/colors.rasi new file mode 100644 index 0000000..b19bdab --- /dev/null +++ b/rofi/colors.rasi @@ -0,0 +1,10 @@ +/* colors */ + +* { + al: #00000000; + bg: #090909FF; + bga: #000000FF; + fg: #f5f5f5FF; + ac: #e9ecefFF; + se: #e9ecef5A; +} diff --git a/rofi/confirm.rasi b/rofi/confirm.rasi new file mode 100644 index 0000000..cfb38af --- /dev/null +++ b/rofi/confirm.rasi @@ -0,0 +1,24 @@ +/* Confirm Dialog */ + +@import "colors.rasi" + +* { + background-color: @bg; + text-color: @fg; + font: "Terminus 9"; +} + +window { + width: 225px; + padding: 25px; + border: 0px 0px 4px 0px; + border-radius: 0px; + border-color: @ac; + location: center; + y-offset: -2em; +} + +entry { + expand: true; + text-color: @bg; +} diff --git a/rofi/confirm_kill.rasi b/rofi/confirm_kill.rasi new file mode 100644 index 0000000..64dbb68 --- /dev/null +++ b/rofi/confirm_kill.rasi @@ -0,0 +1,126 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Envy Code R 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 4px 0px; + border-color: @ac; + border-radius: 0px; + width: 212px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 2px 0px 0px 10px; + background-color: @al; + text-color: @fg; +} + +textbox-prompt-colon { + padding: 2px 0px 0px 5px; + background-color: @al; + text-color: @fg; + expand: false; + str: ""; + font: "feather 12"; +} + +entry { + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 2px 0px 0px 2px; + blink: true; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + background-color: #00000000; + text-color: @fg; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 8px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 1; + spacing: 6px; + cycle: true; + dynamic: true; + layout: horizontal; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 6px; + padding: 6px; + orientation: horizontal; +} + +element { + background-color: @al; + text-color: @fga; + orientation: horizontal; + border-radius: 0px; + padding: 8px 8px 8px -16px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0.5; + vertical-align: 0; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; + +} + +element selected { + text-color: @fg; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/confirm_visible.rasi b/rofi/confirm_visible.rasi new file mode 100644 index 0000000..07bd0dd --- /dev/null +++ b/rofi/confirm_visible.rasi @@ -0,0 +1,24 @@ +/* Confirm Dialog */ + +@import "colors.rasi" + +* { + background-color: @bg; + text-color: @fg; + font: "Terminus 12"; +} + +window { + width: 225px; + padding: 25px; + border: 1px; + border-radius: 0px; + border-color: @ac; + location: center; + y-offset: -2em; +} + +entry { + expand: true; + text-color: @fg; +} diff --git a/rofi/dmenu.rasi b/rofi/dmenu.rasi new file mode 100644 index 0000000..4846c24 --- /dev/null +++ b/rofi/dmenu.rasi @@ -0,0 +1,118 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Terminus 12"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 4px 0px; + border-color: @ac; + border-radius: 0px; + width: 500px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0px; + background-color: @al; + text-color: @ac; + font: "feather 8"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 0px 0px 0px 8px; + blink: true; +} + +inputbar { + children: [ prompt, entry ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 12px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 6; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 0px; + padding: 0px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px; +} + +element-icon { + size: 0px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; +} + +element selected { + background-color: @se; + text-color: @fg; + border: 0px 0px 0px 2px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/drives.rasi b/rofi/drives.rasi new file mode 100644 index 0000000..87400eb --- /dev/null +++ b/rofi/drives.rasi @@ -0,0 +1,118 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Terminus 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; +// fullscreen: false; +// hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 4px 0px; + border-color: @ac; + border-radius: 0px; + width: 200px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0px; + background-color: @al; + text-color: @ac; + font: "Terminus 10"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 0px 0px 0px 8px; + blink: true; +} + +inputbar { + children: [ prompt ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 12px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 6; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 0px; + padding: 0px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; +} + +element selected { + background-color: @se; + text-color: @fg; + border: 0px 0px 0px 2px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/estilos.rasi b/rofi/estilos.rasi new file mode 100644 index 0000000..36b829b --- /dev/null +++ b/rofi/estilos.rasi @@ -0,0 +1,118 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Terminus 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; +// fullscreen: false; +// hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px; + border-color: @ac; + border-radius: 0px; + width: 270px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0px; + background-color: @al; + text-color: @ac; + font: "Terminus 10"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 0px 0px 0px 8px; + blink: true; +} + +inputbar { + children: [ prompt, entry ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 12px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 6; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 0px; + padding: 0px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; +} + +element selected { + background-color: @se; + text-color: @fg; + border: 0px 0px 0px 2px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/formatos.rasi b/rofi/formatos.rasi new file mode 100644 index 0000000..cdcc089 --- /dev/null +++ b/rofi/formatos.rasi @@ -0,0 +1,118 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Terminus 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; +// fullscreen: false; +// hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 4px 0px; + border-color: @ac; + border-radius: 0px; + width: 270px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0px; + background-color: @al; + text-color: @ac; + font: "Terminus 10"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 0px 0px 0px 8px; + blink: true; +} + +inputbar { + children: [ prompt, entry ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 12px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 6; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 0px; + padding: 0px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; +} + +element selected { + background-color: @se; + text-color: @fg; + border: 0px 0px 0px 2px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/getinfo.rasi b/rofi/getinfo.rasi new file mode 100644 index 0000000..6996c38 --- /dev/null +++ b/rofi/getinfo.rasi @@ -0,0 +1,24 @@ +/* Confirm Dialog */ + +@import "colors.rasi" + +* { + background-color: @bg; + text-color: @fg; + font: "Terminus 9"; +} + +window { + width: 225px; + padding: 25px; + border: 0px 0px 4px 0px; + border-radius: 0px; + border-color: @ac; + location: center; + y-offset: -2em; +} + +entry { + expand: true; + text-color: @fg; +} diff --git a/rofi/latex.rasi b/rofi/latex.rasi new file mode 100644 index 0000000..de490bb --- /dev/null +++ b/rofi/latex.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Terminus 12"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 4px 0px; + border-color: @ac; + border-radius: 0px; + width: 150px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 2px 0px 0px 10px; + background-color: @al; + text-color: @fg; +} + +textbox-prompt-colon { + padding: 2px 0px 0px 5px; + background-color: @al; + text-color: @fg; + expand: false; + str: ""; + font: "feather 12"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 2px 0px 0px 6px; + blink: true; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 8px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 3; + spacing: 6px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 6px; + padding: 6px; +} + +element { + background-color: @al; + text-color: @bg; + orientation: horizontal; + border-radius: 0px; + padding: 8px 8px 8px -16px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; + +} + +element selected { + background-color: @bga; + text-color: @fg; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/launcher.rasi b/rofi/launcher.rasi new file mode 100644 index 0000000..e9c5b90 --- /dev/null +++ b/rofi/launcher.rasi @@ -0,0 +1,118 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Terminus 12"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 4px 0px; + border-color: @ac; + border-radius: 0px; + width: 900px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 13px 15px 12px 15px; + background-color: @al; + text-color: @ac; + font: "feather 8"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 8px; + blink: true; +} + +inputbar { + children: [ prompt, entry ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 8px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 4; + lines: 8; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 0px; + padding: 0px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; +} + +element selected { + background-color: @se; + text-color: @fg; + border: 0px 0px 0px 2px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/monitor.rasi b/rofi/monitor.rasi new file mode 100644 index 0000000..8889d01 --- /dev/null +++ b/rofi/monitor.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Envy Code R 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 4px 0px; + border-color: @ac; + border-radius: 0px; + width: 150px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 2px 0px 0px 10px; + background-color: @al; + text-color: @fg; +} + +textbox-prompt-colon { + padding: 2px 0px 0px 5px; + background-color: @al; + text-color: @fg; + expand: false; + str: ""; + font: "feather 12"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 2px 0px 0px 6px; + blink: true; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 8px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 6; + spacing: 6px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 6px; + padding: 6px; +} + +element { + background-color: @al; + text-color: @fga; + orientation: horizontal; + border-radius: 0px; + padding: 8px 8px 8px -16px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; + +} + +element selected { + background-color: @bga; + text-color: @fg; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/pulsemenu.rasi b/rofi/pulsemenu.rasi new file mode 100644 index 0000000..15cc58a --- /dev/null +++ b/rofi/pulsemenu.rasi @@ -0,0 +1,127 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Terminus 9"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px; + border-color: @ac; + border-radius: 0px; + width: 150px; + location: center; + x-offset: -885; + y-offset: 383; +} + +prompt { + enabled: true; + padding: 10px 10px 10px 0px; + background-color: @al; + text-color: @ac; + font: "Terminus 9"; +} + +textbox-prompt-colon { + padding: 8px 15px 10px 15px; + font: "Iosevka Nerd Font 8"; + background-color: @al; + text-color: @ac; + expand: false; + str: ""; +} + +entry { + background-color: @al; + text-color: @ac; + placeholder-color: @ac; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 10px 10px 10px 0px; + border-radius: 0px; + blink: true; +} + +inputbar { + children: [ textbox-prompt-colon, prompt ]; + background-color: @al; + text-color: @fg; + expand: false; + border: 0px 0px 1px 0px; + border-radius: 0px; + border-color: @ac; + spacing: 0px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 5; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 0px; + padding: 0px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px 8px 8px -20px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; +} + +element selected { + background-color: @se; + text-color: @fg; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/sinc.rasi b/rofi/sinc.rasi new file mode 100644 index 0000000..47406ae --- /dev/null +++ b/rofi/sinc.rasi @@ -0,0 +1,118 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Terminus 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; +// fullscreen: false; +// hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 4px 0px; + border-color: @ac; + border-radius: 0px; + width: 270px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0px; + background-color: @al; + text-color: @ac; + font: "Terminus 10"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Escoge..."; + padding: 0px 0px 0px 8px; + blink: true; +} + +inputbar { + children: [ prompt, entry ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 12px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 1; + lines: 2; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 0px; + padding: 0px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; +} + +element selected { + background-color: @se; + text-color: @fg; + border: 0px 0px 0px 2px; + border-radius: 0px; + border-color: @ac; +} diff --git a/rofi/tab.rasi b/rofi/tab.rasi new file mode 100644 index 0000000..e9c5b90 --- /dev/null +++ b/rofi/tab.rasi @@ -0,0 +1,118 @@ +/* + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "Terminus 12"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: true; + sidebar-mode: false; +} + +@import "colors.rasi" + +window { + transparency: "real"; + background-color: @bg; + text-color: @fg; + border: 0px 0px 4px 0px; + border-color: @ac; + border-radius: 0px; + width: 900px; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 13px 15px 12px 15px; + background-color: @al; + text-color: @ac; + font: "feather 8"; +} + +entry { + background-color: @al; + text-color: @fg; + placeholder-color: @fg; + expand: true; + horizontal-align: 0; + placeholder: "Search..."; + padding: 8px; + blink: true; +} + +inputbar { + children: [ prompt, entry ]; + background-color: @bga; + text-color: @fg; + expand: false; + border: 0px 0px 0px 0px; + border-radius: 0px; + border-color: @ac; + margin: 0px; + padding: 8px; +} + +listview { + background-color: @al; + padding: 0px; + columns: 4; + lines: 8; + spacing: 5px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @al; + border: 0px; + border-radius: 0px; + border-color: @ac; + children: [ inputbar, listview ]; + spacing: 0px; + padding: 0px; +} + +element { + background-color: @al; + text-color: @fg; + orientation: horizontal; + border-radius: 0px; + padding: 8px; +} + +element-icon { + size: 24px; + border: 0px; + background-color: @al; +} + +element-text { + expand: true; + horizontal-align: 0; + vertical-align: 0.5; + margin: 0px 2.5px 0px 2.5px; + background-color: @al; + text-color: inherit; +} + +element selected { + background-color: @se; + text-color: @fg; + border: 0px 0px 0px 2px; + border-radius: 0px; + border-color: @ac; +}