Updated my scripts.
This commit is contained in:
parent
7c981ce281
commit
272fb806ef
32
dmenu-dl-manager
Executable file
32
dmenu-dl-manager
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# script to download a file from that has it's link in clipboard
|
||||||
|
|
||||||
|
# a functions that list all everything in a directory and gives back the chosen one
|
||||||
|
choice (){
|
||||||
|
(ls -1 -a | dmenu -l 30 -p "Choose where to download")
|
||||||
|
}
|
||||||
|
|
||||||
|
# first choice
|
||||||
|
dir=$(choice)
|
||||||
|
|
||||||
|
# while the coice is not a file do what is inside
|
||||||
|
while [ "$dir" != "Here" ]
|
||||||
|
do
|
||||||
|
# first we check if it is a single dot and if it we download there
|
||||||
|
[ "$dir" = "." ] && break
|
||||||
|
|
||||||
|
# if dir is empty we exit
|
||||||
|
[ -z "$dir" ] && exit
|
||||||
|
|
||||||
|
# if all checks are negative we change into the directory
|
||||||
|
cd "$dir"
|
||||||
|
|
||||||
|
# doing a new check
|
||||||
|
dir=$(choice)
|
||||||
|
done
|
||||||
|
|
||||||
|
# download the file
|
||||||
|
quick-notify "Dmenu downloader" "Started downloading a file"
|
||||||
|
aria2c -j 16 -s 16 -x 16 -k 5M --file-allocation=none "$(xclip -o)"
|
||||||
|
quick-notify "Dmenu downloader" "Downloading finished"
|
@ -8,7 +8,6 @@
|
|||||||
# cd into the given directory
|
# cd into the given directory
|
||||||
cd $1
|
cd $1
|
||||||
|
|
||||||
|
|
||||||
# a functions that list all everything in a directory and gives back the chosen one
|
# a functions that list all everything in a directory and gives back the chosen one
|
||||||
choice (){
|
choice (){
|
||||||
(ls -1 -a | dmenu -l 30 -p "Choose your file!")
|
(ls -1 -a | dmenu -l 30 -p "Choose your file!")
|
||||||
@ -34,5 +33,5 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# open the file using xdg-open
|
# open the file using xdg-open
|
||||||
quick-notify "Opening file" "$dir"
|
|
||||||
xdg-open "$dir"
|
xdg-open "$dir"
|
||||||
|
quick-notify "Opening file" "$dir"
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# dmenu script to open up my games or game launcher's
|
||||||
|
|
||||||
declare -a Games=(
|
declare -a Games=(
|
||||||
"Heroic (Launcher)"
|
"Heroic (Launcher)"
|
||||||
"Lutris (Launcher)"
|
"Lutris (Launcher)"
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# a simple "gui" for envycontrol
|
||||||
|
|
||||||
already_in()
|
already_in()
|
||||||
{
|
{
|
||||||
quick-notify "Gpu Manager" "Already in $new_mode mode"
|
quick-notify "Gpu Manager" "Already in $new_mode mode"
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# kill those pesky proceses
|
||||||
|
|
||||||
selected=$(ps --user "$USER" -F | dmenu -p "Select procces to kill:" -l 5 | awk '{print $2" "$11}')
|
selected=$(ps --user "$USER" -F | dmenu -p "Select procces to kill:" -l 5 | awk '{print $2" "$11}')
|
||||||
|
|
||||||
[ -n "$selected" ] || exit
|
[ -n "$selected" ] || exit
|
13
dmenu-link-handler
Executable file
13
dmenu-link-handler
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Feed this script a link or it will get it from your clipboard and it will give dmenu
|
||||||
|
# with some choice of programs to open the link with.
|
||||||
|
|
||||||
|
[ -z "$@" ] && link=$(xclip -o) || link="$@"
|
||||||
|
|
||||||
|
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | dmenu -p "Open link with what program?")" in
|
||||||
|
mpv) "$VIDEO" "$link" ;;
|
||||||
|
browser) "$BROWSER" "$link" > /dev/null;;
|
||||||
|
"copy url") echo "$link" | xclip -selection clipboard ;;
|
||||||
|
w3m) readable "$link" | w3m -T text/html ;;
|
||||||
|
esac
|
8
dmenu-power-menu
Executable file
8
dmenu-power-menu
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# simple power menu script
|
||||||
|
|
||||||
|
case "$(printf "shutdown\\nreboot" | dmenu -p "Choose your poison")" in
|
||||||
|
"shutdown") systemctl poweroff ;;
|
||||||
|
"reboot") systemctl reboot ;;
|
||||||
|
esac
|
@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# dmenu script to run one of my most runned programs
|
||||||
|
|
||||||
declare -a software=(
|
declare -a software=(
|
||||||
"bitwarden-desktop"
|
"bitwarden-desktop"
|
||||||
"obs"
|
|
||||||
"godot"
|
|
||||||
"megasync"
|
"megasync"
|
||||||
"spotify"
|
"spotify"
|
||||||
"discord"
|
"discord"
|
20
dmenu-ryzenadj
Executable file
20
dmenu-ryzenadj
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# dmenu script for quickly running specific ryzenadj commands
|
||||||
|
|
||||||
|
current_temp=$(sudo /bin/ryzenadj -i | grep 'tctl-temp' | awk '{ print $6 }')
|
||||||
|
slow_time=$(sudo /bin/ryzenadj -i | grep 'slow-time' | awk '{ print $4 }')
|
||||||
|
|
||||||
|
[ "$current_temp" = "60.000" ] && current_mode="normal mode"
|
||||||
|
[ "$current_temp" = "65.000" ] && current_mode="light gaming"
|
||||||
|
[ "$current_temp" = "70.000" ] && current_mode="heavy gaming"
|
||||||
|
[ "$current_temp" = "75.000" ] && current_mode="heavy programs"
|
||||||
|
[ "$current_temp" = "85.000" ] && current_mode="heavy gaming pro"
|
||||||
|
|
||||||
|
case "$(printf "normal mode\\nlight gaming\\nheavy gaming\\nheavy programs\\nheavy gaming pro" | dmenu -p "Current: $current_mode")" in
|
||||||
|
"normal mode") sudo ryzenadj --slow-time=30 --vrmmax-current=30000 --tctl-temp=60 --stapm-limit=10000 --stapm-time=300 --fast-limit=12000 --slow-limit=11000 --power-saving; break ;;
|
||||||
|
"light gaming") sudo ryzenadj --slow-time=30 --vrmmax-current=35000 --tctl-temp=65 --stapm-limit=10000 --stapm-time=300 --fast-limit=12000 --slow-limit=11000 --max-performance; break ;;
|
||||||
|
"heavy gaming") sudo ryzenadj --slow-time=60 --vrmmax-current=60000 --tctl-temp=70 --stapm-limit=20000 --stapm-time=1000 --fast-limit=25000 --slow-limit=21000 --max-performance; break ;;
|
||||||
|
"heavy programs") sudo ryzenadj --slow-time=60 --vrmmax-current=60000 --tctl-temp=75 --stapm-limit=25000 --stapm-time=1000 --fast-limit=30000 --slow-limit=27000 --max-performance; break ;;
|
||||||
|
"heavy gaming pro") sudo ryzenadj --slow-time=60 --vrmmax-current=70000 --tctl-temp=85 --stapm-limit=35000 --stapm-time=1000 --fast-limit=50000 --slow-limit=48000 --max-performance; break ;;
|
||||||
|
esac
|
@ -10,5 +10,4 @@ profile=$(ls -1 -A | dmenu -l 30 -p "Choose your file!")
|
|||||||
|
|
||||||
[ -n "$profile" ] || exit
|
[ -n "$profile" ] || exit
|
||||||
|
|
||||||
quick-notify "Loading profile" "$profile"
|
|
||||||
./$profile
|
./$profile
|
16
dmenu-screenshot
Executable file
16
dmenu-screenshot
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# It lets you choose the kind of screenshot to take, including
|
||||||
|
# copying the image or even highlighting an area to copy.
|
||||||
|
|
||||||
|
dir="$HOME/Pictures/screenshots"
|
||||||
|
[ ! -d "$dir" ] && mkdir $dir -p
|
||||||
|
|
||||||
|
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -p "Screenshot which area?")" in
|
||||||
|
"a selected area") sleep 0.5; maim -s $dir/pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
||||||
|
"current window") sleep 0.5; maim -i "$(xdotool getactivewindow)" $dir/pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
||||||
|
"full screen") sleep 0.5; maim $dir/pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
||||||
|
"a selected area (copy)") sleep 0.5; maim -s | xclip -selection clipboard -t image/png ;;
|
||||||
|
"current window (copy)") sleep 0.5; maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;;
|
||||||
|
"full screen (copy)") sleep 0.5; maim | xclip -selection clipboard -t image/png ;;
|
||||||
|
esac
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# a simple dmenu usb managment script
|
||||||
|
|
||||||
driveCount(){
|
driveCount(){
|
||||||
count="$(echo "$1" | wc -l)"
|
count="$(echo "$1" | wc -l)"
|
||||||
}
|
}
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Feed this script a link and it will give dmenu
|
|
||||||
# with some choice of programs to open the link with.
|
|
||||||
|
|
||||||
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | dmenu -p "Open link with what program?")" in
|
|
||||||
mpv) "$VIDEO" "$1" ;;
|
|
||||||
browser) "$BROWSER" "$1" > /dev/null;;
|
|
||||||
"copy url") echo "$1" | xclip -selection clipboard ;;
|
|
||||||
w3m) readable "$1" | w3m -T text/html ;;
|
|
||||||
esac
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case "$(printf "shutdown\\nreboot" | dmenu -p "Choose your poison")" in
|
|
||||||
"shutdown") systemctl poweroff ;;
|
|
||||||
"reboot") systemctl reboot ;;
|
|
||||||
esac
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
current_temp=$(sudo /bin/ryzenadj -i | grep 'tctl-temp' | awk '{ print $6 }')
|
|
||||||
slow_time=$(sudo /bin/ryzenadj -i | grep 'slow-time' | awk '{ print $4 }')
|
|
||||||
|
|
||||||
[ "$current_temp" = "60.000" ] && current_mode="normal mode"
|
|
||||||
[ "$current_temp" = "65.000" ] && current_mode="light gaming"
|
|
||||||
[ "$current_temp" = "70.000" ] && current_mode="heavy gaming"
|
|
||||||
[ "$current_temp" = "75.000" ] && current_mode="heavy programs"
|
|
||||||
[ "$current_temp" = "85.000" ] && current_mode="heavy gaming pro"
|
|
||||||
|
|
||||||
case "$(printf "normal mode\\nlight gaming\\nheavy gaming\\nheavy programs\\nheavy gaming pro" | dmenu -p "Current: $current_mode")" in
|
|
||||||
"normal mode") sudo ryzenadj --slow-time=30 --vrmmax-current=30000 --tctl-temp=60 --stapm-limit=10000 --stapm-time=300 --fast-limit=12000 --slow-limit=11000 --power-saving; break ;;
|
|
||||||
"light gaming") sudo ryzenadj --slow-time=30 --vrmmax-current=35000 --tctl-temp=65 --stapm-limit=10000 --stapm-time=300 --fast-limit=12000 --slow-limit=11000 --max-performance; break ;;
|
|
||||||
"heavy gaming") sudo ryzenadj --slow-time=60 --vrmmax-current=60000 --tctl-temp=70 --stapm-limit=20000 --stapm-time=1000 --fast-limit=25000 --slow-limit=21000 --max-performance; break ;;
|
|
||||||
"heavy programs") sudo ryzenadj --slow-time=60 --vrmmax-current=60000 --tctl-temp=75 --stapm-limit=25000 --stapm-time=1000 --fast-limit=30000 --slow-limit=27000 --max-performance; break ;;
|
|
||||||
"heavy gaming pro") sudo ryzenadj --slow-time=60 --vrmmax-current=70000 --tctl-temp=85 --stapm-limit=35000 --stapm-time=1000 --fast-limit=50000 --slow-limit=48000 --max-performance; break ;;
|
|
||||||
esac
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# It lets you
|
|
||||||
# choose the kind of screenshot to take, including copying the image or even
|
|
||||||
# highlighting an area to copy. scrotcucks on suicidewatch right now.
|
|
||||||
|
|
||||||
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -p "Screenshot which area?")" in
|
|
||||||
"a selected area") sleep 0.5; maim -s $HOME/Pictures/screenshots/pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
|
||||||
"current window") sleep 0.5; maim -i "$(xdotool getactivewindow)" $HOME/Pictures/screenshots/pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
|
||||||
"full screen") sleep 0.5; maim $HOME/Pictures/screenshots/pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
|
||||||
"a selected area (copy)") sleep 0.5; maim -s | xclip -selection clipboard -t image/png ;;
|
|
||||||
"current window (copy)") sleep 0.5; maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;;
|
|
||||||
"full screen (copy)") sleep 0.5; maim | xclip -selection clipboard -t image/png ;;
|
|
||||||
esac
|
|
Loading…
Reference in New Issue
Block a user