More ping sites for network script, vimrc changes, remove .config/setup
This commit is contained in:
parent
b514f3ef29
commit
15aadd2112
@ -76,8 +76,8 @@ exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
|||||||
exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11
|
exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11
|
||||||
|
|
||||||
# pressing super key alone simulates pressing Alt-F1
|
# pressing super key alone simulates pressing Alt-F1
|
||||||
exec --no-startup-id ksuperkey -e 'Super_L=Alt_L|F1' &
|
exec --no-startup-id ksuperkey -e 'Super_L=Alt_L|F1'
|
||||||
exec --no-startup-id ksuperkey -e 'Super_R=Alt_L|F1' &
|
exec --no-startup-id ksuperkey -e 'Super_R=Alt_L|F1'
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
############# Bindings ##################
|
############# Bindings ##################
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
# compton
|
# compton
|
||||||
al-compositor --start &
|
al-compositor --start &
|
||||||
|
|
||||||
#$HOME/.config/setup &
|
|
||||||
|
|
||||||
# enable numlock, commented out for laptop users
|
# enable numlock, commented out for laptop users
|
||||||
# numlockx &
|
# numlockx &
|
||||||
|
|
||||||
@ -32,4 +30,3 @@ xfsettingsd &
|
|||||||
xdg-user-dirs-gtk-update &
|
xdg-user-dirs-gtk-update &
|
||||||
|
|
||||||
$HOME/.config/keypack &
|
$HOME/.config/keypack &
|
||||||
# al-hello
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# this script will setup configs for any user created from /etc/skel
|
|
||||||
# if this is not run immediately at startup, polybar WILL fail to load
|
|
||||||
|
|
||||||
files=(
|
|
||||||
"$HOME/.config/polybar/config"
|
|
||||||
"$HOME/.config/polybar/sessions/i3-sessionfile"
|
|
||||||
"$HOME/.config/polybar/sessions/bspwm-sessionfile"
|
|
||||||
"$HOME/.config/polybar/sessions/openbox-sessionfile"
|
|
||||||
"$HOME/.config/openbox/autostart"
|
|
||||||
"$HOME/.config/gtk-3.0/bookmarks"
|
|
||||||
"$HOME/.mozilla/firefox/archlabs.default/prefs.js"
|
|
||||||
"$HOME/.mozilla/firefox/archlabs.default/sessionstore.js"
|
|
||||||
)
|
|
||||||
|
|
||||||
for f in "${files[@]}"; do
|
|
||||||
sed -i "s/liveuser/${USER}/g" "$f"
|
|
||||||
done
|
|
||||||
|
|
||||||
sed -i '/setup/d' "$HOME/.config/openbox/autostart"
|
|
||||||
rm -f "$HOME/.config/setup"
|
|
22
home/.vimrc
22
home/.vimrc
@ -70,6 +70,12 @@ nnoremap <leader>r :call <SID>ranger()<CR>
|
|||||||
" paste while in insert mode
|
" paste while in insert mode
|
||||||
inoremap <silent><C-v> <Esc>:set paste<CR>a<C-r>+<Esc>:set nopaste<CR>a
|
inoremap <silent><C-v> <Esc>:set paste<CR>a<C-r>+<Esc>:set nopaste<CR>a
|
||||||
|
|
||||||
|
" change windows with ctrl+(hjkl)
|
||||||
|
nnoremap <C-J> <C-W><C-J>
|
||||||
|
nnoremap <C-K> <C-W><C-K>
|
||||||
|
nnoremap <C-L> <C-W><C-L>
|
||||||
|
nnoremap <C-H> <C-W><C-H>
|
||||||
|
|
||||||
" alt defaults
|
" alt defaults
|
||||||
nnoremap 0 ^
|
nnoremap 0 ^
|
||||||
nnoremap Y y$
|
nnoremap Y y$
|
||||||
@ -81,10 +87,12 @@ nnoremap <Tab> ==j
|
|||||||
vnoremap > >gv
|
vnoremap > >gv
|
||||||
vnoremap < <gv
|
vnoremap < <gv
|
||||||
|
|
||||||
" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
|
" j = gj :: k = gk while preserving numbered jumps eg. 12j
|
||||||
nnoremap <buffer><silent><expr>j v:count ? 'j' : 'gj'
|
nnoremap <buffer><silent><expr>j v:count ? 'j' : 'gj'
|
||||||
nnoremap <buffer><silent><expr>k v:count ? 'k' : 'gk'
|
nnoremap <buffer><silent><expr>k v:count ? 'k' : 'gk'
|
||||||
|
|
||||||
|
" open a new tab in the current directory with netrw
|
||||||
|
nnoremap <silent> <Leader>- :tabedit <C-R>=expand("%:p:h")<CR><CR>
|
||||||
|
|
||||||
" ------ autocmd ------
|
" ------ autocmd ------
|
||||||
|
|
||||||
@ -101,6 +109,12 @@ augroup save_cursor_position
|
|||||||
autocmd BufReadPost * call setpos(".", getpos("'\""))
|
autocmd BufReadPost * call setpos(".", getpos("'\""))
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
" enable cursorline in the currently active window
|
||||||
|
augroup cursorline
|
||||||
|
autocmd!
|
||||||
|
autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline
|
||||||
|
autocmd WinLeave * setlocal nocursorline
|
||||||
|
augroup END
|
||||||
|
|
||||||
" ------ adv maps ------
|
" ------ adv maps ------
|
||||||
|
|
||||||
@ -177,25 +191,19 @@ nnoremap <Leader>fw
|
|||||||
" open ranger as a file chooser
|
" open ranger as a file chooser
|
||||||
function! <SID>ranger()
|
function! <SID>ranger()
|
||||||
let l:temp = tempname()
|
let l:temp = tempname()
|
||||||
|
|
||||||
execute 'silent !st -e ranger --choosefiles='.shellescape(l:temp).' $PWD'
|
execute 'silent !st -e ranger --choosefiles='.shellescape(l:temp).' $PWD'
|
||||||
|
|
||||||
if !filereadable(temp)
|
if !filereadable(temp)
|
||||||
redraw!
|
redraw!
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let l:names = readfile(l:temp)
|
let l:names = readfile(l:temp)
|
||||||
if empty(l:names)
|
if empty(l:names)
|
||||||
redraw!
|
redraw!
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
execute 'edit '.fnameescape(l:names[0])
|
execute 'edit '.fnameescape(l:names[0])
|
||||||
|
|
||||||
for l:name in l:names[1:]
|
for l:name in l:names[1:]
|
||||||
execute 'argadd '.fnameescape(l:name)
|
execute 'argadd '.fnameescape(l:name)
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
redraw!
|
redraw!
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -14,4 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
# automatically run startx when logging in on tty1
|
# automatically run startx when logging in on tty1
|
||||||
|
# comment this out if using the above example
|
||||||
|
|
||||||
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx -- vt1 &>/dev/null
|
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx -- vt1 &>/dev/null
|
||||||
|
@ -7,8 +7,12 @@ wireless_connected=""
|
|||||||
ethernet_connected=""
|
ethernet_connected=""
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if ping -c1 archlabslinux.com &>/dev/null || ping -c1 bitbucket.org &>/dev/null || ping -c1 github.com &>/dev/null; then
|
if ! (ping -c 1 archlabslinux.com || ping -c 1 google.com || ping -c 1 bitbucket.org) &>/dev/null; then
|
||||||
|
if ! (ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then
|
||||||
|
echo "$disconnected" ; sleep 0.6
|
||||||
|
echo "$disconnected2" ; sleep 0.6
|
||||||
|
fi
|
||||||
|
else
|
||||||
# avoid checking what type of interface it is every loop
|
# avoid checking what type of interface it is every loop
|
||||||
if (( count < 1 )); then
|
if (( count < 1 )); then
|
||||||
ID="$(ip link | awk '/state UP/ {print $2}')"
|
ID="$(ip link | awk '/state UP/ {print $2}')"
|
||||||
@ -20,9 +24,5 @@ while true; do
|
|||||||
else
|
else
|
||||||
echo "$wireless_connected" ; sleep 20
|
echo "$wireless_connected" ; sleep 20
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
|
||||||
echo "$disconnected" ; sleep 0.6
|
|
||||||
echo "$disconnected2" ; sleep 0.6
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user