From 4aa2eba929e9945b0490cbfdd83d51f7e1069a75 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Mon, 31 Aug 2020 10:54:50 +0200 Subject: [PATCH] Vol up/down with page up/down Signed-off-by: Frank Villaro-Dixon --- Utils/octopus.sh | 29 ++++++++++++++++++----------- bash/.bashrc | 10 +++++++++- dwm/config.h | 4 +++- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/Utils/octopus.sh b/Utils/octopus.sh index bceb052..2ddf23f 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -92,8 +92,14 @@ case $1 in "monitor") #SNU=`xrandr | grep VGA | cut -d' ' -f1 | cut -c4` VGA=DP-1 + PROJ=DP-1-3 LVDS=eDP-1 case $2 in + "proj") + xrandr --output $LVDS --off \ + --output $VGA --off \ + --output $PROJ --auto --rotate normal + ;; "extern") xrandr --output $LVDS --off \ --output $VGA --auto --rotate normal @@ -162,18 +168,19 @@ case $1 in ;; "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") ~/Pictures/wallpapers/chooseWP.sh || true & diff --git a/bash/.bashrc b/bash/.bashrc index 61d1e9e..4942ad7 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -62,10 +62,16 @@ source ~/.bash_ps1 #### 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 nshttp='NSH_HTTP=http NSH_PORT=8888 nsh localhost' alias kl='kubectl' 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 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' @@ -140,6 +146,7 @@ alias dual='$OCTOPUS monitor dual' alias laptop='$OCTOPUS monitor laptop' alias programming='$OCTOPUS monitor programming' alias extern='$OCTOPUS monitor extern' +alias proj='$OCTOPUS monitor proj' alias clone='$OCTOPUS monitor clone' alias CV='$OCTOPUS monitor CV' @@ -616,6 +623,7 @@ export KUBECONFIG=$(echo ~/.kube/*yml | tr ' ' ':') source ~/.env-secrets export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh -source <(kubectl completion bash) 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)" diff --git a/dwm/config.h b/dwm/config.h index 8954cc1..518ef87 100644 --- a/dwm/config.h +++ b/dwm/config.h @@ -126,8 +126,10 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_comma, 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 } }, + { MODKEY, XK_KP_Page_Up, spawn, { .v = volup } }, + { MODKEY, XK_KP_Page_Down, spawn, { .v = voldown } }, { 0, XF86XK_AudioMute, spawn, { .v = volmute } }, { 0, XF86XK_AudioPlay, spawn, { .v = audioplay } }, { 0, XF86XK_AudioPrev, spawn, { .v = audioprev } },