mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-24 20:38:36 -06:00
Cleanup and commentary
This commit is contained in:
parent
462f0522a4
commit
6a2a8a8e62
11 changed files with 24 additions and 19 deletions
|
@ -1,5 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# For syncing some files with OneDrive
|
||||
# Assumes that the sync target is set up as OneDrive:Syncs in rclone
|
||||
|
||||
if [ $(id -u) -eq 0 ]; then
|
||||
exec sudo -H -u <user> $0 "$@"
|
||||
fi
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Toggles bluetooth on a Linux system. Make sure that you have bluetoothctl installed.
|
||||
# I use it with a shortcut.
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [ $(bluetoothctl show | grep Powered | grep -c yes) -eq 1 ]; then
|
||||
bluetoothctl power off
|
||||
else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# I use it to clean up latex build files from a directory after I'm done with the project.
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# I use it to clean up latex build files from a directory after I'm done with the project.
|
||||
|
||||
# Depends on trash-cli
|
||||
|
||||
for f in *.tex; do
|
||||
|
|
4
makebk
4
makebk
|
@ -1,7 +1,7 @@
|
|||
# This simply makes a backup of a file as filename.bak
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# This simply makes a backup of a file as filename.bak
|
||||
|
||||
if [[ -n "$1" ]];
|
||||
then
|
||||
cp "$1"{,.bak}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# This was to fix an issue I was having where my terminal fonts were all over the place and tlp was autosuspending usb ports at startup.
|
||||
# Anyone else probably won't need it.
|
||||
|
||||
#! /bin/sh
|
||||
|
||||
source ~/.profile
|
||||
sudo ~/.local/bin/personal/usb-autosuspend-fix
|
||||
|
|
5
totrash
5
totrash
|
@ -1,6 +1,7 @@
|
|||
# It simply moves files to trash:/ in KDE
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# It simply moves files to trash:/ in KDE
|
||||
# I mostly use trash-cli now, but hey, it works!
|
||||
|
||||
# Move files to trash:/
|
||||
kioclient5 move "$@" trash:/
|
||||
|
|
3
touch2
3
touch2
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# It makes the parent folders (if needed) while touch-ing.
|
||||
|
||||
#!/bin/sh
|
||||
mkdir -p "$(dirname "$1")" &&
|
||||
touch "$1"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# This is to toggle intel turbo boost.
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# This is to toggle intel turbo boost.
|
||||
|
||||
if [[ -z $(which rdmsr) ]]; then
|
||||
echo "msr-tools is not installed. Run 'sudo apt-get install msr-tools' to install it." >&2
|
||||
exit 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This simply triggers the turbo-boost script at startup.
|
||||
# I use it as a startup script.
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
~/.local/bin/turbo-boost disable
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# This was to fix an issue where tlp was autosuspending usb ports at startup.
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# This was to fix an issue where tlp was autosuspending usb ports at startup.
|
||||
|
||||
echo 'on' > '/sys/bus/usb/devices/1-1/power/control'
|
||||
echo 'on' > '/sys/bus/usb/devices/1-2/power/control'
|
||||
echo 'on' > '/sys/bus/usb/devices/1-3/power/control'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Toggles WiFi on a Linux system. Make sure that you have nmcli installed.
|
||||
# I use it with a shortcut.
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
if [ $(nmcli r wifi | grep -c enabled) -eq 1 ]; then
|
||||
nmcli r wifi off
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue