diff --git a/.config/autorandr/docked_tv_oled_only/config b/.config/autorandr/docked_tv_oled_only/config index 2763213..2b54990 100644 --- a/.config/autorandr/docked_tv_oled_only/config +++ b/.config/autorandr/docked_tv_oled_only/config @@ -6,9 +6,8 @@ output eDP-1 off output DP-2 crtc 1 -gamma 0.909:0.833:0.769 mode 3840x2160 pos 0x0 rate 60.00 -scale 1.7x1.7 +scale 0.7x0.7 transform 1.699997,0.000000,0.000000,0.000000,1.699997,0.000000,0.000000,0.000000,1.000000 diff --git a/.config/autorandr/docked_tv_oled_only/postswitch b/.config/autorandr/docked_tv_oled_only/postswitch deleted file mode 100755 index db5ff2c..0000000 --- a/.config/autorandr/docked_tv_oled_only/postswitch +++ /dev/null @@ -1,5 +0,0 @@ -# /bin/bash -xset s noblank -xset s 300 -xset -dpms -xset s on diff --git a/.config/autorandr/postswitch b/.config/autorandr/postswitch new file mode 100755 index 0000000..18f8439 --- /dev/null +++ b/.config/autorandr/postswitch @@ -0,0 +1,35 @@ +#!/bin/bash + +polybar_auto_hide_timer_name=polybar_auto_hide.timer + +function auto_hide_polybar() { + + if [[ $1 == "true" ]]; then + systemd-run --user --on-calendar="*:0/1" --unit=$polybar_auto_hide_timer_name /usr/bin/polybar-msg cmd show || true + else + systemctl --user stop $polybar_auto_hide_timer_name || true + fi +} + +current_profile=$(autorandr | grep '1st match' | awk '{print $1;}') +echo "Switching to $current_profile" + +if [[ "$current_profile" == *'oled'* ]]; then + echo "OLED Display detected" + + # setup screen saver + xset s noblank + xset s 300 + xset -dpms + xset s on + + # add timer to auto hide polybar + auto_hide_polybar "true" +else + # remote auto hide of polybar timer + auto_hide_polybar "false" +fi + +xmonad --restart +echo "Done!" + diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini index 4c5434a..f0280bd 100644 --- a/.config/polybar/modules.ini +++ b/.config/polybar/modules.ini @@ -784,6 +784,7 @@ interface = wlp3s0 [module/network] type = internal/network interface = wlp0s20f3 +click-left = nm-connection-editor ; Seconds to sleep between updates ; Default: 1 @@ -803,7 +804,7 @@ interval = 1.0 ; Accumulate values from all interfaces ; when querying for up/downspeed rate ; Default: false -accumulate-stats = true +accumulate-stats = false ; Consider an `UNKNOWN` interface state as up. ; Some devices have an unknown state, even when they're running diff --git a/.custom_functions b/.custom_functions index 111e80a..9dc34b8 100644 --- a/.custom_functions +++ b/.custom_functions @@ -13,3 +13,7 @@ function connectToBackupServer() { function connectToPi() { ssh alex@192.168.0.205 } + +function activate() { + source ./venv/bin/activate +} diff --git a/.vimrc b/.vimrc index 9420cc0..781aba9 100644 --- a/.vimrc +++ b/.vimrc @@ -218,6 +218,17 @@ Plugin 'fatih/vim-go' " buffer explorer plugin Plugin 'jlanzarotta/bufexplorer' +" jupyter vim plugin +"Plugin 'jupyter-vim/jupyter-vim' +" Always use the same virtualenv for vim, regardless of what Python +" environment is loaded in the shell from which vim is launched +"let g:vim_virtualenv_path = '/home/arch/.vim/jupyter_vim_venv' +"if exists('g:vim_virtualenv_path') +" pythonx import os; import vim +" pythonx activate_this = os.path.join(vim.eval('g:vim_virtualenv_path'), 'bin/activate_this.py') +" pythonx with open(activate_this) as f: exec(f.read(), {'__file__': activate_this}) +"endif + " pretty python code let python_highlight_all = 1 syntax on @@ -263,11 +274,11 @@ map g :YcmCompleter GoToDefinitionElseDeclaration "python with virtualenv support py3 << EOF -import os -import sys -if 'VIRTUAL_ENV' in os.environ: - project_base_dir = os.environ['VIRTUAL_ENV'] - activate_this = os.path.join(project_base_dir, - 'bin/activate_this.py') - execfile(activate_this, dict(__file__=activate_this)) +#import os +#import sys +#if 'VIRTUAL_ENV' in os.environ: +# project_base_dir = os.environ['VIRTUAL_ENV'] +# activate_this = os.path.join(project_base_dir, +# 'bin/activate_this.py') +# execfile(activate_this, dict(__file__=activate_this)) EOF diff --git a/.xbindkeysrc b/.xbindkeysrc index b22e5b6..36e3902 100644 --- a/.xbindkeysrc +++ b/.xbindkeysrc @@ -4,11 +4,11 @@ # thumb wheel up => increase volume "pamixer -i 2" - b:7 +Mod4 + b:7 # thumb wheel down => lower volume "pamixer -d 2" - b:6 +Mod4 + b:6 # set reload page to pressing the mouse wheel #"xte 'keydown ctrl' 'keydown r' 'keyup ctrl' 'keyup r'" diff --git a/.xmonad/xmonad-x86_64-linux b/.xmonad/xmonad-x86_64-linux index ff86601..66821d5 100755 Binary files a/.xmonad/xmonad-x86_64-linux and b/.xmonad/xmonad-x86_64-linux differ diff --git a/.xmonad/xmonad.errors b/.xmonad/xmonad.errors index b28ed7f..51cb409 100644 --- a/.xmonad/xmonad.errors +++ b/.xmonad/xmonad.errors @@ -1,14 +1,14 @@ -xmonad.hs:300:3: warning: [-Wtabs] - Tab character found here, and in 12 further locations. +xmonad.hs:186:1: warning: [-Wtabs] + Tab character found here, and in 13 further locations. Please use spaces instead. | -300 | spawn "polybar-msg cmd toggle") - | ^^^^^^ +186 | spawn "autorandr -c") + | ^^^^^^^^ -xmonad.hs:412:43: warning: [-Wdeprecations] +xmonad.hs:416:43: warning: [-Wdeprecations] In the use of ‘spacing’ (imported from XMonad.Layout.Spacing): Deprecated: "Use spacingRaw instead." | -412 | addSpace = renamed [CutWordsLeft 2] . spacing gap +416 | addSpace = renamed [CutWordsLeft 2] . spacing gap | ^^^^^^^ diff --git a/.xmonad/xmonad.hi b/.xmonad/xmonad.hi index 584314d..93f8acd 100644 Binary files a/.xmonad/xmonad.hi and b/.xmonad/xmonad.hi differ diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index ee1967b..48fbb96 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -181,6 +181,10 @@ myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ , ((modMask .|. controlMask .|. shiftMask, xK_p), spawn myScreenshotSelective) + -- run autorandr to switch configuration + , ((modMask, xK_Print), + spawn "autorandr -c") + -- Toggle current focus window to fullscreen , ((modMask, xK_f), sendMessage $ Toggle FULL) @@ -504,8 +508,8 @@ myManageHook = composeAll -- -- By default, do nothing. myStartupHook = do - --spawnOnce "nitrogen --restore &" - spawnOnce "picom -b --backend glx &" + spawnOnce "nitrogen --restore &" + spawnOnce "picom -b &" spawnOnce "light-locker &" -- spawn once not necessary here, since the launch script takes care of multiple instances spawn "~/.config/polybar/launch.sh" diff --git a/.xmonad/xmonad.o b/.xmonad/xmonad.o index 231ff3a..864c243 100644 Binary files a/.xmonad/xmonad.o and b/.xmonad/xmonad.o differ