Merge branch 'master' into dmenuumount
This commit is contained in:
commit
a37aba2078
28 changed files with 162 additions and 198 deletions
2
.bmfiles
2
.bmfiles
|
@ -2,7 +2,7 @@ bf ~/.bmfiles
|
||||||
bd ~/.bmdirs
|
bd ~/.bmdirs
|
||||||
cfb ~/.bashrc
|
cfb ~/.bashrc
|
||||||
cfz ~/.zshrc
|
cfz ~/.zshrc
|
||||||
cfv ~/.vimrc
|
cfv ~/.config/nvim/init.vim
|
||||||
cfr ~/.config/ranger/rc.conf
|
cfr ~/.config/ranger/rc.conf
|
||||||
cfi ~/.config/i3/config
|
cfi ~/.config/i3/config
|
||||||
cfq ~/.config/qutebrowser/config.py
|
cfq ~/.config/qutebrowser/config.py
|
||||||
|
|
|
@ -15,7 +15,7 @@ This is a partial key list.
|
||||||
q kill win kill win
|
q kill win kill win
|
||||||
w browser browser
|
w browser browser
|
||||||
e neomutt tutorials
|
e neomutt tutorials
|
||||||
r ranger sudo ranger
|
r ranger winresize
|
||||||
t toggle hor/vert gaps=15px
|
t toggle hor/vert gaps=15px
|
||||||
y calcurse resize left
|
y calcurse resize left
|
||||||
u dropdown term resize down
|
u dropdown term resize down
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
esc left workspace exit i3
|
|
||||||
tab last workspace
|
|
||||||
- - vol -- vol
|
|
||||||
_ - vol -- vol
|
|
||||||
= + vol ++ vol
|
|
||||||
+ + vol ++ vol
|
|
||||||
q kill win kill win
|
|
||||||
w browser browser
|
|
||||||
e neomutt tutorials
|
|
||||||
r ranger sudo ranger
|
|
||||||
t toggle hor/vert gaps=15px
|
|
||||||
y calcurse resize left
|
|
||||||
u dropdown term resize down
|
|
||||||
i htop resize up
|
|
||||||
o sticky win resize right
|
|
||||||
p pause music
|
|
||||||
[ back 10 secs back 2 min
|
|
||||||
] forward 10 secs forward 2 min
|
|
||||||
\ last workspace
|
|
||||||
a calculator audio control
|
|
||||||
s + inner gaps - inner gaps
|
|
||||||
d dmenu remove gaps
|
|
||||||
f fullscreen freeze mode
|
|
||||||
g left workspace GIMP
|
|
||||||
h focus left move win left
|
|
||||||
j focus down move win down
|
|
||||||
k focus up move win up
|
|
||||||
l focus right move win right
|
|
||||||
; right workspace
|
|
||||||
' fast right win
|
|
||||||
z + outer gaps - outer gaps
|
|
||||||
x lock screen shutdown
|
|
||||||
c webcam
|
|
||||||
v visualizer projectm
|
|
||||||
b bar on/off stick/float win
|
|
||||||
n newsboat
|
|
||||||
m ncmpcpp mute audio
|
|
||||||
, previous song restart song
|
|
||||||
< previous song restart song
|
|
||||||
. next song
|
|
||||||
> next song
|
|
||||||
/ fast win below kill win
|
|
||||||
? fast win below kill win
|
|
|
@ -44,6 +44,8 @@ for_window [instance="dropdown_dropdowncalc"] border pixel 2
|
||||||
for_window [instance="dropdown_*"] move position center
|
for_window [instance="dropdown_*"] move position center
|
||||||
|
|
||||||
# #---Starting External Scripts---# #
|
# #---Starting External Scripts---# #
|
||||||
|
# mpd startup
|
||||||
|
exec --no-startup-id mpd
|
||||||
# Setting the background:
|
# Setting the background:
|
||||||
exec --no-startup-id setbg
|
exec --no-startup-id setbg
|
||||||
# Starts dunst for notifications:
|
# Starts dunst for notifications:
|
||||||
|
@ -56,8 +58,6 @@ exec --no-startup-id remaps
|
||||||
exec --no-startup-id unclutter
|
exec --no-startup-id unclutter
|
||||||
# Run the script to update the mpd i3block on change.
|
# Run the script to update the mpd i3block on change.
|
||||||
exec_always --no-startup-id mpdupdate
|
exec_always --no-startup-id mpdupdate
|
||||||
# mpd startup
|
|
||||||
exec --no-startup-id mpd
|
|
||||||
# Podboat automatic queue and download
|
# Podboat automatic queue and download
|
||||||
exec_always --no-startup-id podentr
|
exec_always --no-startup-id podentr
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ bindsym $mod+Shift+x exec --no-startup-id prompt "Shutdown computer?" "$shutdow
|
||||||
bindsym $mod+c exec --no-startup-id freealf
|
bindsym $mod+c exec --no-startup-id freealf
|
||||||
bindsym $mod+Shift+c exec --no-startup-id camtoggle
|
bindsym $mod+Shift+c exec --no-startup-id camtoggle
|
||||||
|
|
||||||
bindsym $mod+v exec --no-startup-id st -e vim -c "VimwikiIndex"
|
bindsym $mod+v exec --no-startup-id $term -e $EDITOR -c "VimwikiIndex"
|
||||||
#bindsym $mod+Shift+v
|
#bindsym $mod+Shift+v
|
||||||
|
|
||||||
bindsym $mod+b bar mode toggle
|
bindsym $mod+b bar mode toggle
|
||||||
|
@ -267,11 +267,10 @@ bindsym $mod+Shift+0 move container to workspace $ws10
|
||||||
|
|
||||||
for_window [class="Pinentry"] sticky enable
|
for_window [class="Pinentry"] sticky enable
|
||||||
for_window [class="sent"] border pixel 0px
|
for_window [class="sent"] border pixel 0px
|
||||||
for_window [class="Blender"] move to workspace $ws6
|
|
||||||
for_window [class="marble"] move to workspace $ws7
|
|
||||||
for_window [title="GIMP Startup"] move workspace $ws5
|
for_window [title="GIMP Startup"] move workspace $ws5
|
||||||
for_window [class="Gimp"] move workspace $ws5
|
for_window [class="Gimp"] move workspace $ws5
|
||||||
for_window [window_role="GtkFileChooserDialog"] resize shrink height 10 px
|
for_window [window_role="GtkFileChooserDialog"] resize set 800 600
|
||||||
|
for_window [window_role="GtkFileChooserDialog"] move position center
|
||||||
for_window [title="Default - Wine desktop"] floating enable
|
for_window [title="Default - Wine desktop"] floating enable
|
||||||
|
|
||||||
# Bindings to make the webcam float and stick.
|
# Bindings to make the webcam float and stick.
|
||||||
|
@ -286,7 +285,7 @@ bindsym $mod+F2 restart
|
||||||
bindsym $mod+F3 exec --no-startup-id displayselect
|
bindsym $mod+F3 exec --no-startup-id displayselect
|
||||||
bindsym $mod+F4 exec --no-startup-id prompt "Hibernate computer?" "$hibernate"
|
bindsym $mod+F4 exec --no-startup-id prompt "Hibernate computer?" "$hibernate"
|
||||||
bindsym $mod+F5 exec --no-startup-id $netrefresh
|
bindsym $mod+F5 exec --no-startup-id $netrefresh
|
||||||
bindsym $mod+F6 exec --no-startup-id $term -e transmission-remote-cli
|
bindsym $mod+F6 exec --no-startup-id torwrap
|
||||||
bindsym $mod+F7 exec --no-startup-id td-toggle
|
bindsym $mod+F7 exec --no-startup-id td-toggle
|
||||||
bindsym $mod+F8 exec --no-startup-id ~/.config/mutt/etc/mailsync.sh
|
bindsym $mod+F8 exec --no-startup-id ~/.config/mutt/etc/mailsync.sh
|
||||||
bindsym $mod+F9 exec --no-startup-id dmenumount
|
bindsym $mod+F9 exec --no-startup-id dmenumount
|
||||||
|
@ -413,5 +412,3 @@ bindsym XF86Documents exec $term -e $FILE ~/Documents
|
||||||
##bindsym XF86Battery exec
|
##bindsym XF86Battery exec
|
||||||
##bindsym XF86Bluetooth exec
|
##bindsym XF86Bluetooth exec
|
||||||
bindsym XF86WLAN exec $netrefresh
|
bindsym XF86WLAN exec $netrefresh
|
||||||
|
|
||||||
exec --no-startup-id lukescripts
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
## ncmpcpp.
|
## ncmpcpp.
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
#ncmpcpp_directory = ~/.ncmpcpp
|
ncmpcpp_directory = ~/.config/ncmpcpp
|
||||||
#
|
#
|
||||||
##
|
##
|
||||||
## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other
|
## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
" _
|
let mapleader =","
|
||||||
" __ _(_)_ __ ___ _ __ ___
|
|
||||||
" \ \ / / | '_ ` _ \| '__/ __|
|
|
||||||
" \ V /| | | | | | | | | (__
|
|
||||||
" \_/ |_|_| |_| |_|_| \___|
|
|
||||||
|
|
||||||
let mapleader =" "
|
call plug#begin('~/.config/nvim/plugged')
|
||||||
|
Plug 'tpope/vim-surround'
|
||||||
call plug#begin('~/.vim/plugged')
|
Plug 'scrooloose/nerdtree'
|
||||||
Plug 'junegunn/goyo.vim'
|
Plug 'junegunn/goyo.vim'
|
||||||
Plug 'PotatoesMaster/i3-vim-syntax'
|
Plug 'PotatoesMaster/i3-vim-syntax'
|
||||||
Plug 'jreybert/vimagit'
|
Plug 'jreybert/vimagit'
|
||||||
Plug 'LukeSmithxyz/vimling'
|
Plug 'LukeSmithxyz/vimling'
|
||||||
Plug 'vimwiki/vimwiki'
|
Plug 'vimwiki/vimwiki'
|
||||||
|
Plug 'bling/vim-airline'
|
||||||
|
Plug 'tpope/vim-commentary'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
set bg=light
|
||||||
|
set mouse=a
|
||||||
|
set nohlsearch
|
||||||
|
set clipboard=unnamedplus
|
||||||
" Some basics:
|
" Some basics:
|
||||||
set nocompatible
|
set nocompatible
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
|
@ -26,7 +28,7 @@ call plug#end()
|
||||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||||
|
|
||||||
" Goyo plugin makes text more readable when writing prose:
|
" Goyo plugin makes text more readable when writing prose:
|
||||||
map <leader>f :Goyo \| set linebreak<CR>
|
map <leader>f :Goyo \| set bg=light \| set linebreak<CR>
|
||||||
|
|
||||||
" Spell-check set to <leader>o, 'o' for 'orthography':
|
" Spell-check set to <leader>o, 'o' for 'orthography':
|
||||||
map <leader>o :setlocal spell! spelllang=en_us<CR>
|
map <leader>o :setlocal spell! spelllang=en_us<CR>
|
||||||
|
@ -34,6 +36,17 @@ call plug#end()
|
||||||
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
|
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
|
||||||
set splitbelow splitright
|
set splitbelow splitright
|
||||||
|
|
||||||
|
" Nerd tree
|
||||||
|
map <C-n> :NERDTreeToggle<CR>
|
||||||
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||||
|
|
||||||
|
" vimling:
|
||||||
|
nm <leader>d :call ToggleDeadKeys()<CR>
|
||||||
|
imap <leader>d <esc>:call ToggleDeadKeys()<CR>a
|
||||||
|
nm <leader>i :call ToggleIPA()<CR>
|
||||||
|
imap <leader>i <esc>:call ToggleIPA()<CR>a
|
||||||
|
nm <leader>q :call ToggleProse()<CR>
|
||||||
|
|
||||||
" Shortcutting split navigation, saving a keypress:
|
" Shortcutting split navigation, saving a keypress:
|
||||||
map <C-h> <C-w>h
|
map <C-h> <C-w>h
|
||||||
map <C-j> <C-w>j
|
map <C-j> <C-w>j
|
||||||
|
@ -51,7 +64,7 @@ call plug#end()
|
||||||
nnoremap S :%s//g<Left><Left>
|
nnoremap S :%s//g<Left><Left>
|
||||||
|
|
||||||
" Compile document, be it groff/LaTeX/markdown/etc.
|
" Compile document, be it groff/LaTeX/markdown/etc.
|
||||||
map <leader>c :w! \| !compiler <c-r>%<CR><CR>
|
map <leader>c :w! \| !compiler <c-r>%<CR>
|
||||||
|
|
||||||
" Open corresponding .pdf/.html or preview
|
" Open corresponding .pdf/.html or preview
|
||||||
map <leader>p :!opout <c-r>%<CR><CR>
|
map <leader>p :!opout <c-r>%<CR><CR>
|
||||||
|
@ -61,17 +74,11 @@ call plug#end()
|
||||||
|
|
||||||
" Ensure files are read as what I want:
|
" Ensure files are read as what I want:
|
||||||
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
|
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
|
||||||
|
let g:vimwiki_list = [{'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.md'}]
|
||||||
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
|
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
|
||||||
autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff
|
autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff
|
||||||
autocmd BufRead,BufNewFile *.tex set filetype=tex
|
autocmd BufRead,BufNewFile *.tex set filetype=tex
|
||||||
|
|
||||||
" Readmes autowrap text:
|
|
||||||
autocmd BufRead,BufNewFile *.md set tw=79
|
|
||||||
|
|
||||||
" Use urlscan to choose and open a url:
|
|
||||||
:noremap <leader>u :w<Home> !urlscan -r 'linkhandler {}'<CR>
|
|
||||||
:noremap ,, !urlscan -r 'linkhandler {}'<CR>
|
|
||||||
|
|
||||||
" Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed):
|
" Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed):
|
||||||
vnoremap <C-c> "+y
|
vnoremap <C-c> "+y
|
||||||
map <C-p> "+P
|
map <C-p> "+P
|
||||||
|
@ -79,32 +86,25 @@ call plug#end()
|
||||||
" Enable Goyo by default for mutt writting
|
" Enable Goyo by default for mutt writting
|
||||||
" Goyo's width will be the line limit in mutt.
|
" Goyo's width will be the line limit in mutt.
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
|
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo
|
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo \| set bg=light
|
||||||
|
|
||||||
" Automatically deletes all trailing whitespace on save.
|
" Automatically deletes all trailing whitespace on save.
|
||||||
autocmd BufWritePre * %s/\s\+$//e
|
autocmd BufWritePre * %s/\s\+$//e
|
||||||
|
|
||||||
" When shortcut files are updated, renew bash and ranger configs with new material:
|
" When shortcut files are updated, renew bash and ranger configs with new material:
|
||||||
autocmd BufWritePost ~/.bm* !shortcuts
|
autocmd BufWritePost ~/.bmdirs,~/.bmfiles !shortcuts
|
||||||
|
|
||||||
" Run xrdb whenever Xdefaults or Xresources are updated.
|
" Run xrdb whenever Xdefaults or Xresources are updated.
|
||||||
autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb %
|
autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb %
|
||||||
|
|
||||||
" Navigating with guides
|
" Navigating with guides
|
||||||
inoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
|
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||||||
vnoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
|
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l
|
||||||
map <Space><Tab> <Esc>/<++><Enter>"_c4l
|
map <leader><leader> <Esc>/<++><Enter>"_c4l
|
||||||
|
|
||||||
"____ _ _
|
|
||||||
"/ ___| _ __ (_)_ __ _ __ ___| |_ ___
|
|
||||||
"\___ \| '_ \| | '_ \| '_ \ / _ \ __/ __|
|
|
||||||
"___) | | | | | |_) | |_) | __/ |_\__ \
|
|
||||||
"|____/|_| |_|_| .__/| .__/ \___|\__|___/
|
|
||||||
"|_| |_|
|
|
||||||
|
|
||||||
"""LATEX
|
"""LATEX
|
||||||
" Word count:
|
" Word count:
|
||||||
autocmd FileType tex map <leader><leader>o :w !detex \| wc -w<CR>
|
autocmd FileType tex map <leader>w :w !detex \| wc -w<CR>
|
||||||
" Code snippets
|
" Code snippets
|
||||||
autocmd FileType tex inoremap ,fr \begin{frame}<Enter>\frametitle{}<Enter><Enter><++><Enter><Enter>\end{frame}<Enter><Enter><++><Esc>6kf}i
|
autocmd FileType tex inoremap ,fr \begin{frame}<Enter>\frametitle{}<Enter><Enter><++><Enter><Enter>\end{frame}<Enter><Enter><++><Esc>6kf}i
|
||||||
autocmd FileType tex inoremap ,fi \begin{fitch}<Enter><Enter>\end{fitch}<Enter><Enter><++><Esc>3kA
|
autocmd FileType tex inoremap ,fi \begin{fitch}<Enter><Enter>\end{fitch}<Enter><Enter><++><Esc>3kA
|
||||||
|
|
4
.inputrc
4
.inputrc
|
@ -2,6 +2,10 @@ $include /etc/inputrc
|
||||||
set editing-mode vi
|
set editing-mode vi
|
||||||
$if mode=vi
|
$if mode=vi
|
||||||
|
|
||||||
|
set show-mode-in-prompt on
|
||||||
|
set vi-ins-mode-string \1\e[6 q\2
|
||||||
|
set vi-cmd-mode-string \1\e[2 q\2
|
||||||
|
|
||||||
set keymap vi-command
|
set keymap vi-command
|
||||||
# these are for vi-command mode
|
# these are for vi-command mode
|
||||||
Control-l: clear-screen
|
Control-l: clear-screen
|
||||||
|
|
113
.readme.mom
113
.readme.mom
|
@ -13,10 +13,10 @@
|
||||||
Use vim keys (\f(CWh/j/k/l\fP) to navigate this document.
|
Use vim keys (\f(CWh/j/k/l\fP) to navigate this document.
|
||||||
Pressing \f(CWs\fP will fit it to window width (\f(CWa\fP to revert).
|
Pressing \f(CWs\fP will fit it to window width (\f(CWa\fP to revert).
|
||||||
\f(CWK\fP and \f(CWJ\fP zoom in and out.
|
\f(CWK\fP and \f(CWJ\fP zoom in and out.
|
||||||
\f(CWMod+f\fP to toggle fullscreen.
|
\f(CWSuper+f\fP to toggle fullscreen.
|
||||||
\f(CWf\fP will highlight links to follow which are selectable by typing the number that appears plus \f(CWEnter\fP.
|
\f(CWf\fP will highlight links to follow which are selectable by typing the number that appears plus \f(CWEnter\fP.
|
||||||
\f(CWq\fP to quit.
|
\f(CWq\fP to quit.
|
||||||
(These are general zathura shortcuts.)
|
(These are general shortcuts of \f(CWzathura\fP, the pdf reader.)
|
||||||
.LI
|
.LI
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+F1\fP will show this document at any time.
|
\f(CWMod+F1\fP will show this document at any time.
|
||||||
|
@ -35,8 +35,9 @@ My website:
|
||||||
.PDF_WWW_LINK "https://lukesmith.xyz"
|
.PDF_WWW_LINK "https://lukesmith.xyz"
|
||||||
.ITEM
|
.ITEM
|
||||||
Donate:
|
Donate:
|
||||||
.PDF_WWW_LINK "https://paypal.me/LukeMSmith/20" "https://paypal.me/LukeMSmith"
|
.PDF_WWW_LINK "https://lukesmith.xyz/donate" "https://lukesmith.xyz/donate"
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
|
FAQs are at the end of this document.
|
||||||
.HEADING 1 "Welcome!"
|
.HEADING 1 "Welcome!"
|
||||||
.HEADING 2 "Basic goals and principles of this system:"
|
.HEADING 2 "Basic goals and principles of this system:"
|
||||||
.LI
|
.LI
|
||||||
|
@ -69,12 +70,11 @@ but you can also hold it down and it will act as another Windows/super/mod key.
|
||||||
The menu button (usually between the right Alt and Ctrl) is an alternative Super/Mod button.
|
The menu button (usually between the right Alt and Ctrl) is an alternative Super/Mod button.
|
||||||
This is to make one-handing on laptops easier.
|
This is to make one-handing on laptops easier.
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.PP
|
|
||||||
If you'd like to change any of these keyboard changes, you need only open and change \f(CW~/.scripts/tools/remaps\fP.
|
If you'd like to change any of these keyboard changes, you need only open and change \f(CW~/.scripts/tools/remaps\fP.
|
||||||
Actually, this should go without saying, but \fIeverything\fP here can easily be changed.
|
Actually, this should go without saying, but \fIeverything\fP here can easily be changed.
|
||||||
.PP
|
.PP
|
||||||
Additionally, while this isn't a part of i3, the default editing mode in the shell is using vi bindings.
|
Additionally, while this isn't a part of i3, the default editing mode in the shell is using vi bindings.
|
||||||
If you want to learn more of this, run \f(CWMod+Super+E\fP and type and select the option for "vi mode in shell".
|
If you want to learn more of this, run \f(CWMod+Shift+E\fP and type and select the option for "vi mode in shell".
|
||||||
This setting can be changed if you don't like it by deleting or commenting out the contents of \f(CW~/.inputrc\fP.
|
This setting can be changed if you don't like it by deleting or commenting out the contents of \f(CW~/.inputrc\fP.
|
||||||
.HEADING 2 "The Status Bar"
|
.HEADING 2 "The Status Bar"
|
||||||
.PP
|
.PP
|
||||||
|
@ -113,13 +113,17 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik
|
||||||
, Be sure you play around with these. Be flexible with the basic commands and the system will grow on you quick.
|
, Be sure you play around with these. Be flexible with the basic commands and the system will grow on you quick.
|
||||||
.LI
|
.LI
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+Enter\fP \(en Spawn terminal
|
\f(CWMod+Enter\fP \(en Spawn terminal (the default terminal is \f(CWst\fP; run \f(CWman st\fP for more.)
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+q/Q\fP \(en Close window
|
\f(CWMod+q/Q\fP \(en Close window
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+d\fP \(en dmenu (For running commands or programs without shortcuts)
|
\f(CWMod+d\fP \(en dmenu (For running commands or programs without shortcuts)
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+t\fP \(en Toggle between spawning vertically and horizontally
|
\f(CWMod+t\fP \(en Toggle between spawning vertically and horizontally\c
|
||||||
|
.FOOTNOTE
|
||||||
|
You may notice that one side of your window border is a different color.
|
||||||
|
This indicates the direction that the next window will spawn.
|
||||||
|
.FOOTNOTE END
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+f\fP \(en Fullscreen
|
\f(CWMod+f\fP \(en Fullscreen
|
||||||
.ITEM
|
.ITEM
|
||||||
|
@ -152,7 +156,7 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+B\fP \(en Toggle window float in bottom left corner (good for video watched intermittently)
|
\f(CWMod+B\fP \(en Toggle window float in bottom left corner (good for video watched intermittently)
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+N\fP \(en Same as above, but for the botttom right corner.
|
\f(CWMod+N\fP \(en Same as above, but for the bottom right corner.
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.HEADING 2 "Basic Programs"
|
.HEADING 2 "Basic Programs"
|
||||||
.PP
|
.PP
|
||||||
|
@ -162,7 +166,7 @@ Naturally, you can use \f(CWyay\fP to look for and install any you want to add.
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+r\fP \(en ranger (file browser/manager)
|
\f(CWMod+r\fP \(en ranger (file browser/manager)
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+e\fP \(en mutt (email)
|
\f(CWMod+e\fP \(en mutt (email; not installed by default, see below)
|
||||||
.ITEM
|
.ITEM
|
||||||
\f(CWMod+m\fP \(en ncmpcpp (music player)
|
\f(CWMod+m\fP \(en ncmpcpp (music player)
|
||||||
.ITEM
|
.ITEM
|
||||||
|
@ -300,42 +304,51 @@ previous recordings as their names are based on their exact times.
|
||||||
I've mapped those extra buttons that some keyboards have (play and pause
|
I've mapped those extra buttons that some keyboards have (play and pause
|
||||||
buttons, screen brightness, email, web browsing buttons, etc.) to what you
|
buttons, screen brightness, email, web browsing buttons, etc.) to what you
|
||||||
would expect.
|
would expect.
|
||||||
.HEADING 1 "Special traits of this system"
|
.HEADING 1 "Bookmarking Files and Directories"
|
||||||
.HEADING 2 "Easy config access"
|
|
||||||
.PP
|
.PP
|
||||||
Open a terminal and type \f(CWbf\fP. This will open a file where you will see
|
Note the files \f(CW~/.bmdirs\fP and \f(CW~/.bmfiles\fP.
|
||||||
customizable pairs of key shortcuts and config files and other important text
|
These files hold bookmarked directories and files respectively, along with shortcut keys to their left.
|
||||||
files. Enter any of these shortcuts in bash or ranger to immediately open the
|
LARBS, specfically the \f(CWshortcuts\fP script, will automatically read these files and autogenerate aliases and shortcuts for bash/zsh and ranger from them.
|
||||||
file in vim.
|
|
||||||
.PP
|
.PP
|
||||||
You may add new entries here and they will be refreshed when you save the file
|
For example, by default, the shortcut key for \f(CW~/Documents\fP is simply \f(CWd\fP.
|
||||||
in vim. This will take effect immediately once you start a new instance of bash
|
Thus, if you type and run \f(CWd\fP in bash, you will automatically \f(CWcd\fP to \f(CW~/Documents\fP.
|
||||||
or ranger or reload your previous sessions.
|
It also generates four ranger shortcuts using the shortcut \f(CWd\fP:
|
||||||
.HEADING 2 "Folder and config shortcuts"
|
.LI
|
||||||
|
.ITEM
|
||||||
|
\f(CWgd\fP \(en
|
||||||
|
Go to \f(CW~/Documents\fP
|
||||||
|
.ITEM
|
||||||
|
\f(CWmd\fP \(en
|
||||||
|
Move (mv) selected file(s) to \f(CW~/Documents\fP
|
||||||
|
.ITEM
|
||||||
|
\f(CWtd\fP \(en
|
||||||
|
Create a new tab in \f(CW~/Documents\fP
|
||||||
|
.ITEM
|
||||||
|
\f(CWYd\fP \(en
|
||||||
|
Copy/yank (cp) a copy of the selected file(s) to \f(CWDocuments\fP
|
||||||
|
.LIST OFF
|
||||||
|
Shortcuts like these are generated for all key sequence/directory pairs in \f(CW~/.bmdirs\fP.
|
||||||
|
Additionally, you may also add editable files to \f(CW~/.bmfiles\fP.
|
||||||
|
Each key sequence you pair with a file will become an alias to edit it in either bash or ranger.
|
||||||
.PP
|
.PP
|
||||||
Open a terminal and type \f(CWbd\fP. This opens a file when you can keep and create
|
Whenever you edit and save one of the bookmark files, vim will automatically rerun the shortcut script, thus uupdating the shortcuts that will be used in new instances of bash and ranger.
|
||||||
directory/folder shortcuts. There are only a few here now, because I don't know
|
It just werks.
|
||||||
what your folder structure is going to look like, but on my machine, I have 109
|
Note that it is your responsibility to ensure that none of the bindings you add conflict with another necessary function or command.
|
||||||
and growing.
|
|
||||||
.PP
|
|
||||||
Each line has a shortcut key/keys and its target. These can be used in several
|
|
||||||
applications. In bash, simply press \f(CWd\fP, the shortcut for \f(CW~/Documents\fP and you
|
|
||||||
will cd there (and automatically \f(CWls -a\fP).
|
|
||||||
.PP
|
|
||||||
ranger works similarly.
|
|
||||||
When in ranger, just press \f(CWg\fP then the shortcut of the folder you want to go to.
|
|
||||||
You may also press \f(CWt\fP plus the shortcut to open a new tab there.
|
|
||||||
\f(CWm\fP plus the shortcut moves the selected files to the folder and \f(CWY\fP copies them there.
|
|
||||||
\fBGet good at this. It will make management of even the most complex file system easy.\fP
|
|
||||||
.HEADING 2 "Dynamically constructed configs"
|
|
||||||
.PP
|
|
||||||
Each time you save changes to either the config shortcut file or the folder shortcut file in vim, vim will automatically run a bash script that updates your bash/ranger config, allowing you to use your new shortcuts in your next instance of bash/ranger or after resourcing your rc files.
|
|
||||||
.HEADING 1 "Frequently Asked Questions (FAQs)"
|
.HEADING 1 "Frequently Asked Questions (FAQs)"
|
||||||
|
.HEADING 2 "My keyboard isn't working as expected!"
|
||||||
|
.PP
|
||||||
|
LARBS runs some custom keyboard settings in \f(CW~/.scripts/tools/remaps\fP.
|
||||||
|
These settings may override your preferred settings, so you should open this file and comment out troublesome lines if you have issues.
|
||||||
|
.HEADING 2 "My audio isn't working!"
|
||||||
|
.PP
|
||||||
|
Sometimes, PulseAudio can be finicky on initial installation and configuration.
|
||||||
|
If you have no audio output, chances are your problems will be resolved by a reboot or manually killing and restarting PulseAudio.
|
||||||
|
You may also need to set your preferred default output sink which you can do by the command line, or by selecting one with \f(CWpulsemixer\fP (\f(CWmod+A\fP).
|
||||||
.HEADING 2 "How do I change the background/wallpaper?"
|
.HEADING 2 "How do I change the background/wallpaper?"
|
||||||
.PP
|
.PP
|
||||||
The easiest way is to use ranger, navigate to the file you want as your background, and press \f(CWbg\fP.
|
The i3 configuration will always read the file \f(CW~/.config/wall.png\fP as the wallpaper.
|
||||||
To be specific, i3 will always be looking to the file in \f(CW~/.config/wall.png\fP for the wallpaper, this ranger command copies the given file there and reruns feh to update it.
|
The script \f(CWsetbg\fP, if run on an image will set it as the persistent background.
|
||||||
So if you want a persistent wallpaper, move/rename it to \f(CW~/.config/wall.png\fP.
|
When using the file manager, you can simply hover over an image name and type \f(CWbg\fP and this will run \f(CWsetbg\fP.
|
||||||
.HEADING 2 "How I change the colorscheme?"
|
.HEADING 2 "How I change the colorscheme?"
|
||||||
.PP
|
.PP
|
||||||
You can edit \f(CW~/.Xresources\fP to change the colorscheme.
|
You can edit \f(CW~/.Xresources\fP to change the colorscheme.
|
||||||
|
@ -347,10 +360,13 @@ LARBS is also compatible with pywal, but it is not installed or used by default
|
||||||
.HEADING 2 "How do I set up my email?"
|
.HEADING 2 "How do I set up my email?"
|
||||||
.LI
|
.LI
|
||||||
.ITEM
|
.ITEM
|
||||||
Create a GPG private/public key pair if you haven't already.
|
Install \f(CWneomutt\fP, \f(CWofflineimap\fP and \f(CWmsmtp\fP if you haven't already.
|
||||||
|
.ITEM
|
||||||
|
Create a GPG private/public key pair if you haven't already. Type \f(CWmod+shift+e\fP and you can select a tutorial for how to do this.
|
||||||
.ITEM
|
.ITEM
|
||||||
Download the mutt-wizard repository to the mutt config directory:
|
Download the mutt-wizard repository to the mutt config directory:
|
||||||
\f(CWgit clone https://github.com/lukesmithxyz/mutt-wizard ~/.config/mutt\fP
|
\f(CWgit clone https://github.com/lukesmithxyz/mutt-wizard ~/.config/mutt\fP
|
||||||
|
\fBREAD THE README.\fP
|
||||||
.PP
|
.PP
|
||||||
.ITEM
|
.ITEM
|
||||||
There run \f(CWmutt-wizard.sh\fP and follow the directions, specifically:
|
There run \f(CWmutt-wizard.sh\fP and follow the directions, specifically:
|
||||||
|
@ -360,7 +376,7 @@ Add an account.
|
||||||
.ITEM
|
.ITEM
|
||||||
Run \f(CWofflineimap -o\fP in the terminal.
|
Run \f(CWofflineimap -o\fP in the terminal.
|
||||||
.ITEM
|
.ITEM
|
||||||
Select the "Autodetect mailboxes" option.
|
Then select the "Autodetect mailboxes" option.
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.PP
|
.PP
|
||||||
|
@ -379,6 +395,12 @@ By default, mpd, the music daemon assumes that \f(CW~/Music\fP is your music dir
|
||||||
This can be changed in \f(CW~/.config/mpd/mpd.conf\fP.
|
This can be changed in \f(CW~/.config/mpd/mpd.conf\fP.
|
||||||
When you add music to your music folder, you may have to run \f(CWmpc up\fP in the terminal to update the database.
|
When you add music to your music folder, you may have to run \f(CWmpc up\fP in the terminal to update the database.
|
||||||
mpd is controlled by ncmpcpp, which is accessible by \f(CWMod+m\fP.
|
mpd is controlled by ncmpcpp, which is accessible by \f(CWMod+m\fP.
|
||||||
|
.HEADING 2 "How do I update LARBS?"
|
||||||
|
.PP
|
||||||
|
LARBS is deployed as a git repository in your home directory.
|
||||||
|
You can use it as such to fetch, diff and merge changes from the remote repository.
|
||||||
|
If you don't want to do that or don't know how to use git, you can actually just rerun the script (as root) and reinstall LARBS and it will automatically update an existing install if you select the same username.
|
||||||
|
This will overwrite the original config files though, including changes you made for them, but this is an easier brute force approach that will also install any new dependencies.
|
||||||
.HEADING 1 "Contact"
|
.HEADING 1 "Contact"
|
||||||
.LI
|
.LI
|
||||||
.ITEM
|
.ITEM
|
||||||
|
@ -388,15 +410,12 @@ mpd is controlled by ncmpcpp, which is accessible by \f(CWMod+m\fP.
|
||||||
.PDF_WWW_LINK "http://lukesmith.xyz" "https://lukesmith.xyz"
|
.PDF_WWW_LINK "http://lukesmith.xyz" "https://lukesmith.xyz"
|
||||||
\(en For stalking!
|
\(en For stalking!
|
||||||
.ITEM
|
.ITEM
|
||||||
.PDF_WWW_LINK "https://paypal.me/LukeMSmith" "PayPal"
|
.PDF_WWW_LINK "https://lukesmith.xyz/donate" "https://lukesmith.xyz/donate"
|
||||||
\(en For gratitude!
|
\(en To incentivize more development of LARBS!
|
||||||
.ITEM
|
|
||||||
.PDF_WWW_LINK "https://patreon.com/lukesmith" "Patreon"
|
|
||||||
\(en For support!
|
|
||||||
.ITEM
|
.ITEM
|
||||||
.PDF_WWW_LINK "https://github.com/LukeSmithxyz" "My Github Page"
|
.PDF_WWW_LINK "https://github.com/LukeSmithxyz" "My Github Page"
|
||||||
\(en For the code behind it!
|
\(en For the code behind it!
|
||||||
.ITEM
|
.ITEM
|
||||||
.PDF_WWW_LINK "http://lukesmith.xyz/rss.xml" "RSS"
|
.PDF_WWW_LINK "http://lukesmith.xyz/rss.xml" "RSS"
|
||||||
\(en For even better updates!
|
\(en For updates!
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
ping -q -w 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit
|
ping -q -w 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit
|
||||||
|
|
||||||
notify-send -i "$PIX/larbs.gif" "Checking for pacakge updates..."
|
notify-send -i "$PIX/larbs.svg" "Checking for pacakge updates..."
|
||||||
|
|
||||||
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates.
|
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates.
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
ping -q -t 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit
|
ping -q -t 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit
|
||||||
|
|
||||||
/usr/bin/notify-send -i "$PIX/rss.gif" "Updating RSS feeds..."
|
/usr/bin/notify-send -i "$PIX/rss.svg" "Updating RSS feeds..."
|
||||||
|
|
||||||
pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
|
pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
|
||||||
|
|
||||||
|
@ -13,4 +13,4 @@ pkill -RTMIN+6 i3blocks
|
||||||
/usr/bin/newsboat -x reload
|
/usr/bin/newsboat -x reload
|
||||||
rm -f ~/.config/newsboat/.update
|
rm -f ~/.config/newsboat/.update
|
||||||
pkill -RTMIN+6 i3blocks
|
pkill -RTMIN+6 i3blocks
|
||||||
/usr/bin/notify-send -i "$PIX/rss.gif" "RSS feed update complete."
|
/usr/bin/notify-send -i "$PIX/rss.svg" "RSS feed update complete."
|
||||||
|
|
|
@ -49,7 +49,7 @@ morescreen() { # If multi-monitor is selected and there are more than two screen
|
||||||
|
|
||||||
multimon() { # Multi-monitor handler.
|
multimon() { # Multi-monitor handler.
|
||||||
case "$(echo "$screens" | wc -l)" in
|
case "$(echo "$screens" | wc -l)" in
|
||||||
1) xrandr $(echo "$allposs" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
|
1) xrandr $(echo "$allposs" | grep -v "$screens" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
|
||||||
2) twoscreen ;;
|
2) twoscreen ;;
|
||||||
*) morescreen ;;
|
*) morescreen ;;
|
||||||
esac ;}
|
esac ;}
|
||||||
|
@ -65,7 +65,7 @@ chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p
|
||||||
case "$chosen" in
|
case "$chosen" in
|
||||||
"manual selection") arandr ; exit ;;
|
"manual selection") arandr ; exit ;;
|
||||||
"multi-monitor") multimon ;;
|
"multi-monitor") multimon ;;
|
||||||
*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$screens" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
|
*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
setbg # Fix background if screen size/arangement has changed.
|
setbg # Fix background if screen size/arangement has changed.
|
||||||
|
|
|
@ -17,21 +17,21 @@ getmount() { \
|
||||||
|
|
||||||
mountusb() { \
|
mountusb() { \
|
||||||
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
|
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
|
||||||
sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0
|
sudo -A mount "$chosen" && notify-send -i "$PIX/usb.svg" "$chosen mounted." && exit 0
|
||||||
getmount "/mnt /media /mount /home -maxdepth 5 -type d"
|
getmount "/mnt /media /mount /home -maxdepth 5 -type d"
|
||||||
partitiontype="$(lsblk -no "fstype" "$chosen")"
|
partitiontype="$(lsblk -no "fstype" "$chosen")"
|
||||||
case "$partitiontype" in
|
case "$partitiontype" in
|
||||||
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
|
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
|
||||||
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";;
|
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";;
|
||||||
esac
|
esac
|
||||||
notify-send "$chosen mounted to $mp."
|
notify-send -i "$PIX/usb.svg" "$chosen mounted to $mp."
|
||||||
}
|
}
|
||||||
|
|
||||||
mountandroid() { \
|
mountandroid() { \
|
||||||
chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1)
|
chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1)
|
||||||
getmount "$HOME -maxdepth 3 -type d"
|
getmount "$HOME -maxdepth 3 -type d"
|
||||||
simple-mtpfs --device "$chosen" "$mp"
|
simple-mtpfs --device "$chosen" "$mp"
|
||||||
notify-send "Android device mounted to $mp."
|
notify-send -i "$PIX/android.svg" "Android device mounted to $mp."
|
||||||
}
|
}
|
||||||
|
|
||||||
asktype() { \
|
asktype() { \
|
||||||
|
|
|
@ -7,13 +7,13 @@ unmountusb() {
|
||||||
[ -z "$drives" ] && exit
|
[ -z "$drives" ] && exit
|
||||||
chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
|
chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
|
||||||
[ -z "$chosen" ] && exit
|
[ -z "$chosen" ] && exit
|
||||||
sudo -A umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."
|
sudo -A umount "$chosen" && pgrep -x dunst && notify-send -i "$PIX/usb.svg" "$chosen unmounted."
|
||||||
}
|
}
|
||||||
|
|
||||||
unmountandroid() { \
|
unmountandroid() { \
|
||||||
chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")
|
chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")
|
||||||
[ -z "$chosen" ] && exit
|
[ -z "$chosen" ] && exit
|
||||||
sudo -A umount -l "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."
|
sudo -A umount -l "$chosen" && pgrep -x dunst && notify-send -i "$PIX/android.svg" "$chosen unmounted."
|
||||||
}
|
}
|
||||||
|
|
||||||
asktype() { \
|
asktype() { \
|
||||||
|
|
|
@ -1,19 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Pause mpd and send the pause key to all mpv videos:
|
||||||
rm -f /tmp/locked.png
|
|
||||||
|
|
||||||
# If `imagemagick` is not installed, use a blank screen.
|
|
||||||
[ -f /usr/bin/convert ] &&
|
|
||||||
scrot -m -z /tmp/base.png &&
|
|
||||||
pgrep -x dunst && notify-send -i ~/.scripts/pix/lock.png "Locking computer..." &&
|
|
||||||
convert /tmp/base.png -blur 0x8 /tmp/locked.png
|
|
||||||
|
|
||||||
# Pause music (mocp, mpd and send the pause key to all mpv videos):
|
|
||||||
mocp -P >/dev/null 2>&1
|
|
||||||
mpc pause >/dev/null 2>&1
|
mpc pause >/dev/null 2>&1
|
||||||
pauseallmpv >/dev/null 2>&1
|
pauseallmpv >/dev/null 2>&1
|
||||||
|
|
||||||
i3lock -e -f -c 000000 -i /tmp/locked.png
|
i3lock -e -f -c 1d2021
|
||||||
|
|
||||||
# In five seconds, turn off display unless key press in last 4 seconds.
|
# In five seconds, turn off display unless key press in last 4 seconds.
|
||||||
sleep 5 && [ 4000 -lt "$(xssstate -i)" ] && pgrep -x i3lock && xset dpms force off
|
sleep 5 && [ 4000 -lt "$(xssstate -i)" ] && pgrep -x i3lock && xset dpms force off
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfullscreen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
|
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
|
||||||
"a selected area") maim -s pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
"a selected area") maim -s pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
||||||
"current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
"current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
||||||
"full screen") maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
"full screen") maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;;
|
||||||
"a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;;
|
"a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;;
|
||||||
"current window (copy)") maim -i | xclip -selection clipboard -t image/png ;;
|
"current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;;
|
||||||
"full screen (copy)") maim | xclip -selection clipboard -t image/png ;;
|
"full screen (copy)") maim | xclip -selection clipboard -t image/png ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# If transmission-daemon is running, will ask to kill, else will ask to start.
|
# If transmission-daemon is running, will ask to kill, else will ask to start.
|
||||||
|
|
||||||
[ ! -f /usr/bin/transmission-daemon ] && notify-send "Transmission daemon not installed." && exit
|
|
||||||
|
|
||||||
if pgrep -x transmission-da >/dev/null ;
|
if pgrep -x transmission-da >/dev/null ;
|
||||||
then
|
then
|
||||||
yn=$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")
|
[ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send -i "$PIX/torrent.svg" "transmission-daemon killed."
|
||||||
[ "$yn" = "Yes" ] && killall transmission-da
|
|
||||||
else
|
else
|
||||||
yn=$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")
|
ifinstalled transmission-cli || exit
|
||||||
[ "$yn" = "Yes" ] && transmission-daemon
|
[ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send -i "$PIX/torrent.svg" "tranmission-daemon started."
|
||||||
fi
|
fi
|
||||||
sleep 3 && pkill -RTMIN+7 i3blocks
|
sleep 3 && pkill -RTMIN+7 i3blocks
|
||||||
|
|
6
.scripts/i3cmds/torwrap
Executable file
6
.scripts/i3cmds/torwrap
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
ifinstalled transmission-remote-cli transmission-cli || exit
|
||||||
|
|
||||||
|
! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send -i "$PIX/torrent.svg" "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks
|
||||||
|
|
||||||
|
$TERMINAL -e transmission-remote-cli
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Credit to Maddison Hellstrom (@b0o on Github)
|
# Credit to Maddison Hellstrom (@b0o on Github)
|
||||||
qrencode -o - -s 1 \
|
ifinstalled feh && qrencode -o - -s 1 \
|
||||||
"$(xclip -out -selection clipboard)" |
|
"$(xclip -out -selection clipboard)" |
|
||||||
feh --zoom max \
|
feh --zoom max \
|
||||||
-F \
|
-F \
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
[ "$(pgrep -x "$(basename "$0")" | wc -l)" -gt 2 ] && exit
|
[ "$(pgrep -x "$(basename "$0")" | wc -l)" -gt 2 ] && exit
|
||||||
|
|
||||||
while : ; do
|
sleep 5 && while : ; do
|
||||||
pgrep -x mpd || exit
|
pgrep -x mpd || exit
|
||||||
mpc idle > /dev/null
|
mpc idle > /dev/null
|
||||||
pkill -RTMIN+11 i3blocks ;
|
pkill -RTMIN+11 i3blocks ;
|
||||||
|
|
|
@ -6,10 +6,12 @@ transmission-remote -l | grep % |
|
||||||
s/.*Seeding.*/Z/g;
|
s/.*Seeding.*/Z/g;
|
||||||
s/.*100%.*/N/g;
|
s/.*100%.*/N/g;
|
||||||
s/.*Idle.*/B/g;
|
s/.*Idle.*/B/g;
|
||||||
|
s/.*Uploading.*/L/g;
|
||||||
s/.*%.*/M/g" |
|
s/.*%.*/M/g" |
|
||||||
sort -h | uniq -c | sed " # Now we replace the standin letters with icons.
|
sort -h | uniq -c | sed " # Now we replace the standin letters with icons.
|
||||||
s/A/🛑/g;
|
s/A/🛑/g;
|
||||||
s/B/⌛️/g;
|
s/B/⌛️/g;
|
||||||
|
s/L/🔼/g;
|
||||||
s/M/🔽/g;
|
s/M/🔽/g;
|
||||||
s/N/✅/g;
|
s/N/✅/g;
|
||||||
s/Z/🌱/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed -e "s/ $//g"
|
s/Z/🌱/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed -e "s/ $//g"
|
||||||
|
@ -18,7 +20,8 @@ case $BLOCK_BUTTON in
|
||||||
1) $TERMINAL -e transmission-remote-cli ;;
|
1) $TERMINAL -e transmission-remote-cli ;;
|
||||||
3) pgrep -x dunst >/dev/null && notify-send "<b>Torrent module:</b>
|
3) pgrep -x dunst >/dev/null && notify-send "<b>Torrent module:</b>
|
||||||
🛑: paused
|
🛑: paused
|
||||||
⏳: waiting
|
⏳: idle (seeds needed)
|
||||||
|
🔼: uploading (unfinished)
|
||||||
🔽: downloading
|
🔽: downloading
|
||||||
✅: done
|
✅: done
|
||||||
🌱: done and seeding" ;;
|
🌱: done and seeding" ;;
|
||||||
|
|
|
@ -1,21 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This script will compile or run another finishing operation on a document. I
|
# This script will compile or run another finishing operation on a document. I
|
||||||
# have this script run via vim.
|
# have this script run via vim.
|
||||||
#
|
#
|
||||||
# tex files: Compiles to pdf, including bibliography if necessary
|
# Compiles .tex. groff (.mom, .ms), .rmd, .md.
|
||||||
# md files: Compiles to pdf via pandoc
|
# Opens .sent files as sent presentations.
|
||||||
# rmd files: Compiles via R Markdown
|
# Runs scripts based on extention or shebang
|
||||||
# c files: Compiles via whatever compiler is set to cc. Usually gcc.
|
|
||||||
# py files: runs via python command
|
|
||||||
# go files: compiles and runs with "go run"
|
|
||||||
# config.h files: (For suckless utils) recompiles and installs program.
|
|
||||||
# all others: run `sent` to show a presentation
|
|
||||||
|
|
||||||
file=$(readlink -f "$1")
|
file=$(readlink -f "$1")
|
||||||
dir=$(dirname "$file")
|
dir=$(dirname "$file")
|
||||||
base="${file%.*}"
|
base="${file%.*}"
|
||||||
shebang=$(sed -n 1p "$file")
|
|
||||||
|
|
||||||
cd "$dir" || exit
|
cd "$dir" || exit
|
||||||
|
|
||||||
|
@ -29,22 +22,16 @@ textype() { \
|
||||||
$command --output-directory="$dir" "$base"
|
$command --output-directory="$dir" "$base"
|
||||||
}
|
}
|
||||||
|
|
||||||
shebangtest() {
|
|
||||||
case "$shebang" in
|
|
||||||
\#\!*) "$file" ;;
|
|
||||||
*) sent "$file" 2>/dev/null & ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$file" in
|
case "$file" in
|
||||||
*\.ms) refer -PS -e "$file" | groff -me -ms -kejpt -T pdf > "$base".pdf ;;
|
*\.ms) refer -PS -e "$file" | groff -me -ms -kejpt -T pdf > "$base".pdf ;;
|
||||||
*\.mom) refer -PS -e "$file" | groff -mom -kejpt -T pdf > "$base".pdf ;;
|
*\.mom) refer -PS -e "$file" | groff -mom -kejpt -T pdf > "$base".pdf ;;
|
||||||
*\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;;
|
*\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;;
|
||||||
*\.tex) textype "$file" ;;
|
*\.tex) textype "$file" ;;
|
||||||
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
||||||
*config.h) make && sudo make install ;;
|
*config.h) sudo make install ;;
|
||||||
*\.c) cc "$file" -o "$base" && "$base" ;;
|
*\.c) cc "$file" -o "$base" && "$base" ;;
|
||||||
*\.py) python "$file" ;;
|
*\.py) python "$file" ;;
|
||||||
*\.go) go run "$file" ;;
|
*\.go) go run "$file" ;;
|
||||||
*) shebangtest ;;
|
*\.sent) setsid sent "$file" 2>/dev/null & ;;
|
||||||
|
*) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# If $1 command is not available, error code and notify.
|
# If $1 command is not available, error code and notify.
|
||||||
command -v "$1" >/dev/null || { notify-send "$1 is not installed." && exit 1 ;}
|
command -v "$1" >/dev/null || { notify-send -i "$PIX/larbs.svg" "<b>$1</b> must be installed for this function." && exit 1 ;}
|
||||||
|
|
11
.scripts/tools/qndl
Executable file
11
.scripts/tools/qndl
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# $1 is a url; $2 is a command
|
||||||
|
[ -z "$1" ] && exit
|
||||||
|
base="$(basename "$1")"
|
||||||
|
notify-send -i "$PIX/dl.svg" "Queuing $base..."
|
||||||
|
cmd="$2"
|
||||||
|
[ -z "$cmd" ] && cmd="youtube-dl --add-metadata"
|
||||||
|
idnum="$(tsp $cmd "$1")"
|
||||||
|
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
|
||||||
|
tsp -D "$idnum" mv "$base" "$realname"
|
||||||
|
tsp -D "$idnum" notify-send -i "$PIX/check.svg" "$realname done."
|
|
@ -7,12 +7,7 @@ queuefile="$HOME/.local/share/newsboat/queue"
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
[ -z "$line" ] && continue
|
[ -z "$line" ] && continue
|
||||||
url="$(echo "$line" | awk '{print $1}')"
|
url="$(echo "$line" | awk '{print $1}')"
|
||||||
base="$(basename "$url")"
|
qndl "$url" "curl -LO"
|
||||||
notify-send -i "$PIX/dl.png" "Queuing $base..."
|
|
||||||
idnum="$(tsp curl -LO "$url")"
|
|
||||||
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
|
|
||||||
tsp -D "$idnum" mv "$base" "$realname"
|
|
||||||
tsp -D "$idnum" notify-send -i "$PIX/check.png" "$realname done."
|
|
||||||
done < "$queuefile"
|
done < "$queuefile"
|
||||||
|
|
||||||
echo > "$queuefile"
|
echo > "$queuefile"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Sets the background. If given an argument, will set file as background.
|
# Sets the background. If given an argument, will set file as background.
|
||||||
[ ! -z "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed."
|
[ ! -z "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed."
|
||||||
xwallpaper --center ~/.config/wall.png
|
xwallpaper --maximize ~/.config/wall.png
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
# transmission-daemon sometimes fails to take remote requests in its first
|
# transmission-daemon sometimes fails to take remote requests in its first
|
||||||
# moments.
|
# moments.
|
||||||
|
|
||||||
pgrep -x transmission-da || (transmission-daemon && note "Starting daemon..." "$PIX/dl.png" && sleep 3 && pkill -RTMIN+7 i3blocks)
|
pgrep -x transmission-da || (transmission-daemon && note "Starting daemon..." "$PIX/dl.svg" && sleep 3 && pkill -RTMIN+7 i3blocks)
|
||||||
|
|
||||||
transmission-remote -a "$@" && note "Torrent added." "$PIX/dl.png"
|
transmission-remote -a "$@" && note "Torrent added." "$PIX/dl.svg"
|
||||||
|
|
1
.vim
Symbolic link
1
.vim
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
.config/nvim/
|
Loading…
Reference in a new issue