mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 05:08:36 -06:00
switch bash to sh
This commit is contained in:
parent
7ed2cc27a3
commit
9f7f550b5e
11 changed files with 12 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
if [ $(id -u) -eq 0 ]; then
|
if [ $(id -u) -eq 0 ]; then
|
||||||
exec sudo -H -u <user> $0 "$@"
|
exec sudo -H -u <user> $0 "$@"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Toggles bluetooth on a Linux system. Make sure that you have bluetoothctl installed.
|
# Toggles bluetooth on a Linux system. Make sure that you have bluetoothctl installed.
|
||||||
# I use it with a shortcut.
|
# I use it with a shortcut.
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
if [ $(bluetoothctl show | grep Powered | grep -c yes) -eq 1 ]; then
|
if [ $(bluetoothctl show | grep Powered | grep -c yes) -eq 1 ]; then
|
||||||
bluetoothctl power off
|
bluetoothctl power off
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Steps for setting up the drivers of Huion Inspiroy H640P
|
# Steps for setting up the drivers of Huion Inspiroy H640P
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
# ACTION=="add", ATTRS{idVendor}=="256c", ATTRS{idProduct}=="006d", ENV{XAUTHORITY}="/home/sintan/.Xauthority", ENV{DISPLAY}=":0", OWNER=<user>, RUN+="/usr/local/bin/huion-tablet-mount"
|
# ACTION=="add", ATTRS{idVendor}=="256c", ATTRS{idProduct}=="006d", ENV{XAUTHORITY}="/home/sintan/.Xauthority", ENV{DISPLAY}=":0", OWNER=<user>, RUN+="/usr/local/bin/huion-tablet-mount"
|
||||||
|
|
||||||
# Make /usr/local/bin/huion-tablet-mount with this content :
|
# Make /usr/local/bin/huion-tablet-mount with this content :
|
||||||
# #!/bin/bash
|
# #!/bin/sh
|
||||||
# <location-of-this-script> & exit
|
# <location-of-this-script> & exit
|
||||||
|
|
||||||
# Make sure to install xf86-input-wacom (might have to restart)
|
# Make sure to install xf86-input-wacom (might have to restart)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# This script backs up some important stuff
|
# This script backs up some important stuff
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# I use it to clean up latex build files from a directory after I'm done with the project.
|
# I use it to clean up latex build files from a directory after I'm done with the project.
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
for f in *.tex; do
|
for f in *.tex; do
|
||||||
h=$(basename "$f" .tex)
|
h=$(basename "$f" .tex)
|
||||||
|
|
2
makebk
2
makebk
|
@ -1,6 +1,6 @@
|
||||||
# This simply makes a backup of a file as filename.bak
|
# This simply makes a backup of a file as filename.bak
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
if [[ -n "$1" ]];
|
if [[ -n "$1" ]];
|
||||||
then
|
then
|
||||||
|
|
2
totrash
2
totrash
|
@ -1,6 +1,6 @@
|
||||||
# It simply moves files to trash:/ in KDE
|
# It simply moves files to trash:/ in KDE
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Move files to trash:/
|
# Move files to trash:/
|
||||||
kioclient5 move "$@" trash:/
|
kioclient5 move "$@" trash:/
|
||||||
|
|
2
touch2
2
touch2
|
@ -1,5 +1,5 @@
|
||||||
# It makes the parent folders (if needed) while touch-ing.
|
# It makes the parent folders (if needed) while touch-ing.
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
mkdir -p "$(dirname "$1")" &&
|
mkdir -p "$(dirname "$1")" &&
|
||||||
touch "$1"
|
touch "$1"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# This is to toggle intel turbo boost.
|
# This is to toggle intel turbo boost.
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
if [[ -z $(which rdmsr) ]]; then
|
if [[ -z $(which rdmsr) ]]; then
|
||||||
echo "msr-tools is not installed. Run 'sudo apt-get install msr-tools' to install it." >&2
|
echo "msr-tools is not installed. Run 'sudo apt-get install msr-tools' to install it." >&2
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# This simply triggers the turbo-boost script at startup.
|
# This simply triggers the turbo-boost script at startup.
|
||||||
# I use it as a startup script.
|
# I use it as a startup script.
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
~/.local/bin/turbo-boost disable
|
~/.local/bin/turbo-boost disable
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Toggles WiFi on a Linux system. Make sure that you have nmcli installed.
|
# Toggles WiFi on a Linux system. Make sure that you have nmcli installed.
|
||||||
# I use it with a shortcut.
|
# I use it with a shortcut.
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
if [ $(nmcli r wifi | grep -c enabled) -eq 1 ]; then
|
if [ $(nmcli r wifi | grep -c enabled) -eq 1 ]; then
|
||||||
nmcli r wifi off
|
nmcli r wifi off
|
||||||
|
|
Loading…
Reference in a new issue