mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-11-21 22:33:42 +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
|
||||
alias aur='trizen --noconfirm'
|
||||
alias update='trizen -Syyu --noconfirm'
|
||||
alias remove-orphans='sudo pacman -Rns $(pacman -Qtdq)'
|
||||
alias updatekeys='sudo pacman-key --refresh-key'
|
||||
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 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 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 scan-wifi='sudo iw dev wlp2s0 scan'
|
||||
alias pretty-json='python -m json.tool'
|
||||
@ -159,3 +159,21 @@ killport () {
|
||||
fuser -k $1/tcp
|
||||
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 ~/.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
|
||||
#screenfetch -t -A "UBUNTU"
|
||||
neofetch
|
||||
|
@ -3,3 +3,7 @@ alias dock='bash ~/.docked.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 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'
|
||||
|
@ -60,12 +60,12 @@ color=#999999
|
||||
# see the script for details.
|
||||
[temperature]
|
||||
command=bash ~/.config/i3/scripts/blocks/temp.sh
|
||||
label=
|
||||
label=
|
||||
interval=1
|
||||
color=#999999
|
||||
|
||||
[load_average]
|
||||
label=
|
||||
label=
|
||||
interval=10
|
||||
separator=true
|
||||
color=#999999
|
||||
@ -74,7 +74,7 @@ color=#999999
|
||||
#
|
||||
# The type defaults to "mem" if the instance is not specified.
|
||||
[memory]
|
||||
label=
|
||||
label=
|
||||
separator=true
|
||||
interval=30
|
||||
color=#999999
|
||||
@ -84,7 +84,7 @@ color=#999999
|
||||
# The script may be called with a optional argument to set the alert
|
||||
# (defaults to 10 for 10%).
|
||||
[disk]
|
||||
label=
|
||||
label=
|
||||
instance=/
|
||||
interval=5
|
||||
separator=true
|
||||
@ -92,7 +92,7 @@ color=#999999
|
||||
|
||||
# Updates
|
||||
[updates]
|
||||
label=
|
||||
label=
|
||||
command=pacman -Qu | wc -l
|
||||
interval=60
|
||||
separator=true
|
||||
@ -104,14 +104,14 @@ color=#999999
|
||||
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
|
||||
[iface]
|
||||
#instance=wlan0
|
||||
label=
|
||||
label=
|
||||
color=#0fad3c
|
||||
interval=10
|
||||
separator=true
|
||||
|
||||
# ping
|
||||
[ping]
|
||||
label=
|
||||
label=
|
||||
command=ping -c 2 8.8.8.8 | tail -1 | awk '{print $4}' | cut -d '/' -f 2 | cut -f1 -d"."
|
||||
interval=60
|
||||
separator=true
|
||||
@ -123,7 +123,7 @@ color=#999999
|
||||
# The second parameter overrides the mixer selection
|
||||
# See the script for details.
|
||||
[volume]
|
||||
label=
|
||||
label=
|
||||
instance=Master
|
||||
interval=1
|
||||
command=/usr/lib/i3blocks/volume/volume 5 pulse
|
||||
@ -151,7 +151,7 @@ color=#999999
|
||||
|
||||
# Date Time
|
||||
[time]
|
||||
label=
|
||||
label=
|
||||
command=date '+%Y-%m-%d %H:%M:%S'
|
||||
interval=1
|
||||
separator=true
|
||||
|
@ -4,14 +4,14 @@ icon="$HOME/.config/i3/icons/lock.png"
|
||||
tmpbg='/tmp/screen.png'
|
||||
|
||||
# detect whether spotify is running
|
||||
isPlaying=$(~/.config/i3/scripts/spotify-cli.sh status);
|
||||
isPlaying=$(~/.config/i3/scripts/tidal-cli.sh status);
|
||||
|
||||
scrot "$tmpbg"
|
||||
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
|
||||
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
|
||||
|
||||
# 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
|
||||
if [[ $* == *--suspend ]]; then
|
||||
@ -22,8 +22,8 @@ else
|
||||
i3lock -n -f -i "$tmpbg";
|
||||
|
||||
# if spotify was playing before we locked, resume.
|
||||
if [ $isPlaying == "Playing" ]; then
|
||||
~/.config/i3/scripts/spotify-cli.sh play
|
||||
if [ $isPlaying == "playing" ]; then
|
||||
~/.config/i3/scripts/tidal-cli.sh play
|
||||
fi;
|
||||
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user