Update.
This commit is contained in:
parent
5fe9ae3c00
commit
19ee4a7871
12
dmenugames
12
dmenugames
@ -1,5 +1,11 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# A script that uses my other project to list games and allows me to run them
|
||||
declare -a Games=(
|
||||
"Heroic (Launcher)"
|
||||
"Lutris (Launcher)"
|
||||
)
|
||||
|
||||
game_run | dmenu -l 20 -p "Choose what game to launch" | xargs -I {} game_run {}
|
||||
case "$(printf "%s\n" "${Games[@]}" | dmenu -p "Choose your game")" in
|
||||
"Heroic (Launcher)") heroic ;;
|
||||
"Lutris (Launcher)") lutris ;;
|
||||
esac
|
||||
|
41
dmenugpu
Executable file
41
dmenugpu
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
already_in()
|
||||
{
|
||||
quick-notify "Gpu Manager" "Already in $new_mode mode"
|
||||
}
|
||||
|
||||
switch()
|
||||
{
|
||||
if sudo envycontrol.py --switch $new_mode; then
|
||||
quick-notify "Gpu Manager" "Switched to $new_mode mode"
|
||||
else
|
||||
quick-notify "Gpu Manager" "Failed to switch to $new_mode mode"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$(printf "integrated\\nhybrid\\nnvidia" | dmenu -p "Choose gpu mode")" in
|
||||
"integrated") new_mode="integrated";;
|
||||
"nvidia") new_mode="nvidia";;
|
||||
"hybrid") new_mode="hybrid";;
|
||||
esac
|
||||
|
||||
current_mode=$(envycontrol.py --status | awk '{ print $5 }')
|
||||
|
||||
if [ $current_mode = "integrated" ]; then
|
||||
case $new_mode in
|
||||
"integrated") already_in;;
|
||||
"nvidia") quick-notify "Gpu Manager" "You need to first reboot into hybrid mode";;
|
||||
"hybrid") switch;;
|
||||
esac
|
||||
elif [ $current_mode = "hybrid" ]; then
|
||||
case $new_mode in
|
||||
"hybrid") already_in;;
|
||||
*) switch;;
|
||||
esac
|
||||
elif [ $current_mode = "nvidia" ]; then
|
||||
case $new_mode in
|
||||
"nvidia") already_in;;
|
||||
*) switch;;
|
||||
esac
|
||||
fi
|
13
dmenukill
Executable file
13
dmenukill
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
selected=$(ps --user "$USER" -F | dmenu -p "Select procces to kill:" -l 5 | awk '{print $2" "$11}')
|
||||
|
||||
[ -n "$selected" ] || exit
|
||||
|
||||
answer=$(printf "yes\\nno" | dmenu -p "Are you sure?")
|
||||
|
||||
[ $answer = "yes" ] || exit
|
||||
|
||||
kill -9 "${selected%% *}"
|
||||
|
||||
quick-notify "Killed Procces" "$selected"
|
@ -7,5 +7,5 @@ case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | dmenu -p "Open link with what
|
||||
mpv) "$VIDEO" "$1" ;;
|
||||
browser) "$BROWSER" "$1" > /dev/null;;
|
||||
"copy url") echo "$1" | xclip -selection clipboard ;;
|
||||
w3m) w3m "$1";;
|
||||
w3m) readable "$1" | w3m -T text/html ;;
|
||||
esac
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is the SUDO_ASKPASS variable, meaning that it will be used as a
|
||||
# password prompt if needed.
|
||||
|
||||
dmenu -p "$1" <&- && echo
|
16
dmenuprograms
Executable file
16
dmenuprograms
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
declare -a software=(
|
||||
"bitwarden-desktop"
|
||||
"obs"
|
||||
"godot"
|
||||
"megasync"
|
||||
"spotify"
|
||||
"discord"
|
||||
)
|
||||
|
||||
choice=$(printf "%s\n" "${software[@]}" | dmenu -p "Choose software to run")
|
||||
|
||||
[ -n $choice ] || exit
|
||||
|
||||
$choice
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# A script to list directory in a give path and them after chosing one opening them in alacritty.
|
||||
|
||||
find "$1" -xdev -maxdepth 1 -type d | dmenu -l 5 | xargs -I {} alacritty --working-directory {}
|
@ -1,17 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
current_temp=$(sudo ryzenadj -i | grep 'tctl-temp' | awk '{ print $6 }')
|
||||
slow_time=$(sudo ryzenadj -i | grep 'slow-time' | awk '{ print $4 }')
|
||||
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" = "70.000" ] & [ "$slow_time" = "60.000" ] && current_mode="heavy gaming" || current_mode="fluff mode"
|
||||
[ "$current_temp" = "60.000" ] && current_mode="normal mode"
|
||||
[ "$current_temp" = "65.000" ] && current_mode="light gaming"
|
||||
[ "$current_temp" = "75.000" ] && current_mode="super heavy programs"
|
||||
[ "$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\\nfluff mode\\nlight gaming\\nheavy gaming\\nsuper heavy programs" | dmenu -p "Current: $current_mode")" in
|
||||
"normal mode") sudo ryzenadj --slow-time=30 --vrmmax-current=30000 --max-gfxclk=900 --max-fclk-frequency=1200 --tctl-temp=60 --stapm-limit=10000 --stapm-time=300 --fast-limit=12000 --slow-limit=11000; break ;;
|
||||
"fluff mode") sudo ryzenadj --slow-time=30 --vrmmax-current=30000 --max-gfxclk=550 --max-fclk-frequency=1200 --tctl-temp=70 --stapm-limit=5000 --stapm-time=150 --fast-limit=7000 --slow-limit=6000; break ;;
|
||||
"light gaming") sudo ryzenadj --slow-time=30 --vrmmax-current=35000 --max-gfxclk=900 --max-fclk-frequency=1200 --tctl-temp=65 --stapm-limit=10000 --stapm-time=300 --fast-limit=12000 --slow-limit=11000; break ;;
|
||||
"heavy gaming") sudo ryzenadj --slow-time=60 --vrmmax-current=60000 --max-gfxclk=900 --max-fclk-frequency=1200 --tctl-temp=70 --stapm-limit=20000 --stapm-time=1000 --fast-limit=25000 --slow-limit=21000; break ;;
|
||||
"super heavy programs") sudo ryzenadj --slow-time=60 --vrmmax-current=60000 --max-gfxclk=900 --max-fclk-frequency=1200 --tctl-temp=75 --stapm-limit=25000 --stapm-time=1000 --fast-limit=30000 --slow-limit=27000; break ;;
|
||||
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
|
||||
|
14
dmenuryzenadj-prof-manager
Executable file
14
dmenuryzenadj-prof-manager
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
# A script to run my game specifiy ryzenadj scripts
|
||||
|
||||
|
||||
# cd into the given directory
|
||||
cd $1
|
||||
|
||||
profile=$(ls -1 -A | dmenu -l 30 -p "Choose your file!")
|
||||
|
||||
[ -n "$profile" ] || exit
|
||||
|
||||
quick-notify "Loading profile" "$profile"
|
||||
./$profile
|
47
dmenuusbman
Executable file
47
dmenuusbman
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
driveCount(){
|
||||
count="$(echo "$1" | wc -l)"
|
||||
}
|
||||
|
||||
mount(){
|
||||
mountable="$(lsblk -lp | awk '/^\/dev\/sd.*part $/ { print $1 " ("$4")" }')"
|
||||
|
||||
if [ "$mountable" = "" ]; then
|
||||
quick-notify "Dmenu Usb Manager" "No drives to mount"
|
||||
exit
|
||||
fi
|
||||
|
||||
chosen="$(printf '%s' "$mountable" | dmenu -p "Drive to mount?")"
|
||||
|
||||
if [ -n "$chosen" ];then
|
||||
udisksctl mount -b "${chosen%% *}"
|
||||
else
|
||||
quick-notify "Dmenu Usb Manager" "No drives chosen to mount"
|
||||
exit
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
unmount(){
|
||||
mounted="$(lsblk -lp | awk '/run/ { print $1 " ("$4")" }')"
|
||||
|
||||
if [ "$mounted" = "" ]; then
|
||||
quick-notify "Dmenu Usb Manager" "No drives to unmount"
|
||||
exit
|
||||
fi
|
||||
|
||||
chosen="$(printf '%s' "$mounted" | dmenu -p "Drive to unmount?")"
|
||||
|
||||
if [ -n "$chosen" ];then
|
||||
udisksctl unmount -b "${chosen%% *}"
|
||||
else
|
||||
quick-notify "Dmenu Usb Manager" "No drives chosen to unmount"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
case $(printf "mount\\nunmount" | dmenu -p "Chose your usb action") in
|
||||
"mount") mount ;;
|
||||
"unmount") unmount ;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user