From b46a4a75b85b888db3e3a70445f9724460375e6f Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 26 Apr 2020 11:52:38 +0200 Subject: More logical order for xmonad new window --- .pluggins.vim | 2 +- .zsh_aliases | 3 ++- xmonad.hs | 27 +++++++++++++++++---------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.pluggins.vim b/.pluggins.vim index d3f66ea..e57ec19 100644 --- a/.pluggins.vim +++ b/.pluggins.vim @@ -5,6 +5,7 @@ call plug#begin() Plug 'tomtom/tcomment_vim' " mininal commenter Plug 'itchyny/lightline.vim' " minimal status bar Plug 'sheerun/vim-polyglot' " better syntax highlight + Plug 'romainl/vim-cool' " disable highlight after search " s19 at home Plug 'pbondoer/vim-42header' " 42 header @@ -16,6 +17,5 @@ call plug#begin() " intresting but not used " Plug 'unblevable/quick-scope' " highlight first char to jump to word - " Plug 'romainl/vim-cool' " disable highlight after search " Plug 'justinmk/vim-syntax-extra' " better syntax highlight call plug#end() diff --git a/.zsh_aliases b/.zsh_aliases index 2ae7101..fd2ec8b 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -14,6 +14,7 @@ alias v="vim" alias mkdir="mkdir -p" alias gdb="gdb -q" # disable long intro message alias sudo="sudo " # enable color (the search for aliases continues) +alias m="make" # ls alias ll="ls -lFh" @@ -29,7 +30,7 @@ alias t3="tree -L 3" alias treeI="tree -I '__pycache__' -I '*.o' -I vendor" # man -alias m="man" +alias m1="man 1" alias m2="man 2" alias m3="man 3" alias manv="man -P 'vim -M +MANPAGER -'" # vim has man pager diff --git a/xmonad.hs b/xmonad.hs index 5535420..5420664 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -8,6 +8,9 @@ import XMonad.Util.EZConfig(additionalKeysP) -- Layouts import XMonad.Layout.NoBorders +-- Hooks +import XMonad.Hooks.InsertPosition + main = do xmonad $ desktopConfig @@ -19,20 +22,24 @@ main = do , focusedBorderColor = "#bbc5ff" , layoutHook = myLayouts , startupHook = myStartupHook + , manageHook = myManageHook } `additionalKeysP` myKeys -myLayouts = tiledBigMaster ||| Mirror tiledEven ||| noBorders Full +myLayouts = tiledBigMaster -- bigger master for code and smaller slave for compiling + ||| Mirror tiledEven -- 50/50 horizontal split + ||| noBorders Full -- disable borders for fullscreen layout where tiledBigMaster = Tall 1 (3 / 100) (3 / 5) tiledEven = Tall 1 (3 / 100) (1 / 2) - myStartupHook = do - spawnOnce "redshift -c /home/charles/.config/redshift.conf &" - spawnOnce "xinput disable 'ETPS/2 Elantech Touchpad' &" - -myKeys = [ ("", spawn "pulseaudio-ctl up") - , ("", spawn "pulseaudio-ctl down") - , ("", spawn "pulseaudio-ctl mute") - , ("", spawn "xbacklight -inc 5") - , ("", spawn "xbacklight -dec 5") + spawnOnce "redshift -c /home/charles/.config/redshift.conf &" -- start redshift + spawnOnce "xinput disable 'ETPS/2 Elantech Touchpad' &" -- disable touchpad + +myManageHook = insertPosition End Newer -- insert new window at the end of the current layout + +myKeys = [ ("", spawn "pulseaudio-ctl up") -- volume up + , ("", spawn "pulseaudio-ctl down") -- volume down + , ("", spawn "pulseaudio-ctl mute") -- volume mute + , ("", spawn "xbacklight -inc 5") -- backlight up + , ("", spawn "xbacklight -dec 5") -- backlight down ] -- cgit