diff options
author | andreas | 2020-04-14 23:14:12 +0200 |
---|---|---|
committer | andreas | 2020-04-14 23:14:12 +0200 |
commit | e3d33e5af6a7cd961f469be70cb30815cb03f48f (patch) | |
tree | d1edfde7ca76579e3574a3da2c6c37b82c385e65 | |
parent | 9b7fb6f1af34ff9c37dd373f813c2308db0b9cdf (diff) | |
download | dotfiles-e3d33e5af6a7cd961f469be70cb30815cb03f48f.zip dotfiles-e3d33e5af6a7cd961f469be70cb30815cb03f48f.tar.gz |
Add parts from 'openbox/rc.xml'. Some cleanup for vimrc.
-rw-r--r-- | src/openbox/autostart.sh (renamed from src/session-init/openbox-autostart.sh) | 4 | ||||
-rw-r--r-- | src/openbox/environment (renamed from src/session-init/openbox-environment) | 0 | ||||
-rw-r--r-- | src/openbox/rc.parts.xml | 296 | ||||
-rw-r--r-- | src/vi/_gvimrc | 7 | ||||
-rw-r--r-- | src/vi/_vimrc | 18 |
5 files changed, 308 insertions, 17 deletions
diff --git a/src/session-init/openbox-autostart.sh b/src/openbox/autostart.sh index ea406af..5daf214 100644 --- a/src/session-init/openbox-autostart.sh +++ b/src/openbox/autostart.sh @@ -2,11 +2,11 @@ # "~/.config/openbox/autostart.sh" # -source ~/.config/user/startup-gui +source ~/.config/user/setup-gui lxpanel & xscreensaver & -~/.bin/wallpaper-set.sh +~/.bin/wallpaper-set.sh & x-terminal-emulator & diff --git a/src/session-init/openbox-environment b/src/openbox/environment index fded15d..fded15d 100644 --- a/src/session-init/openbox-environment +++ b/src/openbox/environment diff --git a/src/openbox/rc.parts.xml b/src/openbox/rc.parts.xml new file mode 100644 index 0000000..d0d704c --- /dev/null +++ b/src/openbox/rc.parts.xml @@ -0,0 +1,296 @@ +<!-- ********************************************************************** --> +<!-- Parts for "~/.config/openbox/rc.xml". --> +<!-- ********************************************************************** --> + +<!-- General shortcuts --> +<openbox_config> + <keyboard> + <keybind key="A-F2"> + <action name="Execute"> + <command>gmrun</command> + </action> + </keybind> + <keybind key="W-r"> + <action name="Execute"> + <command>gmrun</command> + </action> + </keybind> + <keybind key="W-t"> + <action name="Execute"> + <command>x-terminal-emulator</command> + </action> + </keybind> + <keybind key="W-g"> + <action name="Execute"> + <command>gvim</command> + </action> + </keybind> + <keybind key="W-e"> + <action name="Execute"> + <command>x-file-manager</command> + </action> + </keybind> + <keybind key="C-S-Escape"> + <action name="Execute"> + <command>gnome-system-monitor</command> + </action> + </keybind> + <keybind key="W-c"> + <action name="Execute"> + <command>qalculate</command> + </action> + </keybind> + <keybind key="C-S-F11"> + <action name="ShowMenu"> + <menu>client-list-combined-menu</menu> + </action> + </keybind> + <keybind key="C-S-F12"> + <action name="ShowMenu"> + <menu>root-menu</menu> + </action> + </keybind> + </keyboard> +</openbox_config> + +<!-- openboxTile to tile the active window to different locations --> +<openbox_config> + <keyboard> + <!-- maximize --> + <keybind key="W-Left"> + <action name="MoveResizeTo"> + <monitor>next</monitor> + </action> + </keybind> + <keybind key="W-Right"> + <action name="MoveResizeTo"> + <monitor>prev</monitor> + </action> + </keybind> + <keybind key="W-Up"> + <action name="Maximize"/> + </keybind> + <!-- left half --> + <keybind key="W-KP_4"> + <action name="Unmaximize"/> + <action name="MoveResizeTo"> + <x>0</x> + <width>50%</width> + </action> + <action name="Maximize"> + <direction>Vertical</direction> + </action> + </keybind> + <!-- right half --> + <keybind key="W-KP_6"> + <action name="Unmaximize"/> + <action name="MoveResizeTo"> + <x>-0</x> + <width>50%</width> + </action> + <action name="Maximize"> + <direction>Vertical</direction> + </action> + </keybind> + <!-- top right corner --> + <keybind key="W-KP_9"> + <action name="Unmaximize"/> + <action name="MoveResizeTo"> + <x>-0</x> + <y>0</y> + <height>50%</height> + <width>50%</width> + </action> + </keybind> + <!-- top left corner --> + <keybind key="W-KP_7"> + <action name="Unmaximize"/> + <action name="MoveResizeTo"> + <x>0</x> + <y>0</y> + <height>50%</height> + <width>50%</width> + </action> + </keybind> + <!-- bottom left corner --> + <keybind key="W-KP_1"> + <action name="Unmaximize"/> + <action name="MoveResizeTo"> + <x>0</x> + <y>-0</y> + <height>50%</height> + <width>50%</width> + </action> + </keybind> + <!-- bottom right corner --> + <keybind key="W-KP_3"> + <action name="Unmaximize"/> + <action name="MoveResizeTo"> + <x>-0</x> + <y>-0</y> + <height>50%</height> + <width>50%</width> + </action> + </keybind> + <!-- top half --> + <keybind key="W-KP_8"> + <action name="Unmaximize"/> + <action name="MoveResizeTo"> + <y>0</y> + <height>50%</height> + </action> + <action name="Maximize"> + <direction>Horizontal</direction> + </action> + </keybind> + <!-- bottom half --> + <keybind key="W-KP_2"> + <action name="Unmaximize"/> + <action name="Maximize"> + <direction>horizontal</direction> + </action> + <action name="MoveResizeTo"> + <y>-0</y> + <height>50%</height> + </action> + </keybind> + <!-- center --> + <keybind key="W-KP_5"> + <action name="Unmaximize"/> + <action name="MoveResizeTo"> + <x>20%</x> + <y>8%</y> + <height>80%</height> + <width>60%</width> + </action> + </keybind> + <!-- MaximizeVertical --> + <keybind key="W-KP_0"> + <action name="Unmaximize"/> + <action name="MaximizeVert"/> + </keybind> + <!-- openboxTile end --> + </keyboard> +</openbox_config> + +<!-- MultiMediaKeys --> +<openbox_config> + <keyboard> + <keybind key="XF86MonBrightnessUp"> + <action name="Execute"> + <command>my-brightness.sh +10</command> + </action> + </keybind> + <keybind key="XF86MonBrightnessDown"> + <action name="Execute"> + <command>my-brightness.sh -10</command> + </action> + </keybind> + <keybind key="XF86AudioRaiseVolume"> + <action name="Execute"> + <command>amixer set Master 5%+</command> + </action> + </keybind> + <keybind key="XF86AudioLowerVolume"> + <action name="Execute"> + <command>amixer set Master 5%-</command> + </action> + </keybind> + <keybind key="XF86AudioMute"> + <action name="Execute"> + <command>amixer set Master toggle</command> + </action> + </keybind> + </keyboard> +</openbox_config> + +<!-- Stop that ugly desktop switching by Alt+Mouse --> +<!-- In other words: Comment out those six bindings. --> +<openbox_config> + <mouse> + <context name="Frame"> + <!-- <mousebind button="A-Up" action="Click"> --> + <!-- <action name="GoToDesktop"> --> + <!-- <to>previous</to> --> + <!-- </action> --> + <!-- </mousebind> --> + <!-- <mousebind button="A-Down" action="Click"> --> + <!-- <action name="GoToDesktop"> --> + <!-- <to>next</to> --> + <!-- </action> --> + <!-- </mousebind> --> + <!-- <mousebind button="C-A-Up" action="Click"> --> + <!-- <action name="GoToDesktop"> --> + <!-- <to>previous</to> --> + <!-- </action> --> + <!-- </mousebind> --> + <!-- <mousebind button="C-A-Down" action="Click"> --> + <!-- <action name="GoToDesktop"> --> + <!-- <to>next</to> --> + <!-- </action> --> + <!-- </mousebind> --> + <!-- <mousebind button="A-S-Up" action="Click"> --> + <!-- <action name="SendToDesktop"> --> + <!-- <to>previous</to> --> + <!-- </action> --> + <!-- </mousebind> --> + <!-- <mousebind button="A-S-Down" action="Click"> --> + <!-- <action name="SendToDesktop"> --> + <!-- <to>next</to> --> + <!-- </action> --> + <!-- </mousebind> --> + </context> + </mouse> +</openbox_config> + +<!-- Stop confusing mouse behavior for window/desktop management. --> +<!-- Comment out (or remove) those six handlers. --> +<openbox_config> + <mouse> + <context name="Titlebar"> + <!-- <mousebind button="Up" action="Click"> --> + <!-- <action name="if"> --> + <!-- <shaded>no</shaded> --> + <!-- <then> --> + <!-- <action name="Shade"/> --> + <!-- <action name="FocusToBottom"/> --> + <!-- <action name="Unfocus"/> --> + <!-- <action name="Lower"/> --> + <!-- </then> --> + <!-- </action> --> + <!-- </mousebind> --> + <!-- <mousebind button="Down" action="Click"> --> + <!-- <action name="if"> --> + <!-- <shaded>yes</shaded> --> + <!-- <then> --> + <!-- <action name="Unshade"/> --> + <!-- <action name="Raise"/> --> + <!-- </then> --> + <!-- </action> --> + <!-- </mousebind> --> + </context> + <context name="Desktop"> + <!-- <mousebind button="A-Up" action="Click"> --> + <!-- <action name="GoToDesktop"> --> + <!-- <to>previous</to> --> + <!-- </action> --> + <!-- </mousebind> --> + <!-- <mousebind button="A-Down" action="Click"> --> + <!-- <action name="GoToDesktop"> --> + <!-- <to>next</to> --> + <!-- </action> --> + <!-- </mousebind> --> + <!-- <mousebind button="C-A-Up" action="Click"> --> + <!-- <action name="GoToDesktop"> --> + <!-- <to>previous</to> --> + <!-- </action> --> + <!-- </mousebind> --> + <!-- <mousebind button="C-A-Down" action="Click"> --> + <!-- <action name="GoToDesktop"> --> + <!-- <to>next</to> --> + <!-- </action> --> + <!-- </mousebind> --> + </context> + </mouse> +</openbox_config> + diff --git a/src/vi/_gvimrc b/src/vi/_gvimrc index 77d17c7..eb1b62f 100644 --- a/src/vi/_gvimrc +++ b/src/vi/_gvimrc @@ -2,8 +2,8 @@ set lines=35 columns=100 if has("win32") - set guifont=DejaVu_Sans_Mono:h11:cANSI -" set guifont=Consolas:h11:cANSI + "set guifont=DejaVu_Sans_Mono:h11:cANSI + set guifont=Consolas:h11:cANSI else set guifont=Monospace\ 12 endif @@ -12,8 +12,9 @@ set guioptions-=m " remove Menu bar set guioptions-=T " remove toolbar set guioptions-=L " remove left scrollbar set guioptions-=r "remove right scrollbar -set mouse=n +" This is vim! So please stop using that stupid mouse! +set mouse=n nnoremap <LeftMouse> m'<LeftMouse> nnoremap <LeftRelease> <LeftRelease>g`` diff --git a/src/vi/_vimrc b/src/vi/_vimrc index 213c6c5..29422ed 100644 --- a/src/vi/_vimrc +++ b/src/vi/_vimrc @@ -83,7 +83,6 @@ colorscheme koehler set nocursorline set number set hidden " allows to switch away from unsaved buffer -"set relativenumber set linebreak set hlsearch set showcmd @@ -144,21 +143,16 @@ map <c-h> <c-w>h map <c-l> <c-w>l " closeBuffer -nmap <F4> :bp<CR>:bd#<CR> -imap <F4> <Esc>:bp<CR>:bd#<CR> -vmap <F4> <Esc>:bp<CR>:bd#<CR> +nnoremap <F4> :bp<CR>:bd#<CR> " change cwd to current file -map cdc :cd %:p:h<CR>:pwd<CR> +nnoremap cdc :cd %:p:h<CR>:pwd<CR> " Not searchNext. Do only highlight word under cursor. nmap * *N -" Execute previous one now -:cd %:p:h - -" save with ctrl-s -nmap <C-s> :up<CR> +" save with ctrl-s (useless if term emu catches keymapping) +nnoremap <C-s> :up<CR> " commenting autocmd FileType c,cpp,java,php,javascript,html let b:comment_leader = '//' @@ -198,7 +192,6 @@ if has("win32") else - "map <F5> a<C-R>=strftime('%s')<CR><Esc> " Insert hash inoremap <F5> <C-R>=system("date\|md5sum\|awk '{printf \"%s\",$1}'")<CR> " insert current TS @@ -207,7 +200,7 @@ else command OsTerminal !x-terminal-emulator & command OsFileExplorer !x-file-manager `pwd` & - command OsIceweasel !iceweasel `pwd` & + command OsFirefox !firefox `pwd` & command OsChromium !chromium `pwd` & endif @@ -217,6 +210,7 @@ endif autocmd FileType html setlocal shiftwidth=2 tabstop=2 autocmd FileType xml setlocal shiftwidth=2 tabstop=2 +autocmd FileType Makefile setl noexpandtab " typescript autocmd BufNewFile,BufRead *.ts setlocal ft=javascript |