Update user home config files

This commit is contained in:
natemaia 2018-08-18 13:16:42 -07:00
parent fee0d19036
commit bc77924804
8 changed files with 176 additions and 233 deletions

View File

@ -4,21 +4,21 @@
*.cursorColor: #707880 *.cursorColor: #707880
*.color0: #1c2023 *.color0: #1c2023
*.color1: #a54242 *.color1: #bf616a
*.color2: #8c9440 *.color2: #a3be8c
*.color3: #de935f *.color3: #ebcb8b
*.color4: #5f819d *.color4: #8fa1b3
*.color5: #85678f *.color5: #b48ead
*.color6: #5e8d87 *.color6: #96b5b4
*.color7: #E1E1E1 *.color7: #E1E1E1
*.color8: #1c2023 *.color8: #1c2023
*.color9: #cc6666 *.color9: #bf616a
*.color10: #b5bd68 *.color10: #a3be8c
*.color11: #f0c674 *.color11: #ebcb8b
*.color12: #81a2be *.color12: #8fa1b3
*.color13: #b294bb *.color13: #b48ead
*.color14: #8abeb7 *.color14: #96b5b4
*.color15: #c5c8c6 *.color15: #c0c5ce
! Rofi ! Rofi
rofi.font: DejaVu Sans Mono 12 rofi.font: DejaVu Sans Mono 12
@ -33,13 +33,13 @@ rofi.color-urgent: argb:00000000, #f43753, argb:00000000, argb:00000000, #e29a49
rofi.color-active: argb:00000000, #49bbfb, argb:00000000, argb:00000000, #e29a49 rofi.color-active: argb:00000000, #49bbfb, argb:00000000, argb:00000000, #e29a49
! xterm ! xterm
xterm*termName: xterm-256color
xterm*font: DejaVu Sans Mono xterm*font: DejaVu Sans Mono
xterm*faceName: DejaVu Sans Mono:size=11:antialias=false xterm*faceName: DejaVu Sans Mono:size=11
xterm*loginShell: true xterm*loginShell: true
xterm*vt100*geometry: 90x34 xterm*vt100*geometry: 90x34
xterm*saveLines: 2000 xterm*saveLines: 2000
xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48 xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
xterm*termName: xterm-256color
xterm*eightBitInput: false xterm*eightBitInput: false
! URxvt ! URxvt
@ -62,7 +62,7 @@ URxvt.keysym.m-v: perl:clipboard:paste
URxvt.urlLauncher: exo-open URxvt.urlLauncher: exo-open
URxvt.underlineURLs: true URxvt.underlineURLs: true
URxvt.urlButton: 1 URxvt.urlButton: 1
URxvt.geometry: 90x30 URxvt.geometry: 90x34
URxvt.tabbed.tabbar-fg: 4 URxvt.tabbed.tabbar-fg: 4
URxvt.tabbed.tabbar-bg: 16 URxvt.tabbed.tabbar-bg: 16
URxvt.tabbed.tab-fg: 15 URxvt.tabbed.tab-fg: 15
@ -72,9 +72,9 @@ URxvt*buffered: false
! UXTerm ! UXTerm
UXTerm*termName: xterm-256color UXTerm*termName: xterm-256color
UXTerm*cursorColor: white UXTerm*cursorColor: white
UXTerm*VT100.geometry: 90x30 UXTerm*VT100.geometry: 90x34
UXTerm*font: DejaVu Sans Mono UXTerm*font: DejaVu Sans Mono
UXTerm*faceSize: 10 UXTerm*faceSize: 11
UXTerm*dynamicColors: true UXTerm*dynamicColors: true
UXTerm*utf8: 2 UXTerm*utf8: 2
UXTerm*eightBitInput: true UXTerm*eightBitInput: true

View File

@ -12,9 +12,6 @@ nitrogen --restore &
# launch compton # launch compton
al-compositor --start & al-compositor --start &
# panel
al-polybar-session &
# xfce settings # xfce settings
xfsettingsd & xfsettingsd &
@ -28,6 +25,9 @@ gnome-keyring-daemon --start --components=pkcs11 &
ksuperkey -e 'Super_L=Alt_L|F1' & ksuperkey -e 'Super_L=Alt_L|F1' &
ksuperkey -e 'Super_R=Alt_L|F1' & ksuperkey -e 'Super_R=Alt_L|F1' &
# panel
al-polybar-session &
# Set some bsp specific stuff # Set some bsp specific stuff
bspc monitor -d I II III IV V VI VII VIII IX X bspc monitor -d I II III IV V VI VII VIII IX X

View File

@ -28,7 +28,7 @@ gaps inner 15
gaps outer 5 gaps outer 5
# font # font
font pango:DejaVu Sans Mono 10 font pango:DejaVu Sans Mono 11
# $Mod = Super or Alt? # $Mod = Super or Alt?
set $Mod Mod4 set $Mod Mod4

View File

@ -17,17 +17,17 @@ ksuperkey -e 'Super_R=Alt_L|F1' &
# restore wallpaper # restore wallpaper
nitrogen --restore & nitrogen --restore &
# start panel # run the ob-autostart GUI configured commands
al-polybar-session &
# openbox autostart
ob-autostart -d & ob-autostart -d &
# Required for xfce settings to work # required for xfce settings to work
xfsettingsd & xfsettingsd &
# Side panel shortcuts for file managers # side panel shortcuts for file managers
xdg-user-dirs-gtk-update & xdg-user-dirs-gtk-update &
# start the panel
al-polybar-session &
# start conky # start conky
sleep 1; al-conky-session --autostart & sleep 1; al-conky-session --autostart &

View File

@ -159,7 +159,6 @@
</finalactions> </finalactions>
</action> </action>
</keybind> </keybind>
<!-- Window Tiling: Snap feature -->
<keybind key="W-Left"> <keybind key="W-Left">
<action name="UnmaximizeFull"/> <action name="UnmaximizeFull"/>
<action name="MaximizeVert"/> <action name="MaximizeVert"/>
@ -176,135 +175,6 @@
</action> </action>
<action name="MoveToEdgeEast"/> <action name="MoveToEdgeEast"/>
</keybind> </keybind>
<keybind key="A-F">
<action name="MaximizeFull"/>
</keybind>
<keybind key="A-S-F">
<action name="UnmaximizeFull"/>
</keybind>
<keybind key="A-S-k">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>-15</x>
<y>15</y>
<height>96%</height>
<width>47%</width>
</action>
</keybind>
<keybind key="A-S-j">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>15</x>
<y>15</y>
<height>96%</height>
<width>47%</width>
</action>
</keybind>
<!-- Top right-->
<keybind key="W-k">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>-15</x>
<y>15</y>
</action>
</keybind>
<!-- Top left-->
<keybind key="W-h">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>15</x>
<y>15</y>
</action>
</keybind>
<!-- Bottom left-->
<keybind key="W-j">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>15</x>
<y>-15</y>
</action>
</keybind>
<!-- Bottom right-->
<keybind key="W-l">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>-15</x>
<y>-15</y>
</action>
</keybind>
<keybind key="A-z">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>15</x>
<y>15</y>
<height>97%</height>
<width>32%</width>
</action>
</keybind>
<keybind key="A-x">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>34%</x>
<y>15</y>
<height>97%</height>
<width>32%</width>
</action>
</keybind>
<keybind key="A-c">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>-17</x>
<y>15</y>
<height>97%</height>
<width>32%</width>
</action>
</keybind>
<!-- Move -->
<keybind key="W-Right">
<action name="MoveRelative">
<x>20</x>
<y>0</y>
</action>
</keybind>
<keybind key="W-Left">
<action name="MoveRelative">
<x>-20</x>
<y>0</y>
</action>
</keybind>
<keybind key="W-Up">
<action name="MoveRelative">
<x>0</x>
<y>-20</y>
</action>
</keybind>
<keybind key="W-Down">
<action name="MoveRelative">
<x>0</x>
<y>20</y>
</action>
</keybind>
<!-- Resize -->
<keybind key="W-S-Right">
<action name="ResizeRelative">
<right>20</right>
</action>
</keybind>
<keybind key="W-S-Left">
<action name="ResizeRelative">
<right>-20</right>
</action>
</keybind>
<keybind key="W-S-Down">
<action name="ResizeRelative">
<bottom>20</bottom>
</action>
</keybind>
<keybind key="W-S-Up">
<action name="ResizeRelative">
<bottom>-20</bottom>
</action>
</keybind>
<keybind key="S-W-Left"> <keybind key="S-W-Left">
<action name="SendToDesktopLeft"/> <action name="SendToDesktopLeft"/>
</keybind> </keybind>
@ -387,7 +257,7 @@
<command>exo-open --launch TerminalEmulator</command> <command>exo-open --launch TerminalEmulator</command>
</action> </action>
</keybind> </keybind>
<keybind key="W-Enter"> <keybind key="W-Return">
<action name="Execute"> <action name="Execute">
<command>exo-open --launch TerminalEmulator</command> <command>exo-open --launch TerminalEmulator</command>
</action> </action>
@ -448,7 +318,7 @@
<keybind key="C-S-BackSpace"> <keybind key="C-S-BackSpace">
<action name="Restart"/> <action name="Restart"/>
</keybind> </keybind>
<keybind key="C-S-Enter"> <keybind key="C-S-Return">
<action name="Reconfigure"/> <action name="Reconfigure"/>
</keybind> </keybind>
<keybind key="W-Escape"> <keybind key="W-Escape">
@ -480,7 +350,7 @@
<keybind key="A-m"> <keybind key="A-m">
<action name="Move"/> <action name="Move"/>
</keybind> </keybind>
<keybind key="S-W-q"> <keybind key="W-q">
<action name="Close"/> <action name="Close"/>
</keybind> </keybind>
<keybind key="W-space"> <keybind key="W-space">
@ -653,7 +523,6 @@
<maximizedvertical>yes</maximizedvertical> <maximizedvertical>yes</maximizedvertical>
<then> <then>
<action name="Unmaximize"/> <action name="Unmaximize"/>
<direction>vertical</direction>
<action name="MoveResizeTo"> <action name="MoveResizeTo">
<x>center</x> <x>center</x>
<y>current</y> <y>current</y>

View File

@ -5,6 +5,8 @@ runtime! archlinux.vim
" additional settings " additional settings
set modeline " enable vim modelines set modeline " enable vim modelines
set hlsearch " highlight search items
set incsearch " searches are performed as you type
set clipboard^=unnamedplus " system clipboard (requires +clipboard) set clipboard^=unnamedplus " system clipboard (requires +clipboard)
set number " enable line numbers set number " enable line numbers
set confirm " ask confirmation for some things, like save before quit, etc. set confirm " ask confirmation for some things, like save before quit, etc.
@ -36,15 +38,11 @@ endif
syntax enable syntax enable
if has('termguicolors') && $DISPLAY !=? '' && &t_Co == 256 if has('termguicolors') && $DISPLAY !=? '' && &t_Co == 256
let g:jinx_colors = 'night' " night or day (shift-t to change on the fly) set termguicolors " true colors in the terminal
try try
" true colors in the terminal let g:jinx_colors = 'night' " night or day, 'T' to change on the fly
set termguicolors
colorscheme jinx colorscheme jinx
catch catch
set nocursorline
set notermguicolors
colorscheme evening colorscheme evening
endtry endtry
@ -54,8 +52,6 @@ if has('termguicolors') && $DISPLAY !=? '' && &t_Co == 256
let &term = 'xterm-256color' let &term = 'xterm-256color'
endif endif
else else
set nocursorline
set notermguicolors
try try
colorscheme jinx colorscheme jinx
catch catch
@ -63,7 +59,7 @@ else
endtry endtry
endif endif
" change cursor shape for different editing modes (nvim does this by default) " change cursor shape for different editing modes, neovim does this by default
if !has('nvim') if !has('nvim')
if exists('$TMUX') if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\e[5 q\<Esc>\\" let &t_SI = "\<Esc>Ptmux;\<Esc>\e[5 q\<Esc>\\"
@ -76,20 +72,31 @@ if !has('nvim')
endif endif
endif endif
set linebreak set linebreak " wrap lines at full words rather than the last character to fit
set breakindent set breakindent " wrapped lines match the same indent level
set list listchars=tab:>>,trail:~
if has('multi_byte') set list listchars=tab:>>,trail:~
if has('multi_byte') && $DISPLAY !=? ''
set listchars=tab:»»,trail:• set listchars=tab:»»,trail:•
set fillchars=vert:┃ showbreak= set fillchars=vert:┃ showbreak=
endif endif
" ------ commands ------
command! D Explore
command! R call <SID>ranger()
command! Q call <SID>quitbuffer()
command! -nargs=1 B :call <SID>bufferselect("<args>")
command! W execute 'silent w !sudo tee % >/dev/null' | edit!
" ------ basic maps ------ " ------ basic maps ------
" open ranger as a file chooser using the function below " open ranger as a file chooser using the function below
nnoremap <leader>r :call <SID>ranger()<CR> nnoremap <leader>r :call <SID>ranger()<CR>
" match string to switch buffer
nnoremap <Leader>b :let b:buf = input('Match: ')<Bar>call <SID>bufferselect(b:buf)<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
@ -114,16 +121,42 @@ vnoremap < <gv
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 terminal in $PWD
nnoremap <silent> <Leader>tt :terminal<CR>
" tab control
nnoremap <silent> <M-j> :tabmove -1<CR>
nnoremap <silent> <M-k> :tabmove +1<CR>
nnoremap <silent> <Leader>te :tabnew<CR>
nnoremap <silent> <Leader>tn :tabnext<CR>
nnoremap <silent> <Leader>tf :tabfirst<CR>
nnoremap <silent> <Leader>tp :tabprevious<CR>
" close current buffer and/or tab
nnoremap <silent> <Leader>q :B<CR>:silent tabclose<CR>gT
nnoremap <silent> <Leader>tl :execute "tabn ".g:lasttab<CR>
" open a new tab in the current directory with netrw " open a new tab in the current directory with netrw
nnoremap <silent> <Leader>- :tabedit <C-R>=expand("%:p:h")<CR><CR> nnoremap <silent> <Leader>- :tabedit <C-R>=expand("%:p:h")<CR><CR>
" split the window vertically and horizontally
nnoremap _ <C-W>s<C-W><Down>
nnoremap <Bar> <C-W>v<C-W><Right>
" ------ autocmd ------ " ------ autocmd ------
let g:lasttab = 1
augroup save_last_tab
autocmd!
autocmd TabLeave * let g:lasttab = tabpagenr()
augroup END
" Reload changes if file changed outside of vim requires autoread " Reload changes if file changed outside of vim requires autoread
augroup load_changed_file augroup load_changed_file
autocmd! autocmd!
autocmd FocusGained,BufEnter * if mode() !=? 'c' | checktime | endif autocmd FocusGained,BufEnter * if mode() !=? 'c' | checktime | endif
autocmd FileChangedShellPost * echo "Changes loaded from file" autocmd FileChangedShellPost * echo "Changes loaded from source file"
augroup END augroup END
" when quitting a file, save the cursor position " when quitting a file, save the cursor position
@ -132,33 +165,38 @@ 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 " when not running in a console or a terminal that doesn't support 256 colors
" enable cursorline in the currently active window and disable it in inactive ones
if $DISPLAY !=? '' && &t_Co == 256
augroup cursorline augroup cursorline
autocmd! autocmd!
autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline
autocmd WinLeave * setlocal nocursorline autocmd WinLeave * setlocal nocursorline
augroup END augroup END
endif
" ------ adv maps ------ " ------ adv maps ------
" toggle line numbers " toggle line numbers, nn (no number)
nnoremap <silent> <Leader>nn nnoremap <silent> <Leader>nn
\ :if &number <Bar> \ :if &number <Bar>
\ set nonumber \ set nonumber
\ <Bar> echo 'Line numbers disabled'
\ <Bar> else <Bar> \ <Bar> else <Bar>
\ set number \ set number
\ <Bar> echo 'Line numbers enabled'
\ <Bar> endif<CR> \ <Bar> endif<CR>
" strip trailing whitespace " strip trailing whitespace, ss (strip space)
nnoremap <silent> <Leader>ss nnoremap <silent> <Leader>ss
\ :let _p = getpos(".") <Bar> \ :let b:_p = getpos(".") <Bar>
\ let _s = (@/ != '') ? @/ : '' <Bar> \ let b:_s = (@/ != '') ? @/ : '' <Bar>
\ %s/\s\+$//e <Bar> \ %s/\s\+$//e <Bar>
\ let @/ = _s <Bar> \ let @/ = b:_s <Bar>
\ nohlsearch <Bar> \ nohlsearch <Bar>
\ unlet _s <Bar> \ unlet b:_s <Bar>
\ call setpos('.', _p) <Bar> \ call setpos('.', b:_p) <Bar>
\ unlet _p <CR> \ unlet b:_p <CR>
" global replace " global replace
vnoremap <Leader>sw "hy vnoremap <Leader>sw "hy
@ -190,17 +228,20 @@ nnoremap <Leader>cw
\ unlet b:sub <Bar> \ unlet b:sub <Bar>
\ endif <CR> \ endif <CR>
" highlight long lines " highlight long lines, ll (long lines)
let w:longlines = matchadd('ColorColumn', '\%'.&tw.'v', &tw) let w:longlines = matchadd('ColorColumn', '\%'.&textwidth.'v', &textwidth)
nnoremap <silent> <Leader>ll nnoremap <silent> <Leader>ll
\ :if exists('w:longlines') <Bar> \ :if exists('w:longlines') <Bar>
\ silent! call matchdelete(w:longlines) <Bar> \ silent! call matchdelete(w:longlines) <Bar>
\ unlet w:longlines <Bar> \ echo 'Long line highlighting disabled'
\ <Bar> unlet w:longlines <Bar>
\ elseif &textwidth > 0 <Bar> \ elseif &textwidth > 0 <Bar>
\ let w:longlines = matchadd('ColorColumn', '\%'.&textwidth.'v', &textwidth) <Bar> \ let w:longlines = matchadd('ColorColumn', '\%'.&textwidth.'v', &textwidth) <Bar>
\ else <Bar> \ echo 'Long line highlighting enabled'
\ let w:longlines = matchadd('ColorColumn', '\%80v', 80) <Bar> \ <Bar> else <Bar>
\ endif <CR> \ let w:longlines = matchadd('ColorColumn', '\%80v', 81) <Bar>
\ echo 'Long line highlighting enabled'
\ <Bar> endif <CR>
" local keyword jump " local keyword jump
nnoremap <Leader>fw nnoremap <Leader>fw
@ -211,10 +252,62 @@ nnoremap <Leader>fw
\ endif <CR> \ endif <CR>
" quit the current buffer and switch to the next
" without this vim will leave you on an empty buffer after quiting the current
function! <SID>quitbuffer() abort
let l:bf = bufnr('%')
let l:pb = bufnr('#')
if buflisted(l:pb)
buffer #
else
bnext
endif
if bufnr('%') == l:bf
new
endif
if buflisted(l:bf)
execute('bdelete! ' . l:bf)
endif
endfunction
" switch active buffer based on pattern matching
" if more than one match is found then list the matches to choose from
function! <SID>bufferselect(pattern) abort
let l:bufcount = bufnr('$')
let l:currbufnr = 1
let l:nummatches = 0
let l:matchingbufnr = 0
" walk the buffer count
while l:currbufnr <= l:bufcount
if (bufexists(l:currbufnr))
let l:currbufname = bufname(l:currbufnr)
if (match(l:currbufname, a:pattern) > -1)
echo l:currbufnr.': '.bufname(l:currbufnr)
let l:nummatches += 1
let l:matchingbufnr = l:currbufnr
endif
endif
let l:currbufnr += 1
endwhile
" only one match
if (l:nummatches == 1)
execute ':buffer '.l:matchingbufnr
elseif (l:nummatches > 1)
" more than one match
let l:desiredbufnr = input('Enter buffer number: ')
if (strlen(l:desiredbufnr) != 0)
execute ':buffer '.l:desiredbufnr
endif
else
echoerr 'No matching buffers'
endif
endfunction
" 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 !xterm -e ranger --choosefiles='.shellescape(l:temp).' $PWD'
if !filereadable(temp) if !filereadable(temp)
redraw! redraw!
return return

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
NAME=$(basename "$0") NAME=$(basename "$0")
VER="0.3" VER="0.4"
usage() { usage() {
cat <<- EOF cat <<- EOF
@ -33,14 +33,8 @@ EOF
for arg in "$@"; do for arg in "$@"; do
case $arg in case $arg in
-h|--help) -h|--help) usage; exit 0 ;;
usage -v|--version) echo -e "$NAME -- Version $VER"; exit 0 ;;
exit 0
;;
-v|--version)
echo -e "$NAME -- Version $VER"
exit 0
;;
-r|--run) -r|--run)
rofi -modi run,drun -show drun -line-padding 4 \ rofi -modi run,drun -show drun -line-padding 4 \
-columns 2 -padding 50 -hide-scrollbar \ -columns 2 -padding 50 -hide-scrollbar \
@ -50,26 +44,24 @@ for arg in "$@"; do
rofi -modi window -show window -hide-scrollbar -padding 50 -line-padding 4 rofi -modi window -show window -hide-scrollbar -padding 50 -line-padding 4
;; ;;
-q|--qalculate) -q|--qalculate)
! hash qalc &>/dev/null && { echo "Requires 'libqalculate' installed"; exit 1; } hash qalc &>/dev/null || { echo "Requires 'libqalculate' installed"; exit 1; }
rofi -modi "calc:qalc +u8 -nocurrencies" -padding 50 \ rofi -modi "calc:qalc +u8 -nocurrencies" -padding 50 \
-show "calc:qalc +u8 -nocurrencies" -line-padding 4 \ -show "calc:qalc +u8 -nocurrencies" -line-padding 4 \
-hide-scrollbar -hide-scrollbar
;; ;;
-c|--clipboard) -c|--clipboard)
! hash greenclip &>/dev/null && { echo "Requires 'greenclip' installed"; exit 1; } hash greenclip &>/dev/null || { echo "Requires 'greenclip' installed"; exit 1; }
rofi -modi "clipboard:greenclip print" -padding 50 \ rofi -modi "clipboard:greenclip print" -padding 50 \
-line-padding 4 -show "clipboard:greenclip print" \ -line-padding 4 -show "clipboard:greenclip print" \
-hide-scrollbar -hide-scrollbar
;; ;;
-b|--browser) -b|--browser)
! hash surfraw &>/dev/null && { echo "Requires 'surfraw' installed"; exit 1; } hash surfraw &>/dev/null || { echo "Requires 'surfraw' installed"; exit 1; }
surfraw -browser="$BROWSER" $(sr -elvi | surfraw -browser="$BROWSER" $(sr -elvi | awk -F'-' '{print $1}' |
awk -F'-' '{print $1}' | sed '/:/d' | awk '{$1=$1};1' |
sed '/:/d' |
awk '{$1=$1};1' |
rofi -hide-scrollbar -kb-row-select 'Tab' \ rofi -hide-scrollbar -kb-row-select 'Tab' \
-kb-row-tab 'Control+space' -dmenu \ -kb-row-tab 'Control+space' -dmenu \
-mesg 'Tab for Autocomplete' -i -p 'Web Search' \ -mesg 'Tab for Autocomplete' -i -p 'Web Search' \

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
NAME=$(basename "$0") NAME=$(basename "$0")
VER="0.3" VER="0.4"
usage() { usage() {
cat <<- EOF cat <<- EOF
@ -37,9 +37,8 @@ toggle_polybar() {
fi fi
} }
toggle_compton() { toggle_compton() {
if (( $opt == 1 )); then if (( opt == 1 )); then
if [[ $(pidof compton) ]]; then if [[ $(pidof compton) ]]; then
al-compositor --stop al-compositor --stop
else else
@ -59,9 +58,8 @@ toggle_compton() {
done done
} }
toggle_redshift() { toggle_redshift() {
if (( $opt == 1 )); then if (( opt == 1 )); then
if [[ $(pidof redshift) ]]; then if [[ $(pidof redshift) ]]; then
pkill redshift pkill redshift
else else
@ -87,7 +85,6 @@ toggle_redshift() {
done done
} }
toggle_caffeine() { toggle_caffeine() {
if (( $opt == 1 )); then if (( $opt == 1 )); then
if [[ $(pidof caffeine) ]]; then if [[ $(pidof caffeine) ]]; then
@ -109,18 +106,11 @@ toggle_caffeine() {
done done
} }
# Catch command line options # Catch command line options
case $1 in case $1 in
-h|--help) -h|--help) usage ;;
usage -v|--version) echo -e "$NAME -- Version $VER" ;;
;; -p|--polybar) toggle_polybar ;;
-v|--version)
echo -e "$NAME -- Version $VER"
;;
-p|--polybar)
toggle_polybar
;;
-c|--compton) -c|--compton)
[[ $2 =~ (-t|--toggle) ]] && opt=1 [[ $2 =~ (-t|--toggle) ]] && opt=1
toggle_compton toggle_compton
@ -133,8 +123,7 @@ case $1 in
[[ $2 =~ (-t|--toggle) ]] && opt=1 [[ $2 =~ (-t|--toggle) ]] && opt=1
toggle_caffeine toggle_caffeine
;; ;;
*) *) echo -e "Option does not exist: $1" && usage && exit 1
echo -e "Option does not exist: $1" && usage && exit 1
esac esac
exit 0 exit 0