Comment the scripts in system/bin
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
09d9f2c1c8
commit
e405bbcd89
7 changed files with 94 additions and 21 deletions
|
@ -1,4 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# SCRIPT NAME:
|
||||||
|
# increase_volume.sh
|
||||||
|
#
|
||||||
|
# AUTHOR:
|
||||||
|
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||||
|
#
|
||||||
|
# DESCRIPTION:
|
||||||
|
# This script uses pamixer to increase the volume by 5% as long
|
||||||
|
# as the current volume is less than 150%. I call this script
|
||||||
|
# using custom i3 keybindings.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# ./increase_volume.sh
|
||||||
if [[ $(pamixer --get-volume) -lt 150 ]]; then
|
if [[ $(pamixer --get-volume) -lt 150 ]]; then
|
||||||
pamixer -i 5 --allow-boost
|
pamixer -i 5 --allow-boost
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,4 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# SCRIPT NAME:
|
||||||
|
# resolution.sh
|
||||||
|
#
|
||||||
|
# AUTHOR:
|
||||||
|
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||||
|
#
|
||||||
|
# DESCRIPTION:
|
||||||
|
# This is the script that is used to setup my monitors. This script
|
||||||
|
# is used by i3 and lightdm.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# ./resolution.sh
|
||||||
xrandr --setprovideroutputsource modesetting NVIDIA-0
|
xrandr --setprovideroutputsource modesetting NVIDIA-0
|
||||||
#xrandr --auto
|
|
||||||
xrandr --output HDMI3 --off --output HDMI2 --off --output HDMI1 --mode 1280x1024 --pos 80x56 --rotate normal --output eDP1 --primary --mode 1920x1080 --pos 1360x0 --rotate normal --output DP3 --off --output DP2 --off --output DP1 --off
|
xrandr --output HDMI3 --off --output HDMI2 --off --output HDMI1 --mode 1280x1024 --pos 80x56 --rotate normal --output eDP1 --primary --mode 1920x1080 --pos 1360x0 --rotate normal --output DP3 --off --output DP2 --off --output DP1 --off
|
||||||
|
|
|
@ -1,2 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# SCRIPT NAME:
|
||||||
|
# screenlock.sh
|
||||||
|
#
|
||||||
|
# AUTHOR:
|
||||||
|
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||||
|
#
|
||||||
|
# DESCRIPTION:
|
||||||
|
# This script locks the screen using lightdm. This script is called
|
||||||
|
# using a custom i3 keybinding.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# ./screenlock.sh
|
||||||
dm-tool lock
|
dm-tool lock
|
|
@ -1,16 +1,23 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# This script allows me to quickly start or stop apache2 and mysql.
|
# SCRIPT NAME:
|
||||||
|
# server.sh
|
||||||
#
|
#
|
||||||
# Usage: ./server.sh [start|stop]
|
# AUTHOR:
|
||||||
|
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||||
if [ "$1" == "start" ]; then
|
#
|
||||||
|
# DESCRIPTION:
|
||||||
|
# This script starts / stops the Apache and MariaDB servers.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# ./server.sh start|stop
|
||||||
|
if [ "${1}" == "start" ]; then
|
||||||
sudo systemctl start httpd.service
|
sudo systemctl start httpd.service
|
||||||
sudo systemctl start mariadb.service
|
sudo systemctl start mariadb.service
|
||||||
elif [ "$1" == "stop" ]; then
|
elif [ "${1}" == "stop" ]; then
|
||||||
sudo systemctl stop httpd.service
|
sudo systemctl stop httpd.service
|
||||||
sudo systemctl stop mariadb.service
|
sudo systemctl stop mariadb.service
|
||||||
else
|
else
|
||||||
echo "'$1' is an unknown option"
|
echo "${1} is an unknown option"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,11 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# This script simply uses livestreamer <http://docs.livestreamer.io/> to
|
# SCRIPT NAME:
|
||||||
# stream a twitch stream. It's only a little shortcut, so I don't have to
|
# twitch.sh
|
||||||
# type so much.
|
|
||||||
#
|
#
|
||||||
# Usage: ./twitch.sh USERNAME [RESOLUTION]
|
# AUTHOR:
|
||||||
|
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||||
|
#
|
||||||
|
# DESCRIPTION:
|
||||||
|
# This script loads a Twitch livestream in a local video player
|
||||||
|
# using streamlink.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# ./twitch.sh USERNAME [RESOLUTION]
|
||||||
if [[ -z $1 ]]; then
|
if [[ -z $1 ]]; then
|
||||||
echo "Please enter a username!"
|
echo "Please enter a username!"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -14,7 +20,7 @@ fi
|
||||||
if [[ -z $2 ]]; then
|
if [[ -z $2 ]]; then
|
||||||
resolution="best"
|
resolution="best"
|
||||||
else
|
else
|
||||||
resolution="$2"
|
resolution="${2}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
streamlink -v -l debug "twitch.tv/$1" "$resolution"
|
streamlink "https://twitch.tv/${1}" "${resolution}"
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Author: Severin Kaderli <severin.kaderli@gmail.com>
|
# SCRIPT NAME:
|
||||||
|
# upgrade.sh
|
||||||
|
#
|
||||||
|
# AUTHOR:
|
||||||
|
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||||
|
#
|
||||||
|
# DESCRIPTION:
|
||||||
|
# This script upgrades all pacman packages and globally installed
|
||||||
|
# npm packages.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# ./upgrade.sh
|
||||||
. utils.sh
|
. utils.sh
|
||||||
|
|
||||||
print_header "Update packages"
|
print_header "Update packages"
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Author: Severin Kaderli <severin.kaderli@gmail.com>
|
# SCRIPT NAME:
|
||||||
|
# utils.sh
|
||||||
|
#
|
||||||
|
# AUTHOR:
|
||||||
|
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||||
|
#
|
||||||
|
# DESCRIPTION:
|
||||||
|
# This script provides functions that I use in my other scripts. It is
|
||||||
|
# not supposed to be run directly.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# Source this script in the needed script.
|
||||||
#######################################
|
#######################################
|
||||||
# Directory variables
|
# Directory variables
|
||||||
#######################################
|
#######################################
|
||||||
|
@ -32,8 +42,8 @@ function print_header() {
|
||||||
# Creates the given directory in the home directory
|
# Creates the given directory in the home directory
|
||||||
# $1: Directory
|
# $1: Directory
|
||||||
function create_directory() {
|
function create_directory() {
|
||||||
echo -e "- Creating directory ${YELLOW}${HOME}/${dir}${RESET}"
|
echo -e "- Creating directory ${YELLOW}${HOME}/${1}${RESET}"
|
||||||
mkdir -p "${HOME}/${dir}"
|
mkdir -p "${HOME}/${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Creates a symlink of the given file from the home directory to here.
|
# Creates a symlink of the given file from the home directory to here.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue