Vol up/down with page up/down
Signed-off-by: Frank Villaro-Dixon <frank.villaro@infomaniak.com>
This commit is contained in:
parent
c63b7a6e6a
commit
4aa2eba929
3 changed files with 30 additions and 13 deletions
|
@ -92,8 +92,14 @@ case $1 in
|
||||||
"monitor")
|
"monitor")
|
||||||
#SNU=`xrandr | grep VGA | cut -d' ' -f1 | cut -c4`
|
#SNU=`xrandr | grep VGA | cut -d' ' -f1 | cut -c4`
|
||||||
VGA=DP-1
|
VGA=DP-1
|
||||||
|
PROJ=DP-1-3
|
||||||
LVDS=eDP-1
|
LVDS=eDP-1
|
||||||
case $2 in
|
case $2 in
|
||||||
|
"proj")
|
||||||
|
xrandr --output $LVDS --off \
|
||||||
|
--output $VGA --off \
|
||||||
|
--output $PROJ --auto --rotate normal
|
||||||
|
;;
|
||||||
"extern")
|
"extern")
|
||||||
xrandr --output $LVDS --off \
|
xrandr --output $LVDS --off \
|
||||||
--output $VGA --auto --rotate normal
|
--output $VGA --auto --rotate normal
|
||||||
|
@ -162,18 +168,19 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"checkbatt")
|
"checkbatt")
|
||||||
BATT_PCT=$(acpi -b | cut -d, -f2 | cut -d" " -f2 | cut -d'%' -f1)
|
|
||||||
if [ $BATT_PCT -le 15 ]; then
|
|
||||||
# systemctl suspend -i
|
|
||||||
true
|
|
||||||
for i in `seq 10`; do
|
|
||||||
$0 leds thinklight on
|
|
||||||
sleep .1
|
|
||||||
$0 leds thinklight off
|
|
||||||
sleep .1
|
|
||||||
done
|
|
||||||
fi;
|
|
||||||
;;
|
;;
|
||||||
|
#BATT_PCT=$(acpi -b | cut -d, -f2 | cut -d" " -f2 | cut -d'%' -f1)
|
||||||
|
#if [ $BATT_PCT -le 15 ]; then
|
||||||
|
# # systemctl suspend -i
|
||||||
|
# true
|
||||||
|
# for i in `seq 10`; do
|
||||||
|
# $0 leds thinklight on
|
||||||
|
# sleep .1
|
||||||
|
# $0 leds thinklight off
|
||||||
|
# sleep .1
|
||||||
|
# done
|
||||||
|
#fi;
|
||||||
|
#;;
|
||||||
|
|
||||||
"wallpaper")
|
"wallpaper")
|
||||||
~/Pictures/wallpapers/chooseWP.sh || true &
|
~/Pictures/wallpapers/chooseWP.sh || true &
|
||||||
|
|
10
bash/.bashrc
10
bash/.bashrc
|
@ -62,10 +62,16 @@ source ~/.bash_ps1
|
||||||
#### ALIAS ####
|
#### ALIAS ####
|
||||||
###############
|
###############
|
||||||
# {{{
|
# {{{
|
||||||
|
alias hget='curl'
|
||||||
|
alias hpost='curl -X POST'
|
||||||
|
alias hdelete='curl -X DELETE'
|
||||||
|
alias jcurl='curl --header "Content-Type: application/json"'
|
||||||
|
|
||||||
alias mobatime='~/Programmation/mobatime.pl -u FVD -p $(pass web/mobatime.infomaniak.ch | grep -v login)'
|
alias mobatime='~/Programmation/mobatime.pl -u FVD -p $(pass web/mobatime.infomaniak.ch | grep -v login)'
|
||||||
alias nshttp='NSH_HTTP=http NSH_PORT=8888 nsh localhost'
|
alias nshttp='NSH_HTTP=http NSH_PORT=8888 nsh localhost'
|
||||||
alias kl='kubectl'
|
alias kl='kubectl'
|
||||||
alias klks='kubectl -n kube-system'
|
alias klks='kubectl -n kube-system'
|
||||||
|
alias kp='kubectl -n pasika'
|
||||||
alias change_yubikey='pkill gpg-agent ssh-agent pinentry ; eval $(gpg-agent --daemon --enable-ssh-support) ; gpg-connect-agent updatestartuptty /bye'
|
alias change_yubikey='pkill gpg-agent ssh-agent pinentry ; eval $(gpg-agent --daemon --enable-ssh-support) ; gpg-connect-agent updatestartuptty /bye'
|
||||||
alias dockerdns=' docker run -d --hostname dns.mageddo --restart=unless-stopped -p 5380:5380 -v /var/run/docker.sock:/var/run/docker.sock -v /etc/resolv.conf:/etc/resolv.conf -d defreitas/dns-proxy-server'
|
alias dockerdns=' docker run -d --hostname dns.mageddo --restart=unless-stopped -p 5380:5380 -v /var/run/docker.sock:/var/run/docker.sock -v /etc/resolv.conf:/etc/resolv.conf -d defreitas/dns-proxy-server'
|
||||||
alias flake='docker run --rm -v $(pwd):/data -it gitlab.infomaniak.ch:4567/production-purple/ci/flake8/master:latest flake8 --ignore=E266,E303,E501,W391,E722,W503,F403,F405 --max-line-length=110 --exclude=venv,__pycache__ /data'
|
alias flake='docker run --rm -v $(pwd):/data -it gitlab.infomaniak.ch:4567/production-purple/ci/flake8/master:latest flake8 --ignore=E266,E303,E501,W391,E722,W503,F403,F405 --max-line-length=110 --exclude=venv,__pycache__ /data'
|
||||||
|
@ -140,6 +146,7 @@ alias dual='$OCTOPUS monitor dual'
|
||||||
alias laptop='$OCTOPUS monitor laptop'
|
alias laptop='$OCTOPUS monitor laptop'
|
||||||
alias programming='$OCTOPUS monitor programming'
|
alias programming='$OCTOPUS monitor programming'
|
||||||
alias extern='$OCTOPUS monitor extern'
|
alias extern='$OCTOPUS monitor extern'
|
||||||
|
alias proj='$OCTOPUS monitor proj'
|
||||||
alias clone='$OCTOPUS monitor clone'
|
alias clone='$OCTOPUS monitor clone'
|
||||||
alias CV='$OCTOPUS monitor CV'
|
alias CV='$OCTOPUS monitor CV'
|
||||||
|
|
||||||
|
@ -616,6 +623,7 @@ export KUBECONFIG=$(echo ~/.kube/*yml | tr ' ' ':')
|
||||||
|
|
||||||
source ~/.env-secrets
|
source ~/.env-secrets
|
||||||
export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh
|
export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh
|
||||||
source <(kubectl completion bash)
|
|
||||||
source /etc/profile.d/bash_completion.sh
|
source /etc/profile.d/bash_completion.sh
|
||||||
|
source <(kubectl completion bash) # completion will save a lot of time and avoid typo
|
||||||
|
source <(kubectl completion bash | sed 's/kubectl/kl/g' ) # so completion works with the alias "k"
|
||||||
eval "$(direnv hook bash)"
|
eval "$(direnv hook bash)"
|
||||||
|
|
|
@ -126,8 +126,10 @@ static Key keys[] = {
|
||||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
|
|
||||||
{ 0, XF86XK_AudioRaiseVolume, spawn, { .v = volup } },
|
{ 0, XF86XK_AudioRaiseVolume, spawn, { .v = volup } },
|
||||||
{ 0, XF86XK_AudioLowerVolume, spawn, { .v = voldown } },
|
{ 0, XF86XK_AudioLowerVolume, spawn, { .v = voldown } },
|
||||||
|
{ MODKEY, XK_KP_Page_Up, spawn, { .v = volup } },
|
||||||
|
{ MODKEY, XK_KP_Page_Down, spawn, { .v = voldown } },
|
||||||
{ 0, XF86XK_AudioMute, spawn, { .v = volmute } },
|
{ 0, XF86XK_AudioMute, spawn, { .v = volmute } },
|
||||||
{ 0, XF86XK_AudioPlay, spawn, { .v = audioplay } },
|
{ 0, XF86XK_AudioPlay, spawn, { .v = audioplay } },
|
||||||
{ 0, XF86XK_AudioPrev, spawn, { .v = audioprev } },
|
{ 0, XF86XK_AudioPrev, spawn, { .v = audioprev } },
|
||||||
|
|
Loading…
Reference in a new issue