Browse Source

Cleaned up stuff, removed tmuxinator dependency, and worked on jupyter neovim integration

master
Micah Halter 1 year ago
parent
commit
8bfffc7126
  1. 35
      Makefile
  2. 40390
      etc/blockips
  3. 2
      i3/.config/i3/config
  4. 3
      mpv/.config/mpv/mpv.conf
  5. 22
      neovim/.config/nvim/init.vim
  6. 2
      scripts/.config/Scripts/compiler
  7. 21
      scripts/.config/Scripts/displayselect
  8. 4
      scripts/.config/Scripts/dmenubluetooth
  9. 4
      scripts/.config/Scripts/dmenuexpand
  10. 4
      scripts/.config/Scripts/dmenui3
  11. 8
      scripts/.config/Scripts/dmenumount
  12. 4
      scripts/.config/Scripts/dmenushutdown
  13. 4
      scripts/.config/Scripts/dmenuumount
  14. 4
      scripts/.config/Scripts/dmenuunicode
  15. 4
      scripts/.config/Scripts/dmenuwpg
  16. 2
      scripts/.config/Scripts/i3-cliprog
  17. 20
      scripts/.config/Scripts/linkhandler
  18. 3
      scripts/.config/Scripts/lofi
  19. 12
      scripts/.config/Scripts/opout
  20. 2
      scripts/.config/Scripts/remaps
  21. 5
      scripts/.config/Scripts/screencast
  22. 41
      scripts/.config/Scripts/tmuxiplex
  23. 10
      tmux/.config/tmuxinator/default.yml
  24. 10
      tmux/.config/tmuxinator/music.yml
  25. 5
      tmux/.config/tmuxinator/scratchpad.yml

35
Makefile

@ -1,7 +1,7 @@
USER=micah
WALLPAPER=coffeeshop.jpg
.PHONY: install update packages pacman yay arch aur r-packages pip-packages stow configs hosts sudo systemd root-config stow-pre stow-post
.PHONY: install update packages pacman yay arch aur r-packages stow configs hosts sudo systemd root-config stow-pre stow-post
install: packages stow
@ -11,7 +11,7 @@ update:
git submodule update --init --recursive
git submodule update --remote
packages: pacman arch yay aur r-packages pip-packages pamusb
packages: pacman arch yay aur r-packages
pacman:
# place pacman config
@ -45,10 +45,7 @@ arch: pacman
alsa-utils \
aria2 \
asciinema \
acpi_call \
biber \
bluez \
bluez-libs
cronie \
ctags \
cups \
@ -58,7 +55,6 @@ arch: pacman
dunst \
exfat-utils \
fd \
firefox \
fzf \
gcc-fortran \
gdb \
@ -72,22 +68,15 @@ arch: pacman
intel-ucode \
jdk8-openjdk \
jsoncpp \
khal \
khard \
libreoffice-fresh \
lxappearance \
maim \
mpv \
msmtp \
neomutt \
neovim \
network-manager-applet \
networkmanager \
newsboat \
notmuch \
notmuch-mutt \
ntp \
offlineimap \
openssh \
openvpn \
pandoc \
@ -113,11 +102,8 @@ arch: pacman
texlive-most \
tlp \
tmux \
openssh \
unclutter \
upower \
vdirsyncer \
vim \
vlc \
w3m \
weechat \
@ -182,7 +168,6 @@ aur: yay
sc-im \
skypeforlinux-stable-bin \
ttf-symbola \
tmuxinator \
upass \
urlscan \
wpgtk-git
@ -190,14 +175,9 @@ aur: yay
r-packages:
Rscript -e "install.packages(c('bindr', 'DiagrammeR', 'knitr', 'reticulate', 'rmarkdown'), repos='https://cran.rstudio.com')"
pip-packages:
sudo -u $(USER) pip install --user --upgrade pip
sudo -u $(USER) pip install --user \
gpymusic
stow: configs root-config stow-post
configs: update stow-pre
configs: stow-pre
# stow personal configs
sudo -u $(USER) stow -S \
bash \
@ -209,17 +189,11 @@ configs: update stow-pre
gnupg \
gtk \
i3 \
khal \
khard \
mpv \
msmtp \
mutt \
ncpamixer \
neofetch \
neovim \
newsboat \
notmuch \
offlineimap \
pass \
picom \
qutebrowser \
@ -234,7 +208,6 @@ configs: update stow-pre
tmux \
unclutter \
urlview \
vdirsyncer \
weechat \
wpgtk \
xdgopen \
@ -271,7 +244,7 @@ stow-pre:
stow-post:
# shortcuts initialization
sudo -u $(USER) /home/$(USER)/.config/Scripts/shortcuts.sh
sudo -u $(USER) /home/$(USER)/.config/Scripts/genshortcuts
# neovim vim-plug initialization
sudo -u $(USER) nvim +'PlugInstall --sync' +qa
# set wallpaper and run wpgtk

40390
etc/blockips
File diff suppressed because it is too large
View File

2
i3/.config/i3/config

@ -199,7 +199,7 @@ bindsym $mod+Shift+t exec --no-startup-id i3-cliprog tasks "gotop"
#bindsym $mod+Control+y
#bindsym $mod+Shift+Control+y
bindsym $mod+u exec --no-startup-id i3-cliprog dropdown "tmuxinator scratchpad"
bindsym $mod+u exec --no-startup-id i3-cliprog dropdown "tmuxiplex scratchpad"
#bindsym $mod+Shift+u
#bindsym $mod+Control+u
#bindsym $mod+Shift+Control+u

3
mpv/.config/mpv/mpv.conf

@ -1,2 +1 @@
pause=no
input-file=~/.config/mpv/control
input-ipc-server=~/.config/mpv/control

22
neovim/.config/nvim/init.vim

@ -34,7 +34,7 @@ Plug 'https://github.com/vim-pandoc/vim-pandoc'
Plug 'https://github.com/vim-pandoc/vim-pandoc-syntax'
Plug 'https://github.com/vim-pandoc/vim-rmarkdown'
Plug 'https://github.com/vim-scripts/ReplaceWithRegister'
" Plug 'https://github.com/wmvanvliet/jupyter-vim'
Plug 'https://github.com/wmvanvliet/jupyter-vim'
call plug#end()
""""""""""""""""""""""""""""
@ -147,17 +147,15 @@ function! HasPaste() abort
endfunction
""""""""""""""""""""""""""""
" => Plugins
""""""""""""""""""""""""""""
" jupyter console
augroup jupyter
autocmd Filetype python,julia nnoremap <buffer> <silent> <leader>sb ?#\ +<CR>V/#\ -<CR>
autocmd Filetype python,julia nnoremap <buffer> <silent> <leader>cn :JupyterConnect<CR>
autocmd Filetype python,julia vmap <buffer> <silent> <leader>e <Plug>JupyterRunVisual
autocmd Filetype python nnoremap <buffer> <leader>mv :!jupyter qtconsole &> /dev/null &<CR><CR>
autocmd Filetype julia nnoremap <buffer> <leader>mv :!jupyter qtconsole --kernel=julia-1.0 &> /dev/null &<CR><CR>
augroup END
" FZF
@ -406,24 +404,19 @@ nmap to :tab sp<CR>
map <leader>mm :w<CR>:AsyncRun compiler %:p<CR><CR>
map <leader>ma :AsyncRun autocomp %:p<CR><CR>
nnoremap <buffer> <leader>mv :!opout <c-r>%<CR><CR>
" make sure auto compiler stops when vim exits
augroup autocomp
autocmd VimLeave * !autocomp %:p stop
augroup END
augroup html
autocmd Filetype html nnoremap <buffer> <leader>mv :!$BROWSER % &> /dev/null &<CR><CR>
augroup END
augroup graphviz
autocmd BufNewFile,BufRead *.gv,*.dot inoremap ;ep &epsilon;
autocmd BufNewFile,BufRead *.gv,*.dot,*.uml,*.pu nnoremap <buffer> <leader>mv :![[ -e %:r.png ]] && sxiveh %:r.png &> /dev/null &<CR><CR>;
augroup END
augroup markup
autocmd Filetype markdown nnoremap <buffer> <leader>mb :w<CR>:AsyncRun pandoc % --pdf-engine=xelatex --variable urlcolor=blue -t beamer -o %:r.pdf<CR><CR>
" compiled doc viewing keybindings
autocmd Filetype tex,markdown,rmd,groff nnoremap <buffer> <leader>mv :![[ -e %:r.pdf ]] && zathura -- %:r.pdf &> /dev/null &<CR><CR>
autocmd Filetype tex,markdown,rmd,groff nnoremap <buffer> <leader>mp :![[ -e %:r.pdf ]] && pdfpc %:r.pdf<CR><CR>
" clear tex compilation files on exit
autocmd VimLeave *.tex !texclear %
@ -474,6 +467,11 @@ augroup whitespace
autocmd BufWritePre * call StripWhitespace()
augroup END
" Setup documentation
augroup pythonapi
autocmd Filetype python set keywordprg=pydoc
augroup END
augroup mutt
autocmd BufNewFile,BufFilePre,BufRead /tmp/neomutt* set filetype=markdown
augroup END
@ -614,7 +612,7 @@ augroup markup
autocmd FileType bib inoremap <buffer> ;c @incollection{,<CR>author<Space>=<Space>"<++>",<CR>title<Space>=<Space>"<++>",<CR>booktitle<Space>=<Space>"<++>",<CR>editor<Space>=<Space>"<++>",<CR>year<Space>=<Space>"<++>",<CR>publisher<Space>=<Space>"<++>",<CR>}<CR><++><Esc>8kf,i
" => Markdown
autocmd FIletype markdown,rmd inoremap <buffer> ;td - [ ]<Space>
autocmd Filetype markdown,rmd inoremap <buffer> ;td - [ ]<Space>
autocmd Filetype markdown,rmd inoremap <buffer> ;b ****<Space><++><Esc>F*hi
autocmd Filetype markdown,rmd inoremap <buffer> ;s ~~~~<Space><++><Esc>F~hi
autocmd Filetype markdown,rmd inoremap <buffer> ;e **<Space><++><Esc>F*i

2
scripts/.config/Scripts/compiler

@ -25,7 +25,7 @@ case "$file" in
*\.gv|*\.dot) dot -Tpng "$file" -o "$base".png ;;
*\.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 ;;
*\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla && pdfpcCleanup ;;
*\.rmd) echo "require(rmarkdown);rmarkdown::render('$file', quiet=TRUE)" | R -q --vanilla && pdfpcCleanup ;;
*\.tex) latexmk -synctex=1 --pdf "$file" && [[ -e "$base".pdfpc ]] && pdfpcCleanup ;;
*\.md) if [[ -e "$base"_template.tex ]] ; then pandoc --template "$base"_template.tex "$file" --filter pandoc-citeproc --variable urlcolor=blue -o "$base".pdf; else pandoc "$file" --filter pandoc-citeproc --variable urlcolor=blue -o "$base".pdf; fi ;;
*config.h) make && sudo make install ;;

21
scripts/.config/Scripts/displayselect

@ -5,16 +5,15 @@
# User may also select "manual selection" which opens arandr.
# I plan on adding a routine from multi-monitor setups later.
dmenu=$HOME/.config/Scripts/dmenucolor
layoutloc=$HOME/.screenlayout
twoscreen() { # If multi-monitor is selected and there are two screens.
mirror=$(printf "no\\nyes" | $dmenu -i -p "Mirror displays?")
mirror=$(printf "no\\nyes" | dmenucolor -i -p "Mirror displays?")
# Mirror displays using native resolution of external display and a scaled
# version for the internal display
if [ "$mirror" = "yes" ]; then
external=$(echo "$screens" | $dmenu -i -p "Optimize resolution for:")
external=$(echo "$screens" | dmenucolor -i -p "Optimize resolution for:")
internal=$(echo "$screens" | grep -v "$external")
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
@ -35,19 +34,19 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
--scale "$scale_x"x"$scale_y"
else
primary=$(echo "$screens" | $dmenu -i -p "Select primary display:")
primary=$(echo "$screens" | dmenucolor -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary")
direction=$(printf "left-of\\nright-of\\nabove\\nbelow" | $dmenu -i -p "What side of $primary should $secondary be on?")
direction=$(printf "left-of\\nright-of\\nabove\\nbelow" | dmenucolor -i -p "What side of $primary should $secondary be on?")
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction" "$primary" --auto --scale 1.0x1.0
fi
}
morescreen() { # If multi-monitor is selected and there are more than two screens.
primary=$(echo "$screens" | $dmenu -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary" | $dmenu -i -p "Select secondary display:")
direction=$(printf "left-of\\nright-of\\nabove\\nbelow" | $dmenu -i -p "What side of $primary should $secondary be on?")
tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | $dmenu -i -p "Select third display:")
direction2=$(printf "left-of\\nright-of\\nabove\\nbelow" | grep -v "$direction" | $dmenu -i -p "What side of $primary should $tertiary be on?")
primary=$(echo "$screens" | dmenucolor -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary" | dmenucolor -i -p "Select secondary display:")
direction=$(printf "left-of\\nright-of\\nabove\\nbelow" | dmenucolor -i -p "What side of $primary should $secondary be on?")
tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenucolor -i -p "Select third display:")
direction2=$(printf "left-of\\nright-of\\nabove\\nbelow" | grep -v "$direction" | dmenucolor -i -p "What side of $primary should $tertiary be on?")
xrandr --output "$primary" --auto --output "$secondary" --"$direction" "$primary" --auto --output "$tertiary" --"$direction2" "$primary" --auto
}
@ -66,7 +65,7 @@ screens=$(echo "$allposs" | grep " connected" | awk '{print $1}')
layouts=$(find $layoutloc -type f -name "*.sh" -printf "%f\n")
# Get user choice including multi-monitor and manual selection:
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection\\n%s" "$screens" "$layouts" | $dmenu -i -p "Select display arangement:") &&
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection\\n%s" "$screens" "$layouts" | dmenucolor -i -p "Select display arangement:") &&
case "$chosen" in
"manual selection") arandr ; exit ;;
"multi-monitor") multimon ;;

4
scripts/.config/Scripts/dmenubluetooth

@ -1,7 +1,5 @@
#!/bin/bash
dmenu=$HOME/.config/Scripts/dmenucolor
_bluetoothctl() {
LC_ALL=C timeout 30 bluetoothctl
}
@ -84,7 +82,7 @@ execute_mode() {
return 2
fi
name=$(printf '%s\n' "${!DEVICES[@]}" | $dmenu -p "Bluetooth $mode" "${dmenu_args[@]}")
name=$(printf '%s\n' "${!DEVICES[@]}" | dmenucolor -p "Bluetooth $mode" "${dmenu_args[@]}")
[[ $name ]] || return
mac=${DEVICES["$name"]}

4
scripts/.config/Scripts/dmenuexpand

@ -5,9 +5,7 @@ action=$2
prompt=$3
alternate=$4
dmenu=$HOME/.config/Scripts/dmenucolor
chosen=$(sed -n 's/^\([^:]*\):.*$/\1/p' $lookup|$dmenu -i -p "$prompt")
chosen=$(sed -n 's/^\([^:]*\):.*$/\1/p' $lookup|dmenucolor -i -p "$prompt")
expanded=$(sed -n "s/^${chosen}:\(.*\)$/\1/p" $lookup)
if [ "$expanded" != "" ]; then

4
scripts/.config/Scripts/dmenui3

@ -1,5 +1,3 @@
#!/bin/bash
dmenu=$HOME/.config/Scripts/dmenucolor
i3-msg "$(cat ~/.config/i3/config | sed -E 's/^bindsym\s*(\S*)\s*(\S.*$)/\1|\2/;t;d'|column -s'|' -t | $dmenu -l 30 | cut -d' ' -f2- | xargs -0)"
i3-msg "$(cat ~/.config/i3/config | sed -E 's/^bindsym\s*(\S*)\s*(\S.*$)/\1|\2/;t;d'|column -s'|' -t | dmenucolor -l 30 | cut -d' ' -f2- | xargs -0)"

8
scripts/.config/Scripts/dmenumount

@ -1,13 +1,11 @@
#!/bin/bash
dmenu=$HOME/.config/Scripts/dmenucolor
pgrep -x dmenu && exit
mountable=$(lsblk -lp -o NAME,FSTYPE,SIZE,TYPE,MOUNTPOINT|grep 'part\|lvm'|grep -v "\(part\|lvm\)[[:space:]]\+/\|t[[:space:]]\+\[SWAP\]\|crypto_LUKS"|awk '{print $1, "(" $3 ")"}')
[[ "$mountable" = "" ]] && exit 1
chosen=$(echo "$mountable"|$dmenu -i -p "Unmounted Drives:"|awk '{print $1}')
chosen=$(echo "$mountable"|dmenucolor -i -p "Unmounted Drives:"|awk '{print $1}')
[[ "$chosen" = "" ]] && exit 1
sudo mount "$chosen" && exit 0
@ -16,11 +14,11 @@ already_mounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$2=="part"&&$3!~/\/b
dirs=$(find /mnt /media /mount /home -type d -maxdepth 5 $already_mounted 2>/dev/null)
mountpoint=$(echo "$dirs"|$dmenu -i -p "Mount Point:")
mountpoint=$(echo "$dirs"|dmenucolor -i -p "Mount Point:")
[[ "$mountpoint" = "" ]] && exit 1
if [[ ! -d "$mountpoint" ]]; then
mkdiryn=$(echo -e "No\nYes" | $dmenu -i -p "Create?")
mkdiryn=$(echo -e "No\nYes" | dmenucolor -i -p "Create?")
[[ "$mkdiryn" = Yes ]] && sudo mkdir -p "$mountpoint"
fi

4
scripts/.config/Scripts/dmenushutdown

@ -1,9 +1,7 @@
#!/bin/bash
dmenu=$HOME/.config/Scripts/dmenucolor
MESSAGE="lock\\nexit\\nreboot\\nshutdown"
ACTION="$(printf "$MESSAGE" | $dmenu -i -p "Power Menu:")"
ACTION="$(printf "$MESSAGE" | dmenucolor -i -p "Power Menu:")"
case "$ACTION" in
"lock") lock ;;

4
scripts/.config/Scripts/dmenuumount

@ -1,12 +1,10 @@
#!/bin/bash
dmenu=$HOME/.config/Scripts/dmenucolor
pgrep -x dmenu && exit
exclusionregex="\(/boot\|/home\|/\)$"
drives=$(lsblk -lp | grep "\(part\|lvm\)[[:space:]]\+/" | grep -v "$exclusionregex" | awk '{print $1, "(" $4 ")", "on", $7}')
[[ "$drives" = "" ]] && exit
chosen=$(echo "$drives" | $dmenu -i -p "Unmount:" | awk '{print $1}')
chosen=$(echo "$drives" | dmenucolor -i -p "Unmount:" | awk '{print $1}')
[[ "$chosen" = "" ]] && exit
sudo umount $chosen && notify-send "$chosen unmounted."

4
scripts/.config/Scripts/dmenuunicode

@ -1,10 +1,8 @@
#!/bin/sh
dmenu=$HOME/.config/Scripts/dmenucolor
xclip -h >/dev/null || exit
chosen=$(grep -v "#" $HOME/.config/Scripts/emoji | $dmenu -i -l 20)
chosen=$(grep -v "#" $HOME/.config/Scripts/emoji | dmenucolor -i -l 20)
[ "$chosen" != "" ] || exit

4
scripts/.config/Scripts/dmenuwpg

@ -1,11 +1,9 @@
#!/bin/bash
dmenu=$HOME/.config/Scripts/dmenucolor
pgrep -x dmenu && exit
walls=$(wpg -l)
[[ "$walls" = "" ]] && exit 1
chosen=$(echo "$walls"|$dmenu -i -p "Wallpapers:"|awk '{print $1}')
chosen=$(echo "$walls"|dmenucolor -i -p "Wallpapers:"|awk '{print $1}')
[[ "$chosen" = "" ]] && exit 1
setbackground $chosen wal

2
scripts/.config/Scripts/i3-cliprog

@ -5,7 +5,7 @@ COMMAND=$2
if ! xdotool search --classname "$INSTANCE" > /dev/null; then
i3-msg "exec $TERMINAL --name=$INSTANCE -e 'i3-runner \"$COMMAND\"'"
sleep .8
sleep .4
fi
i3-msg "[instance="$INSTANCE"] scratchpad show; [instance="$INSTANCE"] move position center"

20
scripts/.config/Scripts/linkhandler

@ -13,14 +13,14 @@ scihub="http://sci-hub.tw/"
[ -z "$1" ] && { "$TRUEBROWSER"; exit; }
case "$1" in
*mkv|*webm|*mp4|*gifv|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*v.redd.it*)
setsid mpv -quiet "$1" >/dev/null 2>&1 & ;;
*png|*jpg|*jpe|*jpeg|*gif)
setsid $HOME/.config/Scripts/sxiveh "$1" >/dev/null 2>&1 & ;;
*mp3|*flac|*opus|*mp3?source*)
setsid tsp curl -LO "$1" >/dev/null 2>&1 & ;;
*springer.com*)
setsid curl -sO "$(curl -s "$scihub$*" | grep -Po "(?<=location.href=').+.pdf")" >/dev/null 2>&1 & ;;
*)
setsid "$TRUEBROWSER" "$1" >/dev/null 2>&1 & ;;
*mkv|*webm|*mp4|*gifv|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*v.redd.it*)
setsid mpv -quiet "$1" >/dev/null 2>&1 & ;;
*png|*jpg|*jpe|*jpeg|*gif)
setsid sxiveh "$1" >/dev/null 2>&1 & ;;
*mp3|*flac|*opus|*mp3?source*)
setsid tsp curl -LO "$1" >/dev/null 2>&1 & ;;
*springer.com*)
setsid curl -sO "$(curl -s "$scihub$*" | grep -Po "(?<=location.href=').+.pdf")" >/dev/null 2>&1 & ;;
*)
setsid "$TRUEBROWSER" "$1" >/dev/null 2>&1 & ;;
esac

3
scripts/.config/Scripts/lofi

@ -0,0 +1,3 @@
#!/bin/bash
mpv --no-video "https://www.youtube.com/watch?v=NEmIPDs9CZw"

12
scripts/.config/Scripts/opout

@ -0,0 +1,12 @@
#!/usr/bin/env sh
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
case "$1" in
*.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid zathura "$basename".pdf >/dev/null 2>&1 & ;;
*.gv|*.dot|*.uml|*.pu) setsid sxiveh "$basename".png >/dev/null 2>&1 & ;;
*.[0-9]) setsid zathura "$basename".pdf >/dev/null 2>&1 & ;;
*.html) setsid $BROWSER "$basename".html >/dev/null 2>&1 & ;;
*.py) setsid jupyter qtconsole >/dev/null 2>&1 & ;;
*.jl) setsid jupyter qtconsole --kernel=julia-1.0 >/dev/null 2>&1 & ;;
esac

2
scripts/.config/Scripts/remaps

@ -2,4 +2,4 @@
xset r rate 300 50
setxkbmap -option ctrl:nocaps
killall xcape ; xcape -e "Control_L=Escape"
killall xcape ; xcape -t 200 -e "Control_L=Escape;Shift_L=Shift_L|9;Shift_R=Shift_L|0"

5
scripts/.config/Scripts/screencast

@ -1,10 +1,10 @@
#!/bin/bash
while [[ -f $HOME/screencast$n.mkv ]]
while [[ -f $HOME/screencast$n.mp4 ]]
do
n=$((n+1))
done
filename="$HOME/screencast$n.mkv"
filename="$HOME/screencast$n.mp4"
ffmpeg -y \
-f x11grab \
@ -12,3 +12,4 @@ ffmpeg -y \
-i :0.0 \
-f alsa -i default \
-c:v libx264 -r 30 -c:a flac $filename
# -c:v libx264 -r 30 $filename

41
scripts/.config/Scripts/tmuxiplex

@ -0,0 +1,41 @@
#!/bin/sh
set -euC
# set root directory
cd ~
s_name=$1
# attach or switch to tmux session
att() {
[ -n "${TMUX:-}" ] &&
tmux switch-client -t "=${s_name}" ||
tmux attach-session -t "=${s_name}"
}
# if session exists, go to it
if tmux has-session -t "=${s_name}" 2> /dev/null; then
att
exit 0
fi
if [ "$s_name" == "scratchpad" ]; then
w1_name="default"
tmux new-session -d -s ${s_name} -n ${w1_name}
w2_name="vpn"
tmux new-window -d -t "=${s_name}" -n ${w2_name}
tmux split-window -d -h -t "=${s_name}:=${w2_name}"
tmux send-keys -t "=${s_name}:=${w2_name}.1" "gtrivpn"
tmux send-keys -t "=${s_name}:=${w2_name}.2" "oasisvpn"
w3_name="music"
tmux new-window -d -t "=${s_name}" -n ${w3_name}
tmux split-window -d -t "=${s_name}:=${w3_name}"
tmux resize-pane -t "=${s_name}:=${w3_name}" -D 5
tmux send-keys -t "=${s_name}:=${w3_name}.2" "cava" Enter
tmux send-keys -t "=${s_name}:=${w3_name}.1" "lofi"
fi
att

10
tmux/.config/tmuxinator/default.yml

@ -1,10 +0,0 @@
name: default
root:
windows:
- default:
layout: even-horizontal
panes:
-
-
- other:

10
tmux/.config/tmuxinator/music.yml

@ -1,10 +0,0 @@
name: music
root:
windows:
- music:
layout: 0f06,213x57,0,0[213x43,0,0{106x43,0,0,54,106x43,107,0,55},213x13,0,44,56]
panes:
- gpymusic
- mpsyt
- cava

5
tmux/.config/tmuxinator/scratchpad.yml

@ -1,5 +0,0 @@
name: scratchpad
root:
windows:
- default:
Loading…
Cancel
Save