Dotfiles config
This commit is contained in:
commit
c6a4859417
19
examples/down-screen.sh
Executable file
19
examples/down-screen.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
###############################################################
|
||||
# down-daemon (down-screen) - Daemon to shutdown the screen #
|
||||
# Date: 19-11-2020 #
|
||||
# Author: q3aql #
|
||||
# Contact: q3aql@duck.com #
|
||||
###############################################################
|
||||
VERSION="1.0"
|
||||
M_DATE="191120"
|
||||
|
||||
# Variable
|
||||
endProcess=0
|
||||
|
||||
# Run screensaver
|
||||
sleep 3
|
||||
echo "* Forcing screen to shutdown..."
|
||||
xset dpms force off
|
||||
|
11
examples/startxrandr.sh
Executable file
11
examples/startxrandr.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
scan_rel=0
|
||||
|
||||
while [ ${scan_rel} -eq 0 ] ; do
|
||||
# Primer monitor
|
||||
xrandr --output DisplayPort-0 --mode 1280x1024 -r 75.02
|
||||
# Segundo monitor
|
||||
xrandr --output DisplayPort-1 --mode 1280x1024 -r 75.02 --rotate left --right-of DisplayPort-0
|
||||
sleep 1
|
||||
done
|
33
i3-tiling.txt
Normal file
33
i3-tiling.txt
Normal file
|
@ -0,0 +1,33 @@
|
|||
SYSTEM:
|
||||
|
||||
sudo apt-get install i3 i3status i3blocks i3-wm i3pystatus i3lock i3lock-fancy compton
|
||||
|
||||
THEMES:
|
||||
|
||||
sudo apt-get install arc-theme breeze-cursor-theme fonts-noto
|
||||
|
||||
APPAREANCE:
|
||||
|
||||
sudo apt-get install lxappearance nitrogen lxrandr
|
||||
|
||||
TOOLS:
|
||||
|
||||
sudo apt-get install pnmixer conky xterm exa fish cat zsh dmenu fzf apcalc rofi picom
|
||||
|
||||
Note: Also install alacritty
|
||||
|
||||
NETWORK:
|
||||
|
||||
sudo apt-get install connman connman-gtk connman-ui connman-vpn
|
||||
|
||||
APPS:
|
||||
|
||||
sudo apt-get install firefox engrampa xarchiver mpv ffmpeg pcmanfm ranger vlc vim geany
|
||||
|
||||
CODE:
|
||||
|
||||
sudo apt-get install git nodejs node-base python3 npm
|
||||
|
||||
OTHER:
|
||||
|
||||
sudo apt-get install make cmake gcc cargo neofetch screenfetch lm-sensors xfce4-screenshooter
|
22
scripts/get-pIP.sh
Executable file
22
scripts/get-pIP.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to get Public IP for Conky.
|
||||
# Created by q3aql (q3aql@duck.com)
|
||||
# Licensed by GPL v.2
|
||||
# Date: 27-11-2016
|
||||
# --------------------------------------
|
||||
|
||||
BUCLE=0
|
||||
mkdir -p $HOME/.pIP/
|
||||
pIP_FILE=$HOME/.pIP/pIP
|
||||
|
||||
while [ $BUCLE -le 1 ] ; do
|
||||
|
||||
P_IP=`curl http://icanhazip.com`
|
||||
while [ -z "$P_IP" ]; do
|
||||
sleep 3
|
||||
P_IP=`curl http://icanhazip.com`
|
||||
done
|
||||
echo $P_IP > $pIP_FILE
|
||||
sleep 1800
|
||||
done
|
137
scripts/hddinfo.sh
Executable file
137
scripts/hddinfo.sh
Executable file
|
@ -0,0 +1,137 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to show hdd info
|
||||
# Created by q3aql (q3aql@duck.com)
|
||||
# Licensed by GPL v.2
|
||||
# Date: 10-01-2020
|
||||
# --------------------------------------
|
||||
VERSION="1.0"
|
||||
|
||||
# Check if folder option is empty
|
||||
if [ -z "${1}" ] ; then
|
||||
echo ""
|
||||
echo " hddinfo v$VERSION"
|
||||
echo " ------------"
|
||||
echo ""
|
||||
echo " Sintax:"
|
||||
echo ""
|
||||
echo " hddinfo.sh <device or folder> -t | Show HddTotal Size"
|
||||
echo " hddinfo.sh <device or folder> -u | Show HddUsed Size"
|
||||
echo " hddinfo.sh <device or folder> -p | Show HddPercentage Use"
|
||||
echo " hddinfo.sh <device or folder> -b | Show HddPercentage Bar"
|
||||
echo ""
|
||||
echo " hddinfo.sh -l | List of available folders/devices"
|
||||
echo ""
|
||||
echo " Note: Conky require 'maximum_width = 240'"
|
||||
echo ""
|
||||
exit
|
||||
fi
|
||||
|
||||
# Create list of available devices
|
||||
if [ "${1}" == "-l" ] ; then
|
||||
numberDevices=$(df -h | wc -l)
|
||||
listAvailableDevices=$(df -h | tr -s " " | cut -d " " -f 6)
|
||||
count=2
|
||||
fileDevices=/tmp/listDevicesHddInfo
|
||||
echo "" > ${fileDevices}
|
||||
while [ ${numberDevices} -ge ${count} ] ; do
|
||||
device=$(df -h | tr -s " " | head -${count} | tail -1 | cut -d " " -f 1)
|
||||
folder=$(df -h | tr -s " " | head -${count} | tail -1 | cut -d " " -f 6)
|
||||
echo -n " ${device}" >> ${fileDevices}
|
||||
echo -n " on" >> ${fileDevices}
|
||||
echo " ${folder}" >> ${fileDevices}
|
||||
count=$(expr ${count} + 1)
|
||||
done
|
||||
echo ""
|
||||
echo " hddinfo v$VERSION"
|
||||
echo " ------------"
|
||||
echo ""
|
||||
echo " List of available devices/folders:"
|
||||
cat "${fileDevices}"
|
||||
echo ""
|
||||
exit
|
||||
fi
|
||||
|
||||
# Variables
|
||||
HddTotal=$(df -h | tr -s " " | grep -e "${1}" | cut -d " " -f 2)
|
||||
HddUsed=$(df -h | tr -s " " | grep -e "${1}" | cut -d " " -f 3)
|
||||
HddPercentage=$(df -h | tr -s " " | grep -e "${1}" | cut -d " " -f 5)
|
||||
HddPercentageInteger=$(echo ${HddPercentage} | cut -d "%" -f 1)
|
||||
|
||||
# Show percentage bar
|
||||
if [ ${HddPercentageInteger} -ge 0 ] ; then
|
||||
HddPercentageBar="="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 3 ] ; then
|
||||
HddPercentageBar="=="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 12 ] ; then
|
||||
HddPercentageBar="==="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 18 ] ; then
|
||||
HddPercentageBar="===="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 25 ] ; then
|
||||
HddPercentageBar="====="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 35 ] ; then
|
||||
HddPercentageBar="======"
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 40 ] ; then
|
||||
HddPercentageBar="======="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 45 ] ; then
|
||||
HddPercentageBar="========"
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 50 ] ; then
|
||||
HddPercentageBar="=========="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 62 ] ; then
|
||||
HddPercentageBar="============="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 75 ] ; then
|
||||
HddPercentageBar="==============="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 85 ] ; then
|
||||
HddPercentageBar="================="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 90 ] ; then
|
||||
HddPercentageBar="=================="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 95 ] ; then
|
||||
HddPercentageBar="==================="
|
||||
fi
|
||||
if [ ${HddPercentageInteger} -ge 100 ] ; then
|
||||
HddPercentageBar="===================="
|
||||
fi
|
||||
|
||||
# Show results
|
||||
if [ "${2}" == "-t" ]; then
|
||||
echo ${HddTotal}iB
|
||||
elif [ "${2}" == "-u" ]; then
|
||||
echo ${HddUsed}iB
|
||||
elif [ "${2}" == "-p" ]; then
|
||||
echo ${HddPercentage}
|
||||
elif [ "${2}" == "-b" ]; then
|
||||
echo ${HddPercentageBar}
|
||||
else
|
||||
echo ""
|
||||
echo " hddinfo v$VERSION"
|
||||
echo " ------------"
|
||||
echo ""
|
||||
echo " HddTotal = ${HddTotal}iB"
|
||||
echo " HddUsed = ${HddUsed}iB"
|
||||
echo ""
|
||||
echo " HddPercentage Use:"
|
||||
echo " ${HddPercentageBar} ${HddPercentage}"
|
||||
echo ""
|
||||
echo " Available commands:"
|
||||
echo ""
|
||||
echo " hddinfo.sh ${1} -t | Show HddTotal Size"
|
||||
echo " hddinfo.sh ${1} -u | Show HddUsed Size"
|
||||
echo " hddinfo.sh ${1} -p | Show HddPercentage Use"
|
||||
echo " hddinfo.sh ${1} -b | Show HddPercentage Bar"
|
||||
echo ""
|
||||
echo " Note: Conky require 'maximum_width = 240'"
|
||||
echo ""
|
||||
fi
|
32
scripts/kernel-version
Executable file
32
scripts/kernel-version
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Parameters
|
||||
longNumber=2
|
||||
kernelCommand="uname -r"
|
||||
archCommand=$(uname -m)
|
||||
|
||||
# Kernel version
|
||||
kernelVersion=""
|
||||
count=1
|
||||
|
||||
# Extract numbers of kernel version
|
||||
kernelVersionTemp=$(uname -r | cut -d "." -f ${count})
|
||||
kernelVersionTempDot="${kernelVersionTemp}"
|
||||
kernelVersion="${kernelVersion}${kernelVersionTempDot}"
|
||||
count=$(expr ${count} + 1)
|
||||
|
||||
while [ ${count} -le ${longNumber} ] ; do
|
||||
kernelVersionTemp=$(uname -r | cut -d "." -f ${count})
|
||||
kernelVersionTempDot=".${kernelVersionTemp}"
|
||||
kernelVersion="${kernelVersion}${kernelVersionTempDot}"
|
||||
count=$(expr ${count} + 1)
|
||||
done
|
||||
|
||||
kernelVersionTemp=$(uname -r | cut -d "." -f ${count} | cut -d "-" -f 1)
|
||||
kernelVersionTempDot=".${kernelVersionTemp}"
|
||||
kernelVersion=${kernelVersion}${kernelVersionTempDot}
|
||||
|
||||
# Apply arch
|
||||
kernelVersion=${kernelVersion}-${archCommand}
|
||||
echo "Linux ${kernelVersion}"
|
||||
|
127
scripts/meminfo.sh
Executable file
127
scripts/meminfo.sh
Executable file
|
@ -0,0 +1,127 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to show meminfo
|
||||
# Created by q3aql (q3aql@duck.com)
|
||||
# Licensed by GPL v.2
|
||||
# Date: 10-01-2020
|
||||
# --------------------------------------
|
||||
VERSION="1.0"
|
||||
|
||||
# Configuration variables
|
||||
memfile="/proc/meminfo"
|
||||
size="G" # Change to M for MiB
|
||||
|
||||
# Check if calc is installed
|
||||
calc -version &> /dev/null
|
||||
error=${?}
|
||||
if [ ${error} -ne 0 ] ; then
|
||||
echo ""
|
||||
echo " meminfo v$VERSION"
|
||||
echo " ------------"
|
||||
echo ""
|
||||
echo " The command 'calc' is not installed!"
|
||||
echo ""
|
||||
echo " You can install it with:"
|
||||
echo " sudo apt-get install apcalc"
|
||||
echo ""
|
||||
exit
|
||||
fi
|
||||
|
||||
# Variables
|
||||
memTotal=$(cat ${memfile} | grep -i "memtotal:" | head -1 | tr -s " " | cut -d " " -f 2)
|
||||
memActive=$(cat ${memfile} | grep -i "memavailable:" | head -1 | tr -s " " | cut -d " " -f 2)
|
||||
memActive=$(expr ${memTotal} - ${memActive})
|
||||
|
||||
# Variables to calculate
|
||||
memTotalM=$(expr ${memTotal} / 1024 )
|
||||
memActiveM=$(expr ${memActive} / 1024)
|
||||
memPercentage=$(calc ${memActive} / ${memTotal} \* 100)
|
||||
memTotalG=$(calc ${memTotalM} / 1024 | tr -s " " | cut -c1-5)
|
||||
memActiveG=$(calc ${memActiveM} / 1024 | tr -s " " | cut -c1-5)
|
||||
|
||||
# Variables to show
|
||||
showMemPercentage=$(echo ${memPercentage} | cut -d "~" -f 2 | cut -d "." -f 1)
|
||||
if [ "${size}" == "G" ] ; then
|
||||
showMemTotal="${memTotalG} GiB"
|
||||
showMemActive="${memActiveG} GiB"
|
||||
elif [ "${size}" == "M" ] ; then
|
||||
showMemTotal="${memTotalM} MiB"
|
||||
showMemActive="${memActiveM} MiB"
|
||||
else
|
||||
showMemTotal="${memTotalG} GiB"
|
||||
showMemActive="${memActiveG} GiB"
|
||||
fi
|
||||
|
||||
# Show percentage bar
|
||||
if [ ${showMemPercentage} -ge 3 ] ; then
|
||||
showMemPercentageBar="="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 12 ] ; then
|
||||
showMemPercentageBar="==="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 25 ] ; then
|
||||
showMemPercentageBar="====="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 35 ] ; then
|
||||
showMemPercentageBar="======"
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 40 ] ; then
|
||||
showMemPercentageBar="======="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 45 ] ; then
|
||||
showMemPercentageBar="========"
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 50 ] ; then
|
||||
showMemPercentageBar="=========="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 62 ] ; then
|
||||
showMemPercentageBar="============="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 75 ] ; then
|
||||
showMemPercentageBar="==============="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 85 ] ; then
|
||||
showMemPercentageBar="================="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 90 ] ; then
|
||||
showMemPercentageBar="=================="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 95 ] ; then
|
||||
showMemPercentageBar="==================="
|
||||
fi
|
||||
if [ ${showMemPercentage} -ge 100 ] ; then
|
||||
showMemPercentageBar="===================="
|
||||
fi
|
||||
|
||||
# Show results
|
||||
if [ "$1" == "-t" ] ; then
|
||||
echo ${showMemTotal}
|
||||
elif [ "$1" == "-a" ] ; then
|
||||
echo ${showMemActive}
|
||||
elif [ "$1" == "-p" ]; then
|
||||
echo ${showMemPercentage}%
|
||||
elif [ "$1" == "-b" ]; then
|
||||
echo ${showMemPercentageBar}
|
||||
else
|
||||
showMemTotalNoSpaces=$(echo ${showMemTotal})
|
||||
showMemActiveNoSpaces=$(echo ${showMemActive})
|
||||
echo ""
|
||||
echo " meminfo v$VERSION"
|
||||
echo " ------------"
|
||||
echo ""
|
||||
echo " MemTotal = ${showMemTotalNoSpaces}"
|
||||
echo " MemActive = ${showMemActiveNoSpaces}"
|
||||
echo ""
|
||||
echo " MemPercentage Use:"
|
||||
echo " ${showMemPercentageBar} ${showMemPercentage}%"
|
||||
echo ""
|
||||
echo " Available commands:"
|
||||
echo ""
|
||||
echo " meminfo.sh -t | Show MemTotal"
|
||||
echo " meminfo.sh -a | Show MemActive"
|
||||
echo " meminfo.sh -p | Show MemPercentage"
|
||||
echo " meminfo.sh -b | Show MemPercentage Bar"
|
||||
echo ""
|
||||
echo " Note: Conky require 'maximum_width = 240'"
|
||||
echo ""
|
||||
fi
|
58
scripts/randombar.sh
Executable file
58
scripts/randombar.sh
Executable file
|
@ -0,0 +1,58 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to show random bar
|
||||
# Created by q3aql (q3aql@protonmail.ch)
|
||||
# Licensed by GPL v.2
|
||||
# Date: 10-01-2020
|
||||
# --------------------------------------
|
||||
VERSION="1.0"
|
||||
|
||||
# Variables
|
||||
randomNumber=$(expr $RANDOM % 21)
|
||||
|
||||
# Show percentage bar
|
||||
if [ ${randomNumber} -eq 0 ] ; then
|
||||
showRandomBar="="
|
||||
elif [ ${randomNumber} -eq 1 ] ; then
|
||||
showRandomBar="="
|
||||
elif [ ${randomNumber} -eq 2 ] ; then
|
||||
showRandomBar="=="
|
||||
elif [ ${randomNumber} -eq 3 ] ; then
|
||||
showRandomBar="==="
|
||||
elif [ ${randomNumber} -eq 4 ] ; then
|
||||
showRandomBar="===="
|
||||
elif [ ${randomNumber} -eq 5 ] ; then
|
||||
showRandomBar="====="
|
||||
elif [ ${randomNumber} -eq 6 ] ; then
|
||||
showRandomBar="======"
|
||||
elif [ ${randomNumber} -eq 7 ] ; then
|
||||
showRandomBar="======="
|
||||
elif [ ${randomNumber} -eq 8 ] ; then
|
||||
showRandomBar="========"
|
||||
elif [ ${randomNumber} -eq 9 ] ; then
|
||||
showRandomBar="========="
|
||||
elif [ ${randomNumber} -eq 10 ] ; then
|
||||
showRandomBar="=========="
|
||||
elif [ ${randomNumber} -eq 11 ] ; then
|
||||
showRandomBar="==========="
|
||||
elif [ ${randomNumber} -eq 12 ] ; then
|
||||
showRandomBar="============"
|
||||
elif [ ${randomNumber} -eq 13 ] ; then
|
||||
showRandomBar="============="
|
||||
elif [ ${randomNumber} -eq 14 ] ; then
|
||||
showRandomBar="=============="
|
||||
elif [ ${randomNumber} -eq 15 ] ; then
|
||||
showRandomBar="==============="
|
||||
elif [ ${randomNumber} -eq 16 ] ; then
|
||||
showRandomBar="================"
|
||||
elif [ ${randomNumber} -eq 17 ] ; then
|
||||
showRandomBar="================="
|
||||
elif [ ${randomNumber} -eq 18 ] ; then
|
||||
showRandomBar="=================="
|
||||
elif [ ${randomNumber} -eq 19 ] ; then
|
||||
showRandomBar="==================="
|
||||
elif [ ${randomNumber} -eq 20 ] ; then
|
||||
showRandomBar="===================="
|
||||
fi
|
||||
|
||||
echo ${showRandomBar}
|
13
scripts/show-pIP.sh
Executable file
13
scripts/show-pIP.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to show Public IP for Conky.
|
||||
# Created by q3aql (q3aql@duck.com)
|
||||
# Licensed by GPL v.2
|
||||
# Date: 27-11-2016
|
||||
# --------------------------------------
|
||||
|
||||
pIP_FILE=$HOME/.pIP/pIP
|
||||
|
||||
if [ -f $pIP_FILE ]; then
|
||||
cat $pIP_FILE
|
||||
fi
|
BIN
wallpapers/abstract.png
Normal file
BIN
wallpapers/abstract.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.3 MiB |
BIN
wallpapers/i3-logo.png
Normal file
BIN
wallpapers/i3-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
BIN
wallpapers/solarized-2.png
Normal file
BIN
wallpapers/solarized-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 404 KiB |
BIN
wallpapers/solarized.jpg
Normal file
BIN
wallpapers/solarized.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
wallpapers/star-wars.jpg
Normal file
BIN
wallpapers/star-wars.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 446 KiB |
Loading…
Reference in New Issue
Block a user