This commit is contained in:
2021-04-19 14:21:56 +02:00
parent 7122968b55
commit dc7a8d4aef
12 changed files with 74 additions and 25 deletions
+1 -2
View File
@@ -6,9 +6,8 @@ output eDP-1
off off
output DP-2 output DP-2
crtc 1 crtc 1
gamma 0.909:0.833:0.769
mode 3840x2160 mode 3840x2160
pos 0x0 pos 0x0
rate 60.00 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 transform 1.699997,0.000000,0.000000,0.000000,1.699997,0.000000,0.000000,0.000000,1.000000
@@ -1,5 +0,0 @@
# /bin/bash
xset s noblank
xset s 300
xset -dpms
xset s on
+35
View File
@@ -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!"
+2 -1
View File
@@ -784,6 +784,7 @@ interface = wlp3s0
[module/network] [module/network]
type = internal/network type = internal/network
interface = wlp0s20f3 interface = wlp0s20f3
click-left = nm-connection-editor
; Seconds to sleep between updates ; Seconds to sleep between updates
; Default: 1 ; Default: 1
@@ -803,7 +804,7 @@ interval = 1.0
; Accumulate values from all interfaces ; Accumulate values from all interfaces
; when querying for up/downspeed rate ; when querying for up/downspeed rate
; Default: false ; Default: false
accumulate-stats = true accumulate-stats = false
; Consider an `UNKNOWN` interface state as up. ; Consider an `UNKNOWN` interface state as up.
; Some devices have an unknown state, even when they're running ; Some devices have an unknown state, even when they're running
+4
View File
@@ -13,3 +13,7 @@ function connectToBackupServer() {
function connectToPi() { function connectToPi() {
ssh alex@192.168.0.205 ssh alex@192.168.0.205
} }
function activate() {
source ./venv/bin/activate
}
+18 -7
View File
@@ -218,6 +218,17 @@ Plugin 'fatih/vim-go'
" buffer explorer plugin " buffer explorer plugin
Plugin 'jlanzarotta/bufexplorer' 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 " pretty python code
let python_highlight_all = 1 let python_highlight_all = 1
syntax on syntax on
@@ -263,11 +274,11 @@ map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
"python with virtualenv support "python with virtualenv support
py3 << EOF py3 << EOF
import os #import os
import sys #import sys
if 'VIRTUAL_ENV' in os.environ: #if 'VIRTUAL_ENV' in os.environ:
project_base_dir = os.environ['VIRTUAL_ENV'] # project_base_dir = os.environ['VIRTUAL_ENV']
activate_this = os.path.join(project_base_dir, # activate_this = os.path.join(project_base_dir,
'bin/activate_this.py') # 'bin/activate_this.py')
execfile(activate_this, dict(__file__=activate_this)) # execfile(activate_this, dict(__file__=activate_this))
EOF EOF
+2 -2
View File
@@ -4,11 +4,11 @@
# thumb wheel up => increase volume # thumb wheel up => increase volume
"pamixer -i 2" "pamixer -i 2"
b:7 Mod4 + b:7
# thumb wheel down => lower volume # thumb wheel down => lower volume
"pamixer -d 2" "pamixer -d 2"
b:6 Mod4 + b:6
# set reload page to pressing the mouse wheel # set reload page to pressing the mouse wheel
#"xte 'keydown ctrl' 'keydown r' 'keyup ctrl' 'keyup r'" #"xte 'keydown ctrl' 'keydown r' 'keyup ctrl' 'keyup r'"
Binary file not shown.
+6 -6
View File
@@ -1,14 +1,14 @@
xmonad.hs:300:3: warning: [-Wtabs] xmonad.hs:186:1: warning: [-Wtabs]
Tab character found here, and in 12 further locations. Tab character found here, and in 13 further locations.
Please use spaces instead. 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): In the use of spacing (imported from XMonad.Layout.Spacing):
Deprecated: "Use spacingRaw instead." Deprecated: "Use spacingRaw instead."
| |
412 | addSpace = renamed [CutWordsLeft 2] . spacing gap 416 | addSpace = renamed [CutWordsLeft 2] . spacing gap
| ^^^^^^^ | ^^^^^^^
BIN
View File
Binary file not shown.
+6 -2
View File
@@ -181,6 +181,10 @@ myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
, ((modMask .|. controlMask .|. shiftMask, xK_p), , ((modMask .|. controlMask .|. shiftMask, xK_p),
spawn myScreenshotSelective) spawn myScreenshotSelective)
-- run autorandr to switch configuration
, ((modMask, xK_Print),
spawn "autorandr -c")
-- Toggle current focus window to fullscreen -- Toggle current focus window to fullscreen
, ((modMask, xK_f), sendMessage $ Toggle FULL) , ((modMask, xK_f), sendMessage $ Toggle FULL)
@@ -504,8 +508,8 @@ myManageHook = composeAll
-- --
-- By default, do nothing. -- By default, do nothing.
myStartupHook = do myStartupHook = do
--spawnOnce "nitrogen --restore &" spawnOnce "nitrogen --restore &"
spawnOnce "picom -b --backend glx &" spawnOnce "picom -b &"
spawnOnce "light-locker &" spawnOnce "light-locker &"
-- spawn once not necessary here, since the launch script takes care of multiple instances -- spawn once not necessary here, since the launch script takes care of multiple instances
spawn "~/.config/polybar/launch.sh" spawn "~/.config/polybar/launch.sh"
BIN
View File
Binary file not shown.