Comment the scripts in system/bin

Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
Severin Kaderli 2018-12-13 21:54:40 +01:00
parent 09d9f2c1c8
commit e405bbcd89
7 changed files with 94 additions and 21 deletions

View file

@ -1,4 +1,18 @@
#!/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
pamixer -i 5 --allow-boost
fi

View file

@ -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 --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

View file

@ -1,2 +1,15 @@
#!/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

View file

@ -1,16 +1,23 @@
#!/bin/bash
#
# This script allows me to quickly start or stop apache2 and mysql.
# SCRIPT NAME:
# server.sh
#
# Usage: ./server.sh [start|stop]
if [ "$1" == "start" ]; then
# AUTHOR:
# Severin Kaderli <severin.kaderli@gmail.com>
#
# 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 mariadb.service
elif [ "$1" == "stop" ]; then
elif [ "${1}" == "stop" ]; then
sudo systemctl stop httpd.service
sudo systemctl stop mariadb.service
else
echo "'$1' is an unknown option"
echo "${1} is an unknown option"
exit 0
fi

View file

@ -1,11 +1,17 @@
#!/bin/bash
#
# This script simply uses livestreamer <http://docs.livestreamer.io/> to
# stream a twitch stream. It's only a little shortcut, so I don't have to
# type so much.
# SCRIPT NAME:
# twitch.sh
#
# 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
echo "Please enter a username!"
exit 1
@ -14,7 +20,7 @@ fi
if [[ -z $2 ]]; then
resolution="best"
else
resolution="$2"
resolution="${2}"
fi
streamlink -v -l debug "twitch.tv/$1" "$resolution"
streamlink "https://twitch.tv/${1}" "${resolution}"

View file

@ -1,6 +1,17 @@
#!/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
print_header "Update packages"

View file

@ -1,7 +1,17 @@
#!/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
#######################################
@ -32,8 +42,8 @@ function print_header() {
# Creates the given directory in the home directory
# $1: Directory
function create_directory() {
echo -e "- Creating directory ${YELLOW}${HOME}/${dir}${RESET}"
mkdir -p "${HOME}/${dir}"
echo -e "- Creating directory ${YELLOW}${HOME}/${1}${RESET}"
mkdir -p "${HOME}/${1}"
}
# Creates a symlink of the given file from the home directory to here.