Compare commits

...

2 Commits

Author SHA1 Message Date
lelgenio c04254de8c normalize indentation 2020-12-06 23:38:41 -03:00
lelgenio 3a95264474 fix filter ignoring 2020-12-06 23:14:00 -03:00
6 changed files with 356 additions and 354 deletions

View File

@ -9,378 +9,378 @@
variables: variables:
############################################################### ###############################################################
username: lelgenio username: lelgenio
mail: disroot.org mail: disroot.org
cursor_size: 24 cursor_size: 24
editor: kak editor: kak
tabs: false tabs: false
key_layout: colemak key_layout: colemak
launcher: bmenu launcher: bmenu
terminal: alacritty terminal: alacritty
file_manager: thunar file_manager: thunar
bar: waybar bar: waybar
bar_pos: top bar_pos: top
tmux: false tmux: false
font: font:
mono: Hack mono: Hack
interface: Inter interface: Inter
size: size:
small: 12 small: 12
medium: 14 medium: 14
big: 16 big: 16
############################################################### ###############################################################
profiles: profiles:
############################################################### ###############################################################
dark: dark:
variables: variables:
opacity: 0.98 opacity: 0.98
color: color:
type: dark type: dark
bg: '#202020' bg: '#202020'
bg_light: '#404040' bg_light: '#404040'
bg_dark: '#191919' bg_dark: '#191919'
txt: '#FFFFFF' txt: '#FFFFFF'
nontxt: '#252525' nontxt: '#252525'
normal: normal:
black: '#404040' black: '#404040'
red: '#AB4642' red: '#AB4642'
green: '#A1B56C' green: '#A1B56C'
yellow: '#E6C547' yellow: '#E6C547'
blue: '#6C99DA' blue: '#6C99DA'
magenta: '#C397D8' magenta: '#C397D8'
cyan: '#70C0BA' cyan: '#70C0BA'
white: '#EAEAEA' white: '#EAEAEA'
light: light:
variables: variables:
opacity: 0.95 opacity: 0.95
color: color:
type: light type: light
bg: '#FAFAFA' bg: '#FAFAFA'
bg_light: '#A0A0A0' bg_light: '#A0A0A0'
bg_dark: '#EAEAEA' bg_dark: '#EAEAEA'
txt: '#303030' txt: '#303030'
nontxt: '#E0E0E0' nontxt: '#E0E0E0'
normal: normal:
black: '#555555' black: '#555555'
red: '#D54E53' red: '#D54E53'
green: '#008800' green: '#008800'
yellow: '#DBB704' yellow: '#DBB704'
blue: '#0D68A8' blue: '#0D68A8'
magenta: '#C397D8' magenta: '#C397D8'
cyan: '#00A0A5' cyan: '#00A0A5'
white: '#FFFFFF' white: '#FFFFFF'
############################################################### ###############################################################
# Accents {{{ # Accents {{{
############################################################### ###############################################################
accent_red: {variables: {accent_color: "#D9534F"}} accent_red: {variables: {accent_color: "#D9534F"}}
accent_green: {variables: {accent_color: "#159828"}} accent_green: {variables: {accent_color: "#159828"}}
accent_blue: {variables: {accent_color: "#3465A3"}} accent_blue: {variables: {accent_color: "#3465A3"}}
accent_pink: {variables: {accent_color: "#E91E63"}} accent_pink: {variables: {accent_color: "#E91E63"}}
accent_teal: {variables: {accent_color: "#16A085"}} accent_teal: {variables: {accent_color: "#16A085"}}
accent_magenta: {variables: {accent_color: "#9C27B0"}} accent_magenta: {variables: {accent_color: "#9C27B0"}}
accent_orange: {variables: {accent_color: "#D93200"}} accent_orange: {variables: {accent_color: "#D93200"}}
############################################################### ###############################################################
# Keyboard Layouts # Keyboard Layouts
############################################################### ###############################################################
colemak: colemak:
variables: variables:
key: key:
layout: colemak layout: colemak
left: n left: n
down: e down: e
up: i up: i
right: o right: o
next: l next: l
tabL: U tabL: U
tabR: Y tabR: Y
insertMode: s insertMode: s
insertQuit: kk insertQuit: kk
qwerty: qwerty:
variables: variables:
key: key:
layout: qwerty layout: qwerty
left: h left: h
down: j down: j
up: k up: k
right: l right: l
next: l next: l
tabL: I tabL: I
tabR: O tabR: O
insertMode: i insertMode: i
insertQuit: jj insertQuit: jj
############################################################### ###############################################################
# Main profile # Main profile
############################################################### ###############################################################
main: main:
variables: variables:
gtk_theme: "materia-{{@@ env['USER'] @@}}-{{@@ accent_color_name @@}}-{{@@ color.type @@}}" gtk_theme: "materia-{{@@ env['USER'] @@}}-{{@@ accent_color_name @@}}-{{@@ color.type @@}}"
kvantum_theme: "Materia{{@@ color.type.capitalize() @@}}" kvantum_theme: "Materia{{@@ color.type.capitalize() @@}}"
icon_theme: "Papirus-{{@@ color.type.capitalize() @@}}" icon_theme: "Papirus-{{@@ color.type.capitalize() @@}}"
cursor_theme: "capitaine-cursors{{@@ '-light' if color.type == 'light' @@}}" cursor_theme: "capitaine-cursors{{@@ '-light' if color.type == 'light' @@}}"
dotfiles: dotfiles:
- ALL - ALL
include: include:
- "{{@@ key_layout @@}}" - "{{@@ key_layout @@}}"
- "{{@@ color_type @@}}" - "{{@@ color_type @@}}"
- "accent_{{@@ accent_color_name @@}}" - "accent_{{@@ accent_color_name @@}}"
############################################################### ###############################################################
config: config:
############################################################### ###############################################################
backup: false backup: false
banner: false banner: false
keepdot: false keepdot: false
link_dotfile_default: nolink link_dotfile_default: nolink
link_on_import: nolink link_on_import: nolink
longkey: false longkey: false
default_actions: default_actions:
- notify - notify
func_file: func_file:
- funcs.py - funcs.py
filter_file: filter_file:
- funcs.py - funcs.py
############################################################### ###############################################################
dynvariables: dynvariables:
############################################################### ###############################################################
color_type: test -n "$_COLOR_TYPE" && echo "$_COLOR_TYPE" || echo dark color_type: test -n "$_COLOR_TYPE" && echo "$_COLOR_TYPE" || echo dark
accent_color_name: test -n "$_ACCENT_COLOR" && echo "$_ACCENT_COLOR" || echo red accent_color_name: test -n "$_ACCENT_COLOR" && echo "$_ACCENT_COLOR" || echo red
blender_version: blender --version | head -n1 | sed -E 's|^Blender (.*)\..*|\1|g' blender_version: blender --version | head -n1 | sed -E 's|^Blender (.*)\..*|\1|g'
############################################################### ###############################################################
actions: actions:
############################################################### ###############################################################
notify: > notify: >
notify-send notify-send
"Updating dotfiles" "Updating dotfiles"
"{{@@ _dotfile_abs_dst.lstrip(env['HOME']) @@}}" "{{@@ _dotfile_abs_dst.lstrip(env['HOME']) @@}}"
reload_mako: makoctl reload reload_mako: makoctl reload
lesskey: lesskey lesskey: lesskey
reload_fish: pkill -SIGHUP fish reload_fish: pkill -SIGHUP fish
vimplug: > vimplug: >
nvim nvim
+PlugUpgrade +PlugUpgrade
+PlugInstall +PlugInstall
+PlugUpdate +PlugUpdate
+qall +qall
&> /dev/null &> /dev/null
& disown & disown
crontab_install: | crontab_install: |
crontab -r crontab -r
crontab ~/.local/share/crontab crontab ~/.local/share/crontab
vdirsyncer: | vdirsyncer: |
yes | vdirsyncer discover & disown yes | vdirsyncer discover & disown
lnMail: | lnMail: |
ln -fs ~/.config/neomutt/mbsyncrc ~/.mbsyncrc ln -fs ~/.config/neomutt/mbsyncrc ~/.mbsyncrc
ln -fs ~/.config/neomutt/urlview ~/.urlview ln -fs ~/.config/neomutt/urlview ~/.urlview
sponsorblock: > sponsorblock: >
test -d ~/.config/mpv/scripts/sponsorblock_shared || test -d ~/.config/mpv/scripts/sponsorblock_shared ||
git clone git clone
https://github.com/po5/mpv_sponsorblock https://github.com/po5/mpv_sponsorblock
~/.config/mpv/scripts; ~/.config/mpv/scripts;
rm -f rm -f
~/.config/mpv/scripts/LICENSE ~/.config/mpv/scripts/LICENSE
~/.config/mpv/scripts/README.md ~/.config/mpv/scripts/README.md
ranger_icons: ranger_icons:
git clone git clone
https://github.com/alexanderjeurissen/ranger_devicons https://github.com/alexanderjeurissen/ranger_devicons
~/.config/ranger/plugins/ranger_devicons ~/.config/ranger/plugins/ranger_devicons
# bootstrap scripts # bootstrap scripts
pam_gpg: _pam-gpg-strap pam_gpg: _pam-gpg-strap
make_theme: _make_theme make_theme: _make_theme
install_meta: install_meta install_meta: install_meta
post: post:
# by having it be the last thing to run # by having it be the last thing to run
# and quickly disowning, # and quickly disowning,
# we can make it run only once # we can make it run only once
reload_sway: > reload_sway: >
pidof swaymsg &>/dev/null || pidof swaymsg &>/dev/null ||
swaymsg reload & swaymsg reload &
disown disown
############################################################### ###############################################################
dotfiles: # Just a bunch of paths and action mappings dotfiles: # Just a bunch of paths and action mappings
############################################################### ###############################################################
############################################################### ###############################################################
# Regular programs # Regular programs
############################################################### ###############################################################
sway: sway:
src: sway src: sway
dst: ~/.config/sway dst: ~/.config/sway
actions: actions:
- reload_sway - reload_sway
fish: fish:
src: fish src: fish
dst: ~/.config/fish dst: ~/.config/fish
actions: actions:
- reload_fish - reload_fish
mako: mako:
src: mako.conf src: mako.conf
dst: ~/.config/mako/config dst: ~/.config/mako/config
actions: actions:
- reload_mako - reload_mako
waybar: waybar:
src: waybar src: waybar
dst: ~/.config/waybar dst: ~/.config/waybar
actions: actions:
- reload_sway - reload_sway
kitty: kitty:
src: kitty.conf src: kitty.conf
dst: ~/.config/kitty/kitty.conf dst: ~/.config/kitty/kitty.conf
actions: actions:
- reload_fish - reload_fish
nvim: nvim:
src: nvim.vim src: nvim.vim
dst: ~/.config/nvim/init.vim dst: ~/.config/nvim/init.vim
actions: actions:
- vimplug - vimplug
mutt: mutt:
src: neomutt/ src: neomutt/
dst: ~/.config/neomutt/ dst: ~/.config/neomutt/
actions: actions:
- lnMail - lnMail
lesskey: lesskey:
src: lesskey src: lesskey
dst: ~/.lesskey dst: ~/.lesskey
actions: actions:
- lesskey - lesskey
ranger: ranger:
src: ranger src: ranger
dst: ~/.config/ranger dst: ~/.config/ranger
actions: actions:
- ranger_icons - ranger_icons
mpv: mpv:
src: mpv.conf src: mpv.conf
dst: ~/.config/mpv/mpv.conf dst: ~/.config/mpv/mpv.conf
actions: actions:
- sponsorblock - sponsorblock
dav: dav:
src: dav/ src: dav/
dst: ~/.config dst: ~/.config
actions: actions:
- vdirsyncer - vdirsyncer
tmux: tmux:
src: tmux.conf src: tmux.conf
dst: ~/.tmux.conf dst: ~/.tmux.conf
############################################################### ###############################################################
# Other # Other
############################################################### ###############################################################
scripts: scripts:
src: scripts src: scripts
dst: ~/.local/bin dst: ~/.local/bin
actions: actions:
- make_theme - make_theme
wallpapers: wallpapers:
src: wallpapers src: wallpapers
dst: ~/.local/share/wallpapers dst: ~/.local/share/wallpapers
mime: mime:
src: mime/ src: mime/
dst: ~/ dst: ~/
crontab: crontab:
src: crontab src: crontab
dst: ~/.local/share/crontab dst: ~/.local/share/crontab
actions: actions:
- crontab_install - crontab_install
theme: theme:
src: theme src: theme
dst: ~/ dst: ~/
clang-format: clang-format:
src: clang-format src: clang-format
dst: ~/.clang-format dst: ~/.clang-format
gpg-agent: gpg-agent:
src: gpg-agent.conf src: gpg-agent.conf
dst: ~/.gnupg/gpg-agent.conf dst: ~/.gnupg/gpg-agent.conf
actions: actions:
- pam_gpg - pam_gpg
packages: packages:
src: metaPKGBUILD src: metaPKGBUILD
dst: ~/.local/share/metapkg/PKGBUILD dst: ~/.local/share/metapkg/PKGBUILD
actions: actions:
- install_meta - install_meta
############################################################### ###############################################################
# Big pahts # Big pahts
############################################################### ###############################################################
code-oss: code-oss:
src: vscode.jsonc src: vscode.jsonc
dst: "~/.config/Code - OSS/User/settings.json" dst: "~/.config/Code - OSS/User/settings.json"
telegram-theme: telegram-theme:
src: ./telegram.palette src: ./telegram.palette
dst: ~/.local/share/TelegramDesktop/theme.tdesktop-palette dst: ~/.local/share/TelegramDesktop/theme.tdesktop-palette
blender: blender:
"src": blenderTheme.xml "src": blenderTheme.xml
"dst": "~/.config/blender/{{@@ blender_version @@}}/scripts/presets/interface_theme/blenderTheme.xml" "dst": "~/.config/blender/{{@@ blender_version @@}}/scripts/presets/interface_theme/blenderTheme.xml"
############################################################### ###############################################################
# .config/, no actions # .config/, no actions
############################################################### ###############################################################
alacritty: { "src":"alacritty.yml", "dst":"~/.config/alacritty.yml" } alacritty: { "src":"alacritty.yml", "dst":"~/.config/alacritty.yml" }
bat: { "src":"bat", "dst":"~/.config/bat/config" } bat: { "src":"bat", "dst":"~/.config/bat/config" }
fusuma: { "src":"fusuma.yml", "dst":"~/.config/fusuma/config.yml" } fusuma: { "src":"fusuma.yml", "dst":"~/.config/fusuma/config.yml" }
git: { "src":"git", "dst":"~/.config/git" } git: { "src":"git", "dst":"~/.config/git" }
imv: { "src":"imv.conf", "dst":"~/.config/imv/config" } imv: { "src":"imv.conf", "dst":"~/.config/imv/config" }
kakoune: { "src":"kak", "dst":"~/.config/kak" } kakoune: { "src":"kak", "dst":"~/.config/kak" }
kanshi: { "src":"kanshi", "dst":"~/.config/kanshi/config" } kanshi: { "src":"kanshi", "dst":"~/.config/kanshi/config" }
mpd: { "src":"mpd.conf", "dst":"~/.config/mpd/mpd.conf" } mpd: { "src":"mpd.conf", "dst":"~/.config/mpd/mpd.conf" }
qutebrowser: { "src":"qutebrowser", "dst":"~/.config/qutebrowser" } qutebrowser: { "src":"qutebrowser", "dst":"~/.config/qutebrowser" }
rclone: { "src":"rclone.conf", "dst":"~/.config/rclone/rclone.conf" } rclone: { "src":"rclone.conf", "dst":"~/.config/rclone/rclone.conf" }
wofi: { "src":"wofi", "dst":"~/.config/wofi" } wofi: { "src":"wofi", "dst":"~/.config/wofi" }
zathura: { "src":"zathura.conf", "dst":"~/.config/zathura/zathurarc" } zathura: { "src":"zathura.conf", "dst":"~/.config/zathura/zathurarc" }

View File

@ -1,8 +1,10 @@
# {{@@ header() @@}} # {{@@ header() @@}}
*.yaml yaml=true
*.yml yaml=true
{%@@ if tabs @@%} {%@@ if tabs @@%}
* filter=tabspace * filter=tabspace
*.yaml -filter
*.yml -filter
*.png -filter
*.jpg -filter
{%@@ endif @@%} {%@@ endif @@%}

View File

@ -27,15 +27,15 @@ input {
# Audio Output ################################################################ # Audio Output ################################################################
# #
audio_output { audio_output {
type "pulse" type "pulse"
name "My Pulse Output" name "My Pulse Output"
mixer_type "hardware" mixer_type "hardware"
} }
audio_output { audio_output {
type "fifo" type "fifo"
name "FIFO Output" name "FIFO Output"
path "/tmp/mpd.fifo" path "/tmp/mpd.fifo"
format "44100:16:2" format "44100:16:2"
} }
# Normalization automatic volume adjustments ################################## # Normalization automatic volume adjustments ##################################

View File

@ -13,26 +13,26 @@ base="${file%.*}"
cd "$dir" || exit cd "$dir" || exit
textype() { \ textype() { \
command="pdflatex" command="pdflatex"
( sed 5q "$file" | grep -i -q 'xelatex' ) && command="xelatex" ( sed 5q "$file" | grep -i -q 'xelatex' ) && command="xelatex"
$command --output-directory="$dir" "$base" && $command --output-directory="$dir" "$base" &&
grep -i addbibresource "$file" >/dev/null && grep -i addbibresource "$file" >/dev/null &&
biber --input-directory "$dir" "$base" && biber --input-directory "$dir" "$base" &&
$command --output-directory="$dir" "$base" && $command --output-directory="$dir" "$base" &&
$command --output-directory="$dir" "$base" $command --output-directory="$dir" "$base"
} }
case "$file" in case "$file" in
*\.ms) refer -PS -e "$file" | groff -me -ms -kept -T pdf > "$base".pdf ;; *\.ms) refer -PS -e "$file" | groff -me -ms -kept -T pdf > "$base".pdf ;;
*\.mom) refer -PS -e "$file" | groff -mom -kept -T pdf > "$base".pdf ;; *\.mom) refer -PS -e "$file" | groff -mom -kept -T pdf > "$base".pdf ;;
*\.[0-9]) refer -PS -e "$file" | groff -mandoc -T pdf > "$base".pdf ;; *\.[0-9]) refer -PS -e "$file" | groff -mandoc -T pdf > "$base".pdf ;;
*\.[rR]md) Rscript -e "require(rmarkdown); rmarkdown::render('$file', quiet=TRUE)" ;; *\.[rR]md) Rscript -e "require(rmarkdown); rmarkdown::render('$file', quiet=TRUE)" ;;
*\.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) 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" ;;
*\.sent) setsid sent "$file" 2>/dev/null & ;; *\.sent) setsid sent "$file" 2>/dev/null & ;;
*) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;; *) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;
esac esac

View File

@ -9,13 +9,13 @@ then
pacmd set-card-profile 0 output:hdmi-stereo+input:analog-stereo pacmd set-card-profile 0 output:hdmi-stereo+input:analog-stereo
elif [ "$out" = "Speaker" ] || [ "$out" = "Fone" ] elif [ "$out" = "Speaker" ] || [ "$out" = "Fone" ]
then then
pacmd set-card-profile 0 output:analog-stereo+input:analog-stereo pacmd set-card-profile 0 output:analog-stereo+input:analog-stereo
if [ "$out" = "Speaker" ] if [ "$out" = "Speaker" ]
then then
pacmd set-sink-port @DEFAULT_SINK@ analog-output-speaker pacmd set-sink-port @DEFAULT_SINK@ analog-output-speaker
else else
pacmd set-sink-port @DEFAULT_SINK@ analog-output-headphones pacmd set-sink-port @DEFAULT_SINK@ analog-output-headphones
fi fi
fi fi
pamixer --set-volume "$vol" pamixer --set-volume "$vol"

View File

@ -1,46 +1,46 @@
#!/bin/sh #!/bin/sh
set -x set -x
if ! lsmod | grep v4l2loopback > /dev/null; then if ! lsmod | grep v4l2loopback > /dev/null; then
echo "Adding v42loopback module to kernel" echo "Adding v42loopback module to kernel"
sudo modprobe v4l2loopback sudo modprobe v4l2loopback
fi fi
geometry(){ geometry(){
windowGeometries=$( windowGeometries=$(
# `height - 1` is there because of: https://github.com/ammen99/wf-recorder/pull/56 (I could remove it if it's merged, maybe) # `height - 1` is there because of: https://github.com/ammen99/wf-recorder/pull/56 (I could remove it if it's merged, maybe)
swaymsg -t get_workspaces -r | jq -r '.[] | select(.focused) | .rect | "\(.x),\(.y) \(.width)x\(.height - 1)"'; \ swaymsg -t get_workspaces -r | jq -r '.[] | select(.focused) | .rect | "\(.x),\(.y) \(.width)x\(.height - 1)"'; \
swaymsg -t get_outputs -r | jq -r '.[] | select(.active) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' swaymsg -t get_outputs -r | jq -r '.[] | select(.active) | .rect | "\(.x),\(.y) \(.width)x\(.height)"'
) )
geometry=$(slurp -b "#45858820" -c "#45858880" -w 3 -d <<< "$windowGeometries") || exit $? geometry=$(slurp -b "#45858820" -c "#45858880" -w 3 -d <<< "$windowGeometries") || exit $?
echo $geometry echo $geometry
} }
{ {
if pidof wf-recorder > /dev/null && pidof ffplay > /dev/null if pidof wf-recorder > /dev/null && pidof ffplay > /dev/null
then then
if pidof ffplay > /dev/null; then if pidof ffplay > /dev/null; then
pkill ffplay > /dev/null pkill ffplay > /dev/null
fi fi
if pidof wf-recorder > /dev/null; then if pidof wf-recorder > /dev/null; then
pkill wf-recorder > /dev/null pkill wf-recorder > /dev/null
fi fi
notify-send -t 2000 "Wayland recording has been stopped" notify-send -t 2000 "Wayland recording has been stopped"
else else
if ! pidof wf-recorder > /dev/null; then if ! pidof wf-recorder > /dev/null; then
geometry=$(geometry) || exit $? geometry=$(geometry) || exit $?
wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video2 --geometry="$geometry" & wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video2 --geometry="$geometry" &
fi fi
if ! pidof ffplay; then if ! pidof ffplay; then
swaymsg assign [class=ffplay] workspace 11 swaymsg assign [class=ffplay] workspace 11
unset SDL_VIDEODRIVER unset SDL_VIDEODRIVER
ffplay /dev/video2 -fflags nobuffer & ffplay /dev/video2 -fflags nobuffer &
sleep 0.5 sleep 0.5
# a hack so FPS is not dropping # a hack so FPS is not dropping
swaymsg [class=ffplay] floating enable swaymsg [class=ffplay] floating enable
# swaymsg [class=ffplay] move position 1900 1000 # swaymsg [class=ffplay] move position 1900 1000
# swaymsg focus tiling # swaymsg focus tiling
fi fi
notify-send -t 2000 "Wayland recording has been started" notify-send -t 2000 "Wayland recording has been started"
fi fi
} > ~/.wayland-share-screen.log 2>&1 } > ~/.wayland-share-screen.log 2>&1