Deleted old and stupid scripts.
This commit is contained in:
parent
510538cb3a
commit
86e3a3a79c
@ -1,38 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# feed the script with your directory path
|
|
||||||
# and it will list all your files and open them
|
|
||||||
# in your prefered program with xdg-open
|
|
||||||
|
|
||||||
. $HOME/.config/dmenu/config
|
|
||||||
|
|
||||||
# cd into the given directory
|
|
||||||
cd $1
|
|
||||||
|
|
||||||
# a functions that list all everything in a directory and gives back the chosen one
|
|
||||||
choice (){
|
|
||||||
(ls -1 -a | $DMENU -l 30 -p "Choose your file!")
|
|
||||||
}
|
|
||||||
|
|
||||||
# first choice
|
|
||||||
dir=$(choice)
|
|
||||||
|
|
||||||
# while the coice is not a file do what is inside
|
|
||||||
while [ ! -f "$dir" ]
|
|
||||||
do
|
|
||||||
# first we check if it is a single dot and if it is we exit
|
|
||||||
[ "$dir" = "." ] && exit
|
|
||||||
|
|
||||||
# if dir is empty we exit
|
|
||||||
[ -z "$dir" ] && exit
|
|
||||||
|
|
||||||
# if all check are negative we change into the directory
|
|
||||||
cd "$dir"
|
|
||||||
|
|
||||||
# doing a new check
|
|
||||||
dir=$(choice)
|
|
||||||
done
|
|
||||||
|
|
||||||
# open the file using xdg-open
|
|
||||||
xdg-open "$dir"
|
|
||||||
quick-notify "Opening file" "$dir"
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# dmenu script to run one of my most runned programs
|
|
||||||
|
|
||||||
source $HOME/.config/dmenu/config
|
|
||||||
|
|
||||||
declare -a software=(
|
|
||||||
"bitwarden-desktop"
|
|
||||||
"megasync"
|
|
||||||
"spotify"
|
|
||||||
"discord"
|
|
||||||
)
|
|
||||||
|
|
||||||
choice=$(printf "%s\n" "${software[@]}" | $DMENU -p "Choose software to run")
|
|
||||||
|
|
||||||
[ -n $choice ] || exit
|
|
||||||
|
|
||||||
$choice
|
|
@ -1,33 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
. $HOME/.config/dmenu/config
|
|
||||||
|
|
||||||
portMan () {
|
|
||||||
notAvailable=$(pactl list sinks | grep 'analog-output-headphones' | grep 'not available')
|
|
||||||
|
|
||||||
[ ! -z "$notAvailable" ] && quick-notify "Port Master" "Only one port available" && exit
|
|
||||||
|
|
||||||
current=$(pactl list sinks | grep 'Active Port' | awk '{ print $3 }')
|
|
||||||
[ "$current" = "analog-output-speaker" ] && current="Speakers" || current="Headphones"
|
|
||||||
|
|
||||||
case "$(printf "Speakers\\nHeadphones" | $DMENU -p "Current: $current ")" in
|
|
||||||
"Speakers") pactl set-sink-port 0 analog-output-speaker ;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
programVolToggle () {
|
|
||||||
inputSinks=$(pactl list sink-inputs | sed -e 's/^[ \t]*//' | awk '/^Sink Input/{sink=$3} /^application.name/{name=$3; print name, sink}' )
|
|
||||||
|
|
||||||
[ -z "$inputSinks" ] && quick-notify "Program Master" "No Programs Inputing Sound" && exit
|
|
||||||
|
|
||||||
programSink=$(printf '%s\n' "$inputSinks" | dmenu -p "Toggle volume: " | awk '{ print $2 }' | sed 's/#//')
|
|
||||||
|
|
||||||
pactl set-sink-input-mute $programSink toggle
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$(printf "port\\nprogram" | $DMENU -p "Sound Control: ")" in
|
|
||||||
port) portMan ;;
|
|
||||||
program) programVolToggle ;;
|
|
||||||
*) exit ;;
|
|
||||||
esac
|
|
132
dmenu-retro
132
dmenu-retro
@ -1,132 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# script to run roms from different systems in their respective emulators
|
|
||||||
|
|
||||||
# a functions that list all everything in a directory and gives back the chosen one
|
|
||||||
|
|
||||||
source $HOME/.config/dmenu/config
|
|
||||||
|
|
||||||
choice (){
|
|
||||||
(ls -1 | $DMENU -l 30 -p "Choose your $system rom!")
|
|
||||||
}
|
|
||||||
|
|
||||||
run_rom (){
|
|
||||||
# cd into the given directory
|
|
||||||
cd "$dir"
|
|
||||||
|
|
||||||
# first choice
|
|
||||||
rom=$(choice)
|
|
||||||
|
|
||||||
# first we check if it is a single dot and if it is we exit
|
|
||||||
[ "$rom" = "." ] && exit 1
|
|
||||||
|
|
||||||
# if rom is empty we exit
|
|
||||||
[ -z "$rom" ] && exit 1
|
|
||||||
|
|
||||||
# run the emulator with the chosen rom
|
|
||||||
gamemoderun mangohud --dlsym $emulator "$dir$rom"
|
|
||||||
disown $@
|
|
||||||
}
|
|
||||||
|
|
||||||
declare -a systems=(
|
|
||||||
"Nintendo - Nintendo Entertainment System (1983-2003)"
|
|
||||||
"Sega - Mega Drive - Genesis (1988–1997)"
|
|
||||||
"Nintendo - Game Boy (1989-2003)"
|
|
||||||
"Nintendo - Super Nintendo Entertainment System (1990-2003)"
|
|
||||||
"Sony Playstation (1994–2006)"
|
|
||||||
"Nintendo - Nintendo 64 (1996-2002)"
|
|
||||||
"Nintendo - Game Boy Color (1998-2003)"
|
|
||||||
"Sony Playstation 2 (2000–2013)"
|
|
||||||
"Nintendo - Game Boy Advance (2001-2009)"
|
|
||||||
"Nintendo Gamecube (2001-2009)"
|
|
||||||
"Sony Playstation Portable (2004–2014)"
|
|
||||||
"Nintendo DS (2004-2015)"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
case "$(printf '%s\n' "${systems[@]}" | $DMENU -l 10 -p "Chose retro console:")" in
|
|
||||||
"Nintendo - Nintendo Entertainment System (1983-2003)")
|
|
||||||
emulator="fceux"
|
|
||||||
system="NES"
|
|
||||||
dir="$HOME/Roms/Nintendo - Nintendo Entertainment System/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Nintendo - Nintendo 64 (1996-2002)")
|
|
||||||
emulator="mupen64plus-gui"
|
|
||||||
system="N64"
|
|
||||||
dir="$HOME/Roms/Nintendo - Nintendo 64/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Nintendo - Game Boy Advance (2001-2009)")
|
|
||||||
emulator="mgba-qt"
|
|
||||||
system="GBA"
|
|
||||||
dir="$HOME/Roms/Nintendo - Game Boy Advance/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Nintendo Gamecube (2001-2009)")
|
|
||||||
emulator="dolphin-emu"
|
|
||||||
system="Gamecube"
|
|
||||||
dir="$HOME/Roms/Nintendo Gamecube/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Sony Playstation Portable (2004–2014)")
|
|
||||||
emulator="PPSSPPSDL"
|
|
||||||
system="PSP"
|
|
||||||
dir="$HOME/Roms/Sony Playstation Portable/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Sony Playstation 2 (2000–2013)")
|
|
||||||
emulator="pcsx2"
|
|
||||||
system="PS2"
|
|
||||||
dir="$HOME/Roms/Sony Playstation 2/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Sega - Mega Drive - Genesis (1988–1997)")
|
|
||||||
emulator="kega-fusion"
|
|
||||||
system="Genesis"
|
|
||||||
dir="$HOME/Roms/Sega - Mega Drive - Genesis/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Nintendo - Game Boy (1989-2003)")
|
|
||||||
emulator="mgba-qt"
|
|
||||||
system="GameBoy"
|
|
||||||
dir="$HOME/Roms/Nintendo - Game Boy/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Nintendo - Game Boy Color (1998-2003)")
|
|
||||||
emulator="mgba-qt"
|
|
||||||
system="GBC"
|
|
||||||
dir="$HOME/Roms/Nintendo - Game Boy Color/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Nintendo - Super Nintendo Entertainment System (1990-2003)")
|
|
||||||
emulator="snes9x-gtk"
|
|
||||||
system="SNES"
|
|
||||||
dir="$HOME/Roms/Nintendo - Super Nintendo Entertainment System/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Sony Playstation (1994–2006)")
|
|
||||||
emulator="duckstation-nogui"
|
|
||||||
system="PSX"
|
|
||||||
dir="$HOME/Roms/Sony Playstation/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
"Nintendo DS (2004-2015)")
|
|
||||||
emulator="melonDS"
|
|
||||||
system="NDS"
|
|
||||||
dir="$HOME/Roms/Nintendo DS/"
|
|
||||||
run_rom
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
24
dmenu-wiki
24
dmenu-wiki
@ -1,24 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Search offline copy of the arch wiki
|
|
||||||
|
|
||||||
. $HOME/.config/dmenu/config
|
|
||||||
|
|
||||||
dir="/usr/share/doc/arch-wiki/html/en/"
|
|
||||||
|
|
||||||
docs="$(find $dir -iname "*.html")"
|
|
||||||
|
|
||||||
main () {
|
|
||||||
choice=$(printf '%s\n' "${docs}" | \
|
|
||||||
cut -d '/' -f8- | \
|
|
||||||
sed -e 's/_/ /g' -e 's/.html//g' | \
|
|
||||||
sort | \
|
|
||||||
$DMENU -i -l 20 -p "Arch Wiki Docs:")
|
|
||||||
|
|
||||||
if [ "$choice" ]; then
|
|
||||||
article=$(printf '%s\n' "${dir}${choice}.html" | sed 's/ /_/g')
|
|
||||||
"$BROWSER" "$article"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
Loading…
Reference in New Issue
Block a user