fixed my i3blocks bar, cleaned up some files and added snap and i3block-contrib

This commit is contained in:
Rick van Lieshout 2019-09-16 08:42:14 +02:00
parent 9b7ed6d222
commit 4d68d00007
8 changed files with 35 additions and 43 deletions

View File

@ -11,11 +11,22 @@ alias docker-clean-containers='docker container prune -f --filter "until=48h"'
alias docker-clean-images='docker image prune -a -f --filter "until=48h"' alias docker-clean-images='docker image prune -a -f --filter "until=48h"'
alias docker-clean-volumes='docker volume prune -f --filter "label!=keep"' alias docker-clean-volumes='docker volume prune -f --filter "label!=keep"'
alias docker-clean-networks='docker network prune -f --filter "until=24h"' alias docker-clean-networks='docker network prune -f --filter "until=24h"'
alias docker-clean-all='docker system prune -f --volumes' alias docker-clean-all='stop-dockers && docker-clean-containers && docker-clean-images && docker-clean-volumes && docker-clean-networks'
#upload text to sprunge.us # Kubernetes commands
#USAGE cat file.txt | sprunge alias mkubectl='microk8s.kubectl'
alias sprunge='curl -F "sprunge=<-" http://sprunge.us' alias kubestart='microk8s.start'
alias kubestop='microk8s.stop'
#dotnet core
alias efupdate="dotnet ef database update"
alias efmigrate="dotnet ef migrations add"
alias efremove="dotnet ef migrations remove"
alias dotnetnew="dotnet new webapi -o "
# git
alias gitremovelocalbranches='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
alias untangle-line-endings='find ./ -type f -exec dos2unix {} \;'
## pacman and trizen ## pacman and trizen
alias aur='trizen --noconfirm' alias aur='trizen --noconfirm'
@ -34,12 +45,6 @@ alias preferredapps='exo-preferred-applications'
#show 5 most memory consuming apps #show 5 most memory consuming apps
alias psmem='ps auxf | sort -nr -k 5 | head -n 5' alias psmem='ps auxf | sort -nr -k 5 | head -n 5'
#dotnet core
alias efupdate="dotnet ef database update"
alias efmigrate="dotnet ef migrations add"
alias efremove="dotnet ef migrations remove"
alias dotnetnew="dotnet new webapi -o "
##utility ##utility
alias nmapscan='nmap -n -sP' alias nmapscan='nmap -n -sP'
alias pia='nohup sh /opt/pia/run.sh &>/dev/null & disown' alias pia='nohup sh /opt/pia/run.sh &>/dev/null & disown'
@ -90,15 +95,6 @@ alias handbrake='ghb'
# grub # grub
alias update-grub='grub-mkconfig -o /boot/grub/grub.cfg' alias update-grub='grub-mkconfig -o /boot/grub/grub.cfg'
# git
alias gitremovelocalbranches='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
alias untangle-line-endings='find ./ -type f -exec dos2unix {} \;'
# development
alias chromecors='google-chrome-stable --disable-web-security --user-data-dir="~/.chrome-unsafe"'
## Functions ## Functions
# function to cd up a couple of times # function to cd up a couple of times
@ -143,9 +139,9 @@ isup(){
if ! [ -z "$1" ]; then if ! [ -z "$1" ]; then
ping -c 3 $1 > /dev/null 2>&1 ping -c 3 $1 > /dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "$1 Seems to be offline"; echo "$1 seems to be offline";
else else
echo "$1 Seems to be online"; echo "$1 seems to be online";
fi fi
fi fi
} }

View File

@ -1,17 +1,14 @@
# # if powerline-shell is available use it.
# ~/.bashrc
#
function _update_ps1() { function _update_ps1() {
if hash powerline-shell 2>/dev/null; then if hash powerline-shell 2>/dev/null; then
PS1=$(powerline-shell $?) PS1=$(powerline-shell $?)
fi fi
} }
source ~/.alias
# If not running interactively, don't do anything # If not running interactively, don't do anything
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
source ~/.alias
source ~/.custom source ~/.custom
source ~/.variables source ~/.variables
@ -22,7 +19,6 @@ if hash dotnet 2>/dev/null; then
export PATH="${PATH}:${DOTNET_ROOT}:~/.dotnet/tools" export PATH="${PATH}:${DOTNET_ROOT}:~/.dotnet/tools"
fi fi
#... :P fancy stuffs #... :P fancy stuffs
#screenfetch -t -A "UBUNTU" #screenfetch -t -A "UBUNTU"
neofetch neofetch

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
xrandr --output eDP-1 --mode 3840x2160 --pos 0x0 --rotate normal --output DP-1-2 --off --output HDMI-2 --off --output HDMI-1 --off --output DP-1 --off --output DP-1-3 --off --output DP-2 --off --output DP-1-1 --off xrandr --output eDP-1 --primary --mode 3840x2160 --pos 0x0 --rotate normal --output DP-1-2 --off --output HDMI-2 --off --output HDMI-1 --off --output DP-1 --off --output DP-1-3 --off --output DP-2 --off --output DP-1-1 --off
xrdb -merge /home/mastermindzh/.Xresources.undocked xrdb -merge /home/mastermindzh/.Xresources.undocked

View File

@ -3,7 +3,6 @@ notifyconf
enpass-bin enpass-bin
insync insync
visual-studio-code-insiders visual-studio-code-insiders
gpmdp
ttf-font-awesome-4 ttf-font-awesome-4
awesome-terminal-fonts-git awesome-terminal-fonts-git
otf-droid-sans-mono-powerline-git otf-droid-sans-mono-powerline-git
@ -11,4 +10,6 @@ downgrade
dive dive
xorg-xev xorg-xev
spotify spotify
networkmanager-l2tp networkmanager-l2tp
snapd
i3blocks-contrib

View File

@ -22,7 +22,6 @@ zenity
xorg-xrandr xorg-xrandr
networkmanager networkmanager
eog eog
screenfetch
python python
python-pip python-pip
gdm gdm

View File

@ -24,7 +24,7 @@
# #
# The top properties below are applied to every block, but can be overridden. # The top properties below are applied to every block, but can be overridden.
# Each block command defaults to the script name to avoid boilerplate. # Each block command defaults to the script name to avoid boilerplate.
command=/usr/lib/i3blocks/$BLOCK_NAME command=/usr/lib/i3blocks/$BLOCK_NAME/$BLOCK_NAME
separator_block_width=15 separator_block_width=15
markup=none markup=none
@ -54,12 +54,12 @@ color=#999999
# see the script for details. # see the script for details.
[temperature] [temperature]
command=bash ~/.config/i3/scripts/blocks/temp.sh command=bash ~/.config/i3/scripts/blocks/temp.sh
label= label=
interval=1 interval=1
color=#999999 color=#999999
[load_average] [load_average]
label= label=
interval=10 interval=10
separator=true separator=true
color=#999999 color=#999999
@ -68,7 +68,7 @@ color=#999999
# #
# The type defaults to "mem" if the instance is not specified. # The type defaults to "mem" if the instance is not specified.
[memory] [memory]
label= label=
separator=true separator=true
interval=30 interval=30
color=#999999 color=#999999
@ -78,7 +78,7 @@ color=#999999
# The script may be called with a optional argument to set the alert # The script may be called with a optional argument to set the alert
# (defaults to 10 for 10%). # (defaults to 10 for 10%).
[disk] [disk]
label= label=
instance=/ instance=/
interval=5 interval=5
separator=true separator=true
@ -86,7 +86,7 @@ color=#999999
# Updates # Updates
[updates] [updates]
label= label=
command=pacman -Qu | wc -l command=pacman -Qu | wc -l
interval=60 interval=60
separator=true separator=true
@ -105,7 +105,7 @@ separator=true
# ping # ping
[ping] [ping]
label= label=
command=ping -c 2 8.8.8.8 | tail -1| awk '{print $4}' | cut -d '/' -f 2 | cut -f1 -d"." command=ping -c 2 8.8.8.8 | tail -1| awk '{print $4}' | cut -d '/' -f 2 | cut -f1 -d"."
interval=60 interval=60
separator=true separator=true
@ -117,7 +117,7 @@ color=#999999
# The second parameter overrides the mixer selection # The second parameter overrides the mixer selection
# See the script for details. # See the script for details.
[volume] [volume]
label= label=
instance=Master instance=Master
interval=1 interval=1
command=/usr/lib/i3blocks/volume 5 pulse command=/usr/lib/i3blocks/volume 5 pulse
@ -129,7 +129,7 @@ color=#999999
# The battery instance defaults to 0. # The battery instance defaults to 0.
[battery] [battery]
#label=BAT #label=BAT
label= label=
#instance=1 #instance=1
interval=30 interval=30
separator=true separator=true

View File

@ -225,7 +225,7 @@ alias sp-prev=" sp-dbus Previous"
SPOTIFY_PID="$(pidof -s spotify)" SPOTIFY_PID="$(pidof -s spotify)"
if [[ -z "$SPOTIFY_PID" ]]; then if [[ -z "$SPOTIFY_PID" ]]; then
echo "Error: Spotify is not running." echo "Spotify is not running."
exit 1 exit 1
fi fi
@ -273,4 +273,4 @@ fi
# liability, whether in an action of contract, tort or otherwise, arising from, # liability, whether in an action of contract, tort or otherwise, arising from,
# out of or in connection with the software or the use or other dealings in the # out of or in connection with the software or the use or other dealings in the
# software. # software.
# #

View File

@ -235,4 +235,4 @@ select opt in "$PWD/computers"/*; do
done done
clear clear
echo "Enjoy using my rice! Do not forget to select i3 in GDM :)" echo "Enjoy using my rice! Do not forget to select i3 in GDM :)"