mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-11-22 06:44:41 +01:00
i3lock now stops/starts tidal instead of spotify
This commit is contained in:
parent
9714b2fa1d
commit
fbe3848039
@ -31,6 +31,7 @@ alias untangle-line-endings='find ./ -type f -exec dos2unix {} \;'
|
|||||||
## pacman and trizen
|
## pacman and trizen
|
||||||
alias aur='trizen --noconfirm'
|
alias aur='trizen --noconfirm'
|
||||||
alias update='trizen -Syyu --noconfirm'
|
alias update='trizen -Syyu --noconfirm'
|
||||||
|
alias remove-orphans='sudo pacman -Rns $(pacman -Qtdq)'
|
||||||
alias updatekeys='sudo pacman-key --refresh-key'
|
alias updatekeys='sudo pacman-key --refresh-key'
|
||||||
alias clean-pacmancache='sudo paccache -rk 1 && sudo paccache -ruk0'
|
alias clean-pacmancache='sudo paccache -rk 1 && sudo paccache -ruk0'
|
||||||
|
|
||||||
@ -51,7 +52,6 @@ alias pia='nohup sh /opt/pia/run.sh &>/dev/null & disown'
|
|||||||
alias wifimenu='nm-connection-editor'
|
alias wifimenu='nm-connection-editor'
|
||||||
alias findcrlf='find . -path node_modules -prune -o -not -type d -exec file "{}" ";" | grep -E "BOM|CRLF"'
|
alias findcrlf='find . -path node_modules -prune -o -not -type d -exec file "{}" ";" | grep -E "BOM|CRLF"'
|
||||||
alias fixcrlf='findcrlf > /tmp/crlftolf && cat /tmp/crlftolf | while read line; do CUTLINE=$(echo $line | cut -f1 -d":") && dos2unix $CUTLINE; done'
|
alias fixcrlf='findcrlf > /tmp/crlftolf && cat /tmp/crlftolf | while read line; do CUTLINE=$(echo $line | cut -f1 -d":") && dos2unix $CUTLINE; done'
|
||||||
alias mountrick='sudo mount -t cifs //192.168.1.2/Rick /mnt/rick/ -o username=mastermindzh,noexec'
|
|
||||||
alias enable-wifi='sudo ip link set wlp2s0 up'
|
alias enable-wifi='sudo ip link set wlp2s0 up'
|
||||||
alias scan-wifi='sudo iw dev wlp2s0 scan'
|
alias scan-wifi='sudo iw dev wlp2s0 scan'
|
||||||
alias pretty-json='python -m json.tool'
|
alias pretty-json='python -m json.tool'
|
||||||
@ -159,3 +159,21 @@ killport () {
|
|||||||
fuser -k $1/tcp
|
fuser -k $1/tcp
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# function to switch kubernetes namespace
|
||||||
|
kubeswitch () {
|
||||||
|
if [ -z "$1" ] ; then
|
||||||
|
echo "please specify a namespace to switch to"
|
||||||
|
else
|
||||||
|
kubectl config set-context --current --namespace=$1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# function to switch to a different azure kubernetes cluster
|
||||||
|
azkubeswitch () {
|
||||||
|
if [ -z "$2" ] ; then
|
||||||
|
echo "please execute with the following params: azkubeswitch {resourcegroupname} {clustername}"
|
||||||
|
else
|
||||||
|
az aks get-credentials --resource-group $1 --name $2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
@ -12,13 +12,6 @@ source ~/.alias
|
|||||||
source ~/.custom
|
source ~/.custom
|
||||||
source ~/.variables
|
source ~/.variables
|
||||||
|
|
||||||
# Fix .netcore paths if dotnet is installed
|
|
||||||
if hash dotnet 2>/dev/null; then
|
|
||||||
export DOTNET_ROOT=/opt/dotnet
|
|
||||||
export MSBuildSDKsPath=$DOTNET_ROOT/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdks
|
|
||||||
export PATH="${PATH}:${DOTNET_ROOT}:~/.dotnet/tools"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#... :P fancy stuffs
|
#... :P fancy stuffs
|
||||||
#screenfetch -t -A "UBUNTU"
|
#screenfetch -t -A "UBUNTU"
|
||||||
neofetch
|
neofetch
|
||||||
|
@ -3,3 +3,7 @@ alias dock='bash ~/.docked.sh && i3-msg restart'
|
|||||||
alias undock='bash ~/.undocked.sh && i3-msg restart'
|
alias undock='bash ~/.undocked.sh && i3-msg restart'
|
||||||
alias mountdata='sudo cryptsetup open --type luks /dev/nvme0n1p7 data && sudo mount -t ext4 /dev/mapper/data /home/mastermindzh/data'
|
alias mountdata='sudo cryptsetup open --type luks /dev/nvme0n1p7 data && sudo mount -t ext4 /dev/mapper/data /home/mastermindzh/data'
|
||||||
alias unmountdata='sudo umount /home/mastermindzh/data && sudo cryptsetup close data && sudo sysctl --write vm.drop_caches=3'
|
alias unmountdata='sudo umount /home/mastermindzh/data && sudo cryptsetup close data && sudo sysctl --write vm.drop_caches=3'
|
||||||
|
|
||||||
|
# useful kubernetes (AZURE) commands
|
||||||
|
alias kubernetes-qa='azkubeswitch Inforit.Cloud InforitCluster'
|
||||||
|
alias kubernetes-prod='azkubeswitch Inforit.Cloud Production'
|
||||||
|
@ -4,14 +4,14 @@ icon="$HOME/.config/i3/icons/lock.png"
|
|||||||
tmpbg='/tmp/screen.png'
|
tmpbg='/tmp/screen.png'
|
||||||
|
|
||||||
# detect whether spotify is running
|
# detect whether spotify is running
|
||||||
isPlaying=$(~/.config/i3/scripts/spotify-cli.sh status);
|
isPlaying=$(~/.config/i3/scripts/tidal-cli.sh status);
|
||||||
|
|
||||||
scrot "$tmpbg"
|
scrot "$tmpbg"
|
||||||
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
|
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
|
||||||
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
|
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
|
||||||
|
|
||||||
# Stop music if playing
|
# Stop music if playing
|
||||||
~/.config/i3/scripts/spotify-cli.sh pause
|
~/.config/i3/scripts/tidal-cli.sh pause
|
||||||
|
|
||||||
# check whether the lockscreen is being activated because of a suspend
|
# check whether the lockscreen is being activated because of a suspend
|
||||||
if [[ $* == *--suspend ]]; then
|
if [[ $* == *--suspend ]]; then
|
||||||
@ -22,8 +22,8 @@ else
|
|||||||
i3lock -n -f -i "$tmpbg";
|
i3lock -n -f -i "$tmpbg";
|
||||||
|
|
||||||
# if spotify was playing before we locked, resume.
|
# if spotify was playing before we locked, resume.
|
||||||
if [ $isPlaying == "Playing" ]; then
|
if [ $isPlaying == "playing" ]; then
|
||||||
~/.config/i3/scripts/spotify-cli.sh play
|
~/.config/i3/scripts/tidal-cli.sh play
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user