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
|
## 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'
|
||||||
|
@ -60,12 +60,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
|
||||||
@ -74,7 +74,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
|
||||||
@ -84,7 +84,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
|
||||||
@ -92,7 +92,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
|
||||||
@ -104,14 +104,14 @@ color=#999999
|
|||||||
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
|
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
|
||||||
[iface]
|
[iface]
|
||||||
#instance=wlan0
|
#instance=wlan0
|
||||||
label=
|
label=
|
||||||
color=#0fad3c
|
color=#0fad3c
|
||||||
interval=10
|
interval=10
|
||||||
separator=true
|
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
|
||||||
@ -123,7 +123,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/volume 5 pulse
|
command=/usr/lib/i3blocks/volume/volume 5 pulse
|
||||||
@ -151,7 +151,7 @@ color=#999999
|
|||||||
|
|
||||||
# Date Time
|
# Date Time
|
||||||
[time]
|
[time]
|
||||||
label=
|
label=
|
||||||
command=date '+%Y-%m-%d %H:%M:%S'
|
command=date '+%Y-%m-%d %H:%M:%S'
|
||||||
interval=1
|
interval=1
|
||||||
separator=true
|
separator=true
|
||||||
|
@ -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