summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--XCompose2
-rwxr-xr-xlocal/bin/update-dwm-bar11
-rw-r--r--vimrc30
-rw-r--r--zshrc1
4 files changed, 32 insertions, 12 deletions
diff --git a/XCompose b/XCompose
index 6df91d5..a9f2218 100644
--- a/XCompose
+++ b/XCompose
@@ -77,6 +77,8 @@ include "/usr/share/X11/locale/en_US.UTF-8/Compose"
<Multi_key> <F> <L> <I> <P> : "(╯°□°)╯︵ ┻━┻"
<Multi_key> <p> <u> <t> : "ノ( ゜-゜ノ)"
<Multi_key> <d> <o> <n> <g> : "ヽ༼ຈلຈ༽ノ"
+<Multi_key> <t> <i> <n> <y> : "🤏"
+<Multi_key> <e> <y> <e> <s> : "👀"
# BLACKBOARD BOLD UPPERCASE, 1 0
<Multi_key> <B> <A> : "𝔸"
diff --git a/local/bin/update-dwm-bar b/local/bin/update-dwm-bar
index e9156b1..a9fdf92 100755
--- a/local/bin/update-dwm-bar
+++ b/local/bin/update-dwm-bar
@@ -4,9 +4,6 @@ DELAY=20
sep=$(echo -e '\u2502')
while true; do
- if hash upsc 2>/dev/null; then
- ups="UPS: $(upsc eaton5e@zoidberg battery.charge)% $sep "
- fi
currency=
if [ ! -z "$(ls -A ~/.cache/currency/)" ] ; then
for c in ~/.cache/currency/* ; do
@@ -32,14 +29,8 @@ while true; do
esac
bat_string="$bat_icon $bat $sep "
fi
- thermal_string="🌡"
- for zone in /sys/class/thermal/thermal_zone* ; do
- temp="$(cat $zone/temp)"
- thermal_string="$thermal_string $(($temp / 1000)),"
- done
- thermal_string="${thermal_string%,} °C"
datetime_string=$(date "+%A $sep %d %h %Y $sep %_I:%M %p (UTC%:::z)")
- xsetroot -name " $currency$ups$thermal_string $sep $bat_string$datetime_string" || exit
+ xsetroot -name " $bat_string$datetime_string" || exit
sleep "$DELAY"
done
diff --git a/vimrc b/vimrc
index 01479f9..ebfef5e 100644
--- a/vimrc
+++ b/vimrc
@@ -34,6 +34,7 @@ inoremap jj <ESC>
inoremap jk <ESC>
nnoremap o ox<BS>
nnoremap O Ox<BS>
+set pastetoggle=<F2>
function! ToggleHlsearch()
if &hlsearch
@@ -51,11 +52,13 @@ nnoremap <C-_> :call ToggleHlsearch()<cr>
hi Todo ctermbg=DarkGreen ctermfg=Black
-set expandtab
+"set expandtab
autocmd BufRead,BufNewFile *.cli setfiletype xml
+autocmd BufRead,BufNewFile *.bnf setfiletype bnf
"autocmd FileType c setlocal expandtab
autocmd FileType make set noexpandtab
-autocmd FileType cpp setlocal expandtab
+"autocmd FileType cpp setlocal expandtab
+autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType bitbake setlocal expandtab
autocmd FileType python setlocal expandtab
autocmd FileType haskell setlocal expandtab
@@ -87,3 +90,26 @@ highlight DiffAdd cterm=bold ctermfg=233 ctermbg=101 gui=none guifg=bg guibg
highlight DiffDelete cterm=bold ctermfg=175 ctermbg=175 gui=none guifg=bg guibg=Red
highlight DiffChange cterm=bold ctermfg=234 ctermbg=101 gui=none guifg=bg guibg=Red
highlight DiffText cterm=none ctermfg=242 ctermbg=0 gui=none guifg=bg guibg=Red
+
+let g:previousmode = 'i'
+function PushModeSwitchNormal() abort
+ let g:previousmode = mode()
+ " important: l so that we don't walk backward every time clutch is pushed
+ return "\<C-\>\<C-n>l"
+endfunction
+
+function PopMode() abort
+ return g:previousmode
+endfunction
+
+inoremap <expr> <F11> PushModeSwitchNormal()
+vnoremap <expr> <F11> PushModeSwitchNormal()
+xnoremap <expr> <F11> PushModeSwitchNormal()
+snoremap <expr> <F11> PushModeSwitchNormal()
+onoremap <expr> <F11> PushModeSwitchNormal()
+inoremap <F12> <Nop>
+vnoremap <F12> <Nop>
+xnoremap <F12> <Nop>
+snoremap <F12> <Nop>
+onoremap <F12> <Nop>
+nnoremap <expr> <F12> PopMode()
diff --git a/zshrc b/zshrc
index 472d9b4..f40a661 100644
--- a/zshrc
+++ b/zshrc
@@ -25,6 +25,7 @@ key[Delete]="$terminfo[kdch1]"
# Emacs-like bindings default
bindkey -e
+bindkey "^R" history-incremental-search-backward
# setup key accordingly
[[ -n "$key[Home]" ]] && bindkey -- "$key[Home]" beginning-of-line