rebase
This commit is contained in:
commit
25d21bdb8a
184 changed files with 16108 additions and 0 deletions
27
.config/dunst/dunstrc
Normal file
27
.config/dunst/dunstrc
Normal file
|
@ -0,0 +1,27 @@
|
|||
[global]
|
||||
monitor = 0
|
||||
follow = keyboard
|
||||
width = 370
|
||||
height = 370
|
||||
offset = 0x19
|
||||
padding = 1
|
||||
horizontal_padding = 1
|
||||
transparency = 10
|
||||
font = Monospace 12
|
||||
format = "<b>%s</b>\n%b"
|
||||
|
||||
[urgency_low]
|
||||
background = "#32344a"
|
||||
foreground = "#787c99"
|
||||
timeout = 3
|
||||
|
||||
[urgency_normal]
|
||||
foreground = "#7aa2f7"
|
||||
background = "#32344a"
|
||||
timeout = 5
|
||||
|
||||
[urgency_critical]
|
||||
background = "#32344a"
|
||||
foreground = "#7aa2f7"
|
||||
frame_color = "#ff768e"
|
||||
timeout = 10
|
36
.config/fontconfig/fonts.conf
Executable file
36
.config/fontconfig/fonts.conf
Executable file
|
@ -0,0 +1,36 @@
|
|||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>Linux Libertine</family>
|
||||
<family>Joy Pixels</family>
|
||||
<family>Noto Color Emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>Linux Biolinum</family>
|
||||
<family>Joy Pixels</family>
|
||||
<family>Noto Color Emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans</family>
|
||||
<prefer>
|
||||
<family>Linux Biolinum</family>
|
||||
<family>Joy Pixels</family>
|
||||
<family>Noto Color Emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Fira Code</family>
|
||||
<family>Liberation Mono</family>
|
||||
<family>Braille</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
11
.config/gtk-2.0/gtkfilechooser.ini
Normal file
11
.config/gtk-2.0/gtkfilechooser.ini
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Filechooser Settings]
|
||||
LocationMode=path-bar
|
||||
ShowHidden=false
|
||||
ShowSizeColumn=true
|
||||
GeometryX=2239
|
||||
GeometryY=394
|
||||
GeometryWidth=900
|
||||
GeometryHeight=675
|
||||
SortColumn=name
|
||||
SortOrder=ascending
|
||||
StartupMode=recent
|
19
.config/gtk-2.0/gtkrc-2.0
Normal file
19
.config/gtk-2.0/gtkrc-2.0
Normal file
|
@ -0,0 +1,19 @@
|
|||
# DO NOT EDIT! This file will be overwritten by LXAppearance.
|
||||
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
|
||||
|
||||
include "/home/luca/.gtkrc-2.0.mine"
|
||||
gtk-theme-name="Qogir-Dark"
|
||||
gtk-icon-theme-name="Adwaita"
|
||||
gtk-font-name="Sans 10"
|
||||
gtk-cursor-theme-name="Fluent-dark-cursors"
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle="hintfull"
|
||||
gtk-xft-rgba="none"
|
16
.config/gtk-3.0/settings.ini
Normal file
16
.config/gtk-3.0/settings.ini
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Settings]
|
||||
gtk-theme-name=Qogir-Dark
|
||||
gtk-icon-theme-name=Adwaita
|
||||
gtk-font-name=Sans 10
|
||||
gtk-cursor-theme-name=Fluent-dark-cursors
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintfull
|
||||
gtk-xft-rgba=none
|
171
.config/kitty/kitty.conf
Normal file
171
.config/kitty/kitty.conf
Normal file
|
@ -0,0 +1,171 @@
|
|||
# vim:fileencoding=utf-8:foldmethod=marker
|
||||
|
||||
#: Fonts {{{
|
||||
font_family Fira Code Regular Nerd Font Complete
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
font_size 11.0
|
||||
disable_ligatures always
|
||||
box_drawing_scale 0.001, 1, 1.5, 2
|
||||
#: }}}
|
||||
|
||||
#: Cursor customization {{{
|
||||
cursor #c0caf5
|
||||
cursor_text_color #1a1b26
|
||||
#: }}}
|
||||
|
||||
#: Scrollback {{{
|
||||
scrollback_lines 10000
|
||||
scrollback_pager_history_size 10
|
||||
scrollback_fill_enlarged_window yes
|
||||
#: }}}
|
||||
|
||||
#: Mouse {{{
|
||||
mouse_hide_wait -1
|
||||
url_color #9ece6a
|
||||
#: Mouse actions {{{
|
||||
#: }}}
|
||||
#: }}}
|
||||
|
||||
#: Performance tuning {{{
|
||||
repaint_delay 7
|
||||
input_delay 2
|
||||
#: }}}
|
||||
|
||||
#: Terminal bell {{{
|
||||
enable_audio_bell no
|
||||
window_alert_on_bell yes
|
||||
bell_on_tab ""
|
||||
command_on_bell none
|
||||
#: }}}
|
||||
|
||||
#: Tab bar {{{
|
||||
tab_bar_edge bottom
|
||||
tab_bar_margin_width 0.0
|
||||
tab_bar_margin_height 0.0 0.0
|
||||
tab_bar_style powerline
|
||||
tab_bar_align left
|
||||
tab_bar_min_tabs 1
|
||||
tab_switch_strategy previous
|
||||
tab_powerline_style slanted
|
||||
tab_activity_symbol ""
|
||||
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}"
|
||||
active_tab_foreground #3d59a1
|
||||
active_tab_background #16161e
|
||||
active_tab_font_style bold
|
||||
inactive_tab_foreground #787c99
|
||||
inactive_tab_background #16161e
|
||||
inactive_tab_font_style normal
|
||||
tab_bar_background #101014
|
||||
#: }}}
|
||||
|
||||
#: Color scheme {{{
|
||||
foreground #a9b1d6
|
||||
background #1a1b26
|
||||
background_opacity 0.8
|
||||
dim_opacity 0.75
|
||||
selection_foreground none
|
||||
selection_background #28344a
|
||||
#: The color table {{{
|
||||
#: black
|
||||
color0 #414868
|
||||
color8 #414868
|
||||
#: red
|
||||
color1 #f7768e
|
||||
color9 #f7768e
|
||||
#: green
|
||||
color2 #73daca
|
||||
color10 #73daca
|
||||
color3 #e0af68
|
||||
color11 #e0af68
|
||||
#: blue
|
||||
color4 #7aa2f7
|
||||
color12 #7aa2f7
|
||||
#: magenta
|
||||
color5 #bb9af7
|
||||
color13 #bb9af7
|
||||
#: cyan
|
||||
color6 #7dcfff
|
||||
color14 #7dcfff
|
||||
#: white
|
||||
color7 #c0caf5
|
||||
color15 #c0caf5
|
||||
#: }}}
|
||||
#: }}}
|
||||
|
||||
#: Advanced {{{
|
||||
close_on_child_death no
|
||||
allow_remote_control no
|
||||
listen_on none
|
||||
#: }}}
|
||||
|
||||
#: OS specific tweaks {{{
|
||||
linux_display_server x11
|
||||
#: }}}
|
||||
|
||||
#: Keyboard shortcuts {{{
|
||||
clear_all_shortcuts no
|
||||
kitty_mod ctrl+shift
|
||||
map kitty_mod+c copy_to_clipboard
|
||||
map kitty_mod+v paste_from_clipboard
|
||||
map kitty_mod+s paste_from_selection
|
||||
#: }}}
|
||||
|
||||
#: Scrolling {{{
|
||||
map kitty_mod+up scroll_line_up
|
||||
map kitty_mod+k scroll_line_up
|
||||
map kitty_mod+down scroll_line_down
|
||||
map kitty_mod+j scroll_line_down
|
||||
map kitty_mod+page_up scroll_page_up
|
||||
map kitty_mod+page_down scroll_page_down
|
||||
map kitty_mod+home scroll_home
|
||||
map kitty_mod+end scroll_end
|
||||
map kitty_mod+z scroll_to_prompt -1
|
||||
map kitty_mod+x scroll_to_prompt 1
|
||||
map kitty_mod+h show_scrollback
|
||||
map kitty_mod+g show_last_command_output
|
||||
#: }}}
|
||||
|
||||
#: Tab management {{{
|
||||
map ctrl+right next_tab
|
||||
map ctrl+tab next_tab
|
||||
map ctrl+left previous_tab
|
||||
map ctrl+shift+tab previous_tab
|
||||
map kitty_mod+t new_tab
|
||||
map kitty_mod+q close_tab
|
||||
map kitty_mod+right move_tab_forward
|
||||
map kitty_mod+left move_tab_backward
|
||||
map kitty_mod+alt+t set_tab_title
|
||||
#: }}}
|
||||
|
||||
#: Font sizes {{{
|
||||
map kitty_mod+plus change_font_size all +2.0
|
||||
map kitty_mod+minus change_font_size all -2.0
|
||||
map kitty_mod+backspace change_font_size all 0
|
||||
#: }}}
|
||||
|
||||
#: Select and act on visible text {{{
|
||||
map kitty_mod+e open_url_with_hints
|
||||
map kitty_mod+p>f kitten hints --type path --program -
|
||||
map kitty_mod+p>shift+f kitten hints --type path
|
||||
map kitty_mod+p>l kitten hints --type line --program -
|
||||
map kitty_mod+p>w kitten hints --type word --program -
|
||||
map kitty_mod+p>h kitten hints --type hash --program -
|
||||
map kitty_mod+p>n kitten hints --type linenum
|
||||
map kitty_mod+p>y kitten hints --type hyperlink
|
||||
#: }}}
|
||||
|
||||
#: Miscellaneous {{{
|
||||
map kitty_mod+u kitten unicode_input
|
||||
map kitty_mod+f2 edit_config_file
|
||||
map kitty_mod+escape kitty_shell tab
|
||||
map kitty_mod+a>m set_background_opacity +0.1
|
||||
map kitty_mod+a>l set_background_opacity -0.1
|
||||
map kitty_mod+a>1 set_background_opacity 1
|
||||
map kitty_mod+a>d set_background_opacity default
|
||||
map kitty_mod+delete clear_terminal reset active
|
||||
map kitty_mod+f5 load_config_file
|
||||
#: }}}
|
||||
|
||||
#: }}}
|
4
.config/lf/cleaner
Executable file
4
.config/lf/cleaner
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
if [ -n "$FIFO_UEBERZUG" ]; then
|
||||
printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
|
||||
fi
|
123
.config/lf/lfrc
Normal file
123
.config/lf/lfrc
Normal file
|
@ -0,0 +1,123 @@
|
|||
set ratios 1:2:4
|
||||
|
||||
# Basic vars
|
||||
set shellopts '-eu'
|
||||
set ifs "\n"
|
||||
set scrolloff 10
|
||||
set icons
|
||||
set period 1
|
||||
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
||||
set previewer ~/.config/lf/preview
|
||||
set cleaner ~/.config/lf/cleaner
|
||||
|
||||
# cmds/functions
|
||||
cmd open ${{
|
||||
case $(file --mime-type "$(readlink -f $f)" -b) in
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
|
||||
image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
text/*|application/json|inode/x-empty) $EDITOR $fx;;
|
||||
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||
image/svg+xml) display -- $f ;;
|
||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
|
||||
setsid -f sxiv -aio 2>/dev/null | while read -r file; do
|
||||
[ -z "$file" ] && continue
|
||||
lf -remote "send select \"$file\""
|
||||
lf -remote "send toggle"
|
||||
done &
|
||||
;;
|
||||
audio/*) mpv --audio-display=no $f ;;
|
||||
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
|
||||
application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
application/pgp-encrypted) $EDITOR $fx ;;
|
||||
*) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
|
||||
esac
|
||||
}}
|
||||
|
||||
cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
|
||||
|
||||
cmd extract ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "extract?[y/N]"
|
||||
read ans
|
||||
[ $ans = "y" ] && aunpack $fx
|
||||
}}
|
||||
|
||||
cmd delete ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "delete?[y/N]"
|
||||
read ans
|
||||
[ $ans = "y" ] && rm -rf -- $fx
|
||||
}}
|
||||
|
||||
cmd moveto ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
clear; echo "Move to where?"
|
||||
dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
|
||||
for x in $fx; do
|
||||
eval mv -iv \"$x\" \"$dest\"
|
||||
done &&
|
||||
notify-send "File(s) moved." "File(s) moved to $dest."
|
||||
}}
|
||||
|
||||
cmd copyto ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
clear; echo "Copy to where?"
|
||||
dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
|
||||
for x in $fx; do
|
||||
eval cp -ivr \"$x\" \"$dest\"
|
||||
done &&
|
||||
notify-send "File(s) copied." "File(s) copies to $dest."
|
||||
}}
|
||||
|
||||
cmd rsyncto ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
clear; echo "rsync to where?"
|
||||
read dest
|
||||
for x in $fx; do
|
||||
eval rsync -aAXHv \"$x\" \"$dest\"
|
||||
done &&
|
||||
notify-send "File(s) rsynced." "File(s) copies to $dest."
|
||||
}}
|
||||
|
||||
cmd setbg "$1"
|
||||
cmd bulkrename $vidir
|
||||
|
||||
# Bindings
|
||||
map <c-f> $lf -remote "send $id select '$(fzf)'"
|
||||
map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)"
|
||||
map D delete
|
||||
map E extract
|
||||
map C copyto
|
||||
map R rsyncto
|
||||
map M moveto
|
||||
map <c-n> push :mkdir<space>
|
||||
map <c-r> reload
|
||||
map <c-s> set hidden!
|
||||
map <enter> shell
|
||||
map x $$f
|
||||
map X !$f
|
||||
map o &mimeopen $f
|
||||
map O $mimeopen --ask $f
|
||||
|
||||
map A rename # at the very end
|
||||
map c push A<c-u> # new rename
|
||||
map I push A<c-a> # at the very beginning
|
||||
map i push A<a-b><a-b><a-f> # before extention
|
||||
map a push A<a-b> # after extention
|
||||
map B bulkrename
|
||||
|
||||
map <c-e> down
|
||||
map <c-y> up
|
||||
map V push :!$EDITOR<space>
|
||||
|
||||
map W $setsid -f $TERMINAL >/dev/null 2>&1
|
||||
|
||||
# Source Bookmarks
|
||||
source "~/.config/lf/shortcutrc"
|
76
.config/lf/preview
Executable file
76
.config/lf/preview
Executable file
|
@ -0,0 +1,76 @@
|
|||
#!/bin/sh
|
||||
|
||||
image() {
|
||||
if [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
|
||||
printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG"
|
||||
exit 1
|
||||
else
|
||||
chafa "$1" -s "$4x"
|
||||
fi
|
||||
}
|
||||
|
||||
batorcat() {
|
||||
file="$1"
|
||||
shift
|
||||
if command -v bat > /dev/null 2>&1
|
||||
then
|
||||
bat --color=always --style=plain --pager=never "$file" "$@"
|
||||
else
|
||||
cat "$file"
|
||||
fi
|
||||
}
|
||||
|
||||
CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}'))"
|
||||
|
||||
case "$(printf "%s\n" "$(readlink -f "$1")" | awk '{print tolower($0)}')" in
|
||||
*.tgz|*.tar.gz) tar tzf "$1" ;;
|
||||
*.tar.bz2|*.tbz2) tar tjf "$1" ;;
|
||||
*.tar.txz|*.txz) xz --list "$1" ;;
|
||||
*.tar) tar tf "$1" ;;
|
||||
*.zip|*.jar|*.war|*.ear|*.oxt) unzip -l "$1" ;;
|
||||
*.rar) unrar l "$1" ;;
|
||||
*.7z) 7z l "$1" ;;
|
||||
*.[1-8]) man "$1" | col -b ;;
|
||||
*.o) nm "$1";;
|
||||
*.torrent) transmission-show "$1" ;;
|
||||
*.iso) iso-info --no-header -l "$1" ;;
|
||||
*.odt|*.ods|*.odp|*.sxw) odt2txt "$1" ;;
|
||||
*.doc) catdoc "$1" ;;
|
||||
*.docx) docx2txt "$1" - ;;
|
||||
*.xls|*.xlsx)
|
||||
ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv
|
||||
;;
|
||||
*.wav|*.mp3|*.flac|*.m4a|*.wma|*.ape|*.ac3|*.og[agx]|*.spx|*.opus|*.as[fx]|*.mka)
|
||||
exiftool "$1"
|
||||
;;
|
||||
*.pdf)
|
||||
[ ! -f "${CACHE}.jpg" ] && \
|
||||
pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
|
||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*.epub)
|
||||
[ ! -f "$CACHE" ] && \
|
||||
epub-thumbnailer "$1" "$CACHE" 1024
|
||||
image "$CACHE" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*.html)
|
||||
[ ! -f "$CACHE" ] && \
|
||||
wkhtmltopdf "$1" - | pdftoppm -jpeg -f 1 -singlefile - "$CACHE"
|
||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.ts|*.mts|*.m4v|*.r[am]|*.qt|*.divx)
|
||||
[ ! -f "${CACHE}.jpg" ] && \
|
||||
ffmpegthumbnailer -i "$1" -o "${CACHE}.jpg" -s 0 -q 5
|
||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.gif|*.jfif)
|
||||
image "$1" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*.ino)
|
||||
batorcat --language=cpp "$1"
|
||||
;;
|
||||
*)
|
||||
batorcat "$1"
|
||||
;;
|
||||
esac
|
||||
exit 0
|
30
.config/lf/shortcutrc
Normal file
30
.config/lf/shortcutrc
Normal file
|
@ -0,0 +1,30 @@
|
|||
map Ctr cd "/home/luca/.local/share"
|
||||
map Ccac cd "/home/luca/.cache"
|
||||
map Ccf cd "/home/luca/.config"
|
||||
map CD cd "/home/luca/Downloads"
|
||||
map Cd cd "/home/luca/Documents"
|
||||
map Cdt cd "/home/luca/.local/share"
|
||||
map Crr cd "/home/luca/.local/src"
|
||||
map Ch cd "/home/luca"
|
||||
map Cm cd "/home/luca/Music"
|
||||
map Cmn cd "/mnt"
|
||||
map Cpp cd "/home/luca/Pictures"
|
||||
map Csc cd "/home/luca/.local/bin"
|
||||
map Csrc cd "/home/luca/.local/src"
|
||||
map Cvv cd "/home/luca/Videos"
|
||||
map Ebf $$EDITOR "/home/luca/.config/shell/bm-files"
|
||||
map Ebd $$EDITOR "/home/luca/.config/shell/bm-dirs"
|
||||
map Ecfx $$EDITOR "/home/luca/.config/x11/xresources"
|
||||
map Ecfb $$EDITOR "~/.local/src/dwmblocks/config.h"
|
||||
map Ecfv $$EDITOR "/home/luca/.config/nvim/init.vim"
|
||||
map Ecfz $$EDITOR "/home/luca/.config/zsh/.zshrc"
|
||||
map Ecfa $$EDITOR "/home/luca/.config/shell/aliasrc"
|
||||
map Ecfp $$EDITOR "/home/luca/.config/shell/profile"
|
||||
map Ecfm $$EDITOR "/home/luca/.config/mutt/muttrc"
|
||||
map Ecfn $$EDITOR "/home/luca/.config/newsboat/config"
|
||||
map Ecfu $$EDITOR "/home/luca/.config/newsboat/urls"
|
||||
map Ecfmb $$EDITOR "/home/luca/.config/ncmpcpp/bindings"
|
||||
map Ecfmc $$EDITOR "/home/luca/.config/ncmpcpp/config"
|
||||
map Ecfl $$EDITOR "/home/luca/.config/lf/lfrc"
|
||||
map EcfL $$EDITOR "/home/luca/.config/lf/scope"
|
||||
map EcfX $$EDITOR "/home/luca/.config/sxiv/exec/key-handler"
|
173
.config/lvim/config.lua
Normal file
173
.config/lvim/config.lua
Normal file
|
@ -0,0 +1,173 @@
|
|||
-- general
|
||||
lvim.log.level = "warn"
|
||||
lvim.colorscheme = "tokyonight"
|
||||
lvim.transparent_window = true
|
||||
vim.opt.undodir = vim.fn.stdpath "cache" .. "/undo"
|
||||
vim.opt.undofile = true
|
||||
vim.opt.titlestring = "%<%F%=%l/%L - nvim"
|
||||
|
||||
-- Lualine
|
||||
lvim.builtin.lualine.style = "none"
|
||||
local components = require "lvim.core.lualine.components"
|
||||
local colors = require "lvim.core.lualine.colors"
|
||||
components.scrollbar = {
|
||||
function()
|
||||
local current_line = vim.fn.line "."
|
||||
local total_lines = vim.fn.line "$"
|
||||
local chars = { "", "", "", "", "", "", "", "", "", "", "", "", "" }
|
||||
-- local chars = { "⠁", "⠉", "⠋", "⠛", "⠟", "⠿" }
|
||||
-- local chars = { "▒░░░░", "█▒░░░", "▒█▒░░", "░▒█▒░",
|
||||
-- "░░▒█▒", "░░░▒█", "░░░░▒" }
|
||||
local line_ratio = current_line / total_lines
|
||||
local index = math.ceil(line_ratio * #chars)
|
||||
return chars[index]
|
||||
end,
|
||||
color = { fg = colors.yellow },
|
||||
cond = nil,
|
||||
}
|
||||
lvim.builtin.lualine.options = {
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
}
|
||||
lvim.builtin.lualine.sections = {
|
||||
lualine_a = { components.filename },
|
||||
lualine_b = { components.scrollbar, components.location },
|
||||
lualine_c = { components.branch, components.diff },
|
||||
lualine_x = { components.python_env, components.spaces },
|
||||
lualine_y = { components.treesitter, components.diagnostics, components.lsp },
|
||||
lualine_z = { components.encoding, components.filetype },
|
||||
}
|
||||
|
||||
|
||||
-- keymappings [view all the defaults by pressing <leader>Lk]
|
||||
lvim.leader = "space"
|
||||
-- add your own keymapping
|
||||
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
|
||||
-- Change Telescope navigation to use j and k for navigation and n and p for history in both input and normal mode.
|
||||
-- we use protected-mode (pcall) just in case the plugin wasn't loaded yet.
|
||||
local _, actions = pcall(require, "telescope.actions")
|
||||
lvim.builtin.telescope.defaults.mappings = {
|
||||
-- for input mode
|
||||
i = {
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
["<C-n>"] = actions.cycle_history_next,
|
||||
["<C-p>"] = actions.cycle_history_prev,
|
||||
},
|
||||
-- for normal mode
|
||||
n = {
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
},
|
||||
}
|
||||
|
||||
lvim.builtin.which_key.mappings["e"] = { "<cmd>LfNewTab<CR>", "Explorer" }
|
||||
|
||||
-- Use which-key to add extra bindings with the leader-key prefix
|
||||
-- lvim.builtin.which_key.mappings["P"] = { "<cmd>Telescope projects<CR>", "Projects" }
|
||||
-- lvim.builtin.which_key.mappings["t"] = {
|
||||
-- name = "+Trouble",
|
||||
-- r = { "<cmd>Trouble lsp_references<cr>", "References" },
|
||||
-- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
|
||||
-- d = { "<cmd>Trouble document_diagnostics<cr>", "Diagnostics" },
|
||||
-- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
|
||||
-- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
|
||||
-- w = { "<cmd>Trouble workspace_diagnostics<cr>", "Wordspace Diagnostics" },
|
||||
-- }
|
||||
|
||||
lvim.builtin.alpha.active = true
|
||||
lvim.builtin.alpha.mode = "dashboard"
|
||||
lvim.builtin.notify.active = true
|
||||
lvim.builtin.terminal.active = true
|
||||
lvim.builtin.nvimtree.setup.view.side = "left"
|
||||
lvim.builtin.nvimtree.setup.renderer.icons.show.git = false
|
||||
|
||||
-- if you don't want all the parsers change this to a table of the ones you want
|
||||
lvim.builtin.treesitter.ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"json",
|
||||
"lua",
|
||||
"python",
|
||||
"yaml",
|
||||
}
|
||||
|
||||
lvim.builtin.treesitter.highlight.enabled = true
|
||||
|
||||
-- generic LSP settings
|
||||
lvim.lsp.automatic_servers_installation = false
|
||||
|
||||
-- set a formatter, this will override the language server formatting capabilities (if it exists)
|
||||
local formatters = require "lvim.lsp.null-ls.formatters"
|
||||
formatters.setup {
|
||||
{ command = "black", filetypes = { "python" } },
|
||||
}
|
||||
|
||||
-- -- set additional linters
|
||||
-- local linters = require "lvim.lsp.null-ls.linters"
|
||||
-- linters.setup {
|
||||
-- { command = "flake8", filetypes = { "python" } },
|
||||
-- }
|
||||
|
||||
-- Additional Plugins
|
||||
lvim.plugins = {
|
||||
{ "folke/tokyonight.nvim" },
|
||||
{ "nacro90/numb.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("numb").setup {
|
||||
show_numbers = true,
|
||||
show_cursorline = true,
|
||||
}
|
||||
end,
|
||||
},
|
||||
{ "sindrets/diffview.nvim",
|
||||
event = "BufRead",
|
||||
},
|
||||
{ "metakirby5/codi.vim",
|
||||
cmd = "Codi",
|
||||
},
|
||||
{ "folke/todo-comments.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("todo-comments").setup()
|
||||
end,
|
||||
},
|
||||
{ "tpope/vim-repeat" },
|
||||
{
|
||||
"felipec/vim-sanegx",
|
||||
event = "BufRead",
|
||||
},
|
||||
-- { "tpope/vim-surround",
|
||||
-- keys = { "c", "d", "y" },
|
||||
-- -- make sure to change the value of `timeoutlen` if it's not triggering correctly, see https://github.com/tpope/vim-surround/issues/117
|
||||
-- setup = function()
|
||||
-- vim.opt.timeoutlen = 500
|
||||
-- end
|
||||
-- },
|
||||
{ "ptzz/lf.vim",
|
||||
config = function()
|
||||
vim.api.nvim_set_var("NERDTreeHijackNetrw", 0)
|
||||
vim.api.nvim_set_var("lf_replace_netrw", 1)
|
||||
vim.api.nvim_set_var("lf_command_override", 'lf -command "set nopreview" -command "set hidden"')
|
||||
end,
|
||||
},
|
||||
{ "voldikss/vim-floaterm" },
|
||||
{ "oberblastmeister/neuron.nvim" },
|
||||
}
|
||||
|
||||
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "zsh",
|
||||
callback = function()
|
||||
-- let treesitter use bash highlight for zsh files as well
|
||||
require("nvim-treesitter.highlight").attach(0, "bash")
|
||||
end
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.cmd("hi FloatermBorder guibg=none")
|
||||
end
|
||||
})
|
0
.config/lvim/ignore
Normal file
0
.config/lvim/ignore
Normal file
433
.config/lvim/plugin/packer_compiled.lua
Normal file
433
.config/lvim/plugin/packer_compiled.lua
Normal file
|
@ -0,0 +1,433 @@
|
|||
-- Automatically generated packer.nvim plugin loader code
|
||||
|
||||
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
||||
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_command('packadd packer.nvim')
|
||||
|
||||
local no_errors, error_msg = pcall(function()
|
||||
|
||||
local time
|
||||
local profile_info
|
||||
local should_profile = false
|
||||
if should_profile then
|
||||
local hrtime = vim.loop.hrtime
|
||||
profile_info = {}
|
||||
time = function(chunk, start)
|
||||
if start then
|
||||
profile_info[chunk] = hrtime()
|
||||
else
|
||||
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
||||
end
|
||||
end
|
||||
else
|
||||
time = function(chunk, start) end
|
||||
end
|
||||
|
||||
local function save_profiles(threshold)
|
||||
local sorted_times = {}
|
||||
for chunk_name, time_taken in pairs(profile_info) do
|
||||
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
||||
end
|
||||
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
||||
local results = {}
|
||||
for i, elem in ipairs(sorted_times) do
|
||||
if not threshold or threshold and elem[2] > threshold then
|
||||
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
||||
end
|
||||
end
|
||||
|
||||
_G._packer = _G._packer or {}
|
||||
_G._packer.profile_output = results
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/luca/.cache/lvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/luca/.cache/lvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/luca/.cache/lvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/luca/.cache/lvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/luca/.cache/lvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
||||
if not string.find(package.path, package_path_str, 1, true) then
|
||||
package.path = package.path .. ';' .. package_path_str
|
||||
end
|
||||
|
||||
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
||||
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], false)
|
||||
time([[try_loadstring definition]], true)
|
||||
local function try_loadstring(s, component, name)
|
||||
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||
if not success then
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||
end)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
time([[try_loadstring definition]], false)
|
||||
time([[Defining packer_plugins]], true)
|
||||
_G.packer_plugins = {
|
||||
["Comment.nvim"] = {
|
||||
after_files = { "/home/luca/.local/share/lunarvim/site/pack/packer/opt/Comment.nvim/after/plugin/Comment.lua" },
|
||||
config = { "\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.comment\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/Comment.nvim",
|
||||
url = "https://github.com/numToStr/Comment.nvim"
|
||||
},
|
||||
["FixCursorHold.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/FixCursorHold.nvim",
|
||||
url = "https://github.com/antoinemadec/FixCursorHold.nvim"
|
||||
},
|
||||
LuaSnip = {
|
||||
config = { "\27LJ\2\nñ\3\0\0\v\0\23\00166\0\0\0'\2\1\0B\0\2\0024\1\0\0006\2\2\0009\2\3\0029\2\4\0029\2\5\0029\2\6\2\15\0\2\0X\3\f€\21\2\1\0\22\2\0\0029\3\a\0006\5\b\0B\5\1\2'\6\t\0'\a\n\0'\b\v\0'\t\f\0'\n\r\0B\3\a\2<\3\2\0019\2\a\0006\4\14\0B\4\1\2'\5\15\0B\2\3\0029\3\16\0\18\5\2\0B\3\2\2\15\0\3\0X\4\3€\21\3\1\0\22\3\0\3<\2\3\0016\3\0\0'\5\17\0B\3\2\0029\3\18\3B\3\1\0016\3\0\0'\5\19\0B\3\2\0029\3\18\0035\5\20\0=\1\21\5B\3\2\0016\3\0\0'\5\22\0B\3\2\0029\3\18\3B\3\1\1K\0\1\0\"luasnip.loaders.from_snipmate\npaths\1\0\0 luasnip.loaders.from_vscode\14lazy_load\29luasnip.loaders.from_lua\17is_directory\rsnippets\19get_config_dir\22friendly-snippets\nstart\vpacker\tpack\tsite\20get_runtime_dir\15join_paths\22friendly_snippets\fsources\fluasnip\fbuiltin\tlvim\15lvim.utils\frequire\2\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/LuaSnip",
|
||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||
},
|
||||
["alpha-nvim"] = {
|
||||
config = { "\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20lvim.core.alpha\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/alpha-nvim",
|
||||
url = "https://github.com/goolord/alpha-nvim"
|
||||
},
|
||||
["bufferline.nvim"] = {
|
||||
config = { "\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.bufferline\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/bufferline.nvim",
|
||||
url = "https://github.com/akinsho/bufferline.nvim"
|
||||
},
|
||||
["cmp-buffer"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/cmp-buffer",
|
||||
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||
},
|
||||
["cmp-nvim-lsp"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
["cmp-path"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/cmp-path",
|
||||
url = "https://github.com/hrsh7th/cmp-path"
|
||||
},
|
||||
cmp_luasnip = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/cmp_luasnip",
|
||||
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||
},
|
||||
["codi.vim"] = {
|
||||
commands = { "Codi" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/codi.vim",
|
||||
url = "https://github.com/metakirby5/codi.vim"
|
||||
},
|
||||
["diffview.nvim"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/diffview.nvim",
|
||||
url = "https://github.com/sindrets/diffview.nvim"
|
||||
},
|
||||
["friendly-snippets"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/friendly-snippets",
|
||||
url = "https://github.com/rafamadriz/friendly-snippets"
|
||||
},
|
||||
["gitsigns.nvim"] = {
|
||||
config = { "\27LJ\2\n@\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\23lvim.core.gitsigns\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/gitsigns.nvim",
|
||||
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||
},
|
||||
["lf.vim"] = {
|
||||
config = { "\27LJ\2\nÓ\1\0\0\4\0\a\0\0196\0\0\0009\0\1\0009\0\2\0'\2\3\0)\3\0\0B\0\3\0016\0\0\0009\0\1\0009\0\2\0'\2\4\0)\3\1\0B\0\3\0016\0\0\0009\0\1\0009\0\2\0'\2\5\0'\3\6\0B\0\3\1K\0\1\0006lf -command \"set nopreview\" -command \"set hidden\"\24lf_command_override\21lf_replace_netrw\24NERDTreeHijackNetrw\17nvim_set_var\bapi\bvim\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/lf.vim",
|
||||
url = "https://github.com/ptzz/lf.vim"
|
||||
},
|
||||
["lua-dev.nvim"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/lua-dev.nvim",
|
||||
url = "https://github.com/max397574/lua-dev.nvim"
|
||||
},
|
||||
["lualine.nvim"] = {
|
||||
config = { "\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.lualine\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/lualine.nvim",
|
||||
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||
},
|
||||
["neuron.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/neuron.nvim",
|
||||
url = "https://github.com/oberblastmeister/neuron.nvim"
|
||||
},
|
||||
["nlsp-settings.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/nlsp-settings.nvim",
|
||||
url = "https://github.com/tamago324/nlsp-settings.nvim"
|
||||
},
|
||||
["null-ls.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/null-ls.nvim",
|
||||
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
|
||||
},
|
||||
["numb.nvim"] = {
|
||||
config = { "\27LJ\2\nX\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\2\17show_numbers\2\20show_cursorline\2\nsetup\tnumb\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/numb.nvim",
|
||||
url = "https://github.com/nacro90/numb.nvim"
|
||||
},
|
||||
["nvim-autopairs"] = {
|
||||
config = { "\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.autopairs\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/nvim-autopairs",
|
||||
url = "https://github.com/windwp/nvim-autopairs"
|
||||
},
|
||||
["nvim-cmp"] = {
|
||||
config = { "\27LJ\2\n`\0\0\3\0\6\0\v6\0\0\0009\0\1\0009\0\2\0\15\0\0\0X\1\5€6\0\3\0'\2\4\0B\0\2\0029\0\5\0B\0\1\1K\0\1\0\nsetup\18lvim.core.cmp\frequire\bcmp\fbuiltin\tlvim\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/nvim-cmp",
|
||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||
},
|
||||
["nvim-lsp-installer"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/nvim-lsp-installer",
|
||||
url = "https://github.com/williamboman/nvim-lsp-installer"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/nvim-lspconfig",
|
||||
url = "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
["nvim-notify"] = {
|
||||
config = { "\27LJ\2\n>\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\21lvim.core.notify\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/nvim-notify",
|
||||
url = "https://github.com/rcarriga/nvim-notify"
|
||||
},
|
||||
["nvim-tree.lua"] = {
|
||||
config = { "\27LJ\2\n@\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\23lvim.core.nvimtree\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/nvim-tree.lua",
|
||||
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
config = { "\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.treesitter\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/nvim-treesitter",
|
||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
["nvim-ts-context-commentstring"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/nvim-ts-context-commentstring",
|
||||
url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring"
|
||||
},
|
||||
["nvim-web-devicons"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/nvim-web-devicons",
|
||||
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/packer.nvim",
|
||||
url = "https://github.com/wbthomason/packer.nvim"
|
||||
},
|
||||
["plenary.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/plenary.nvim",
|
||||
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
["popup.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/popup.nvim",
|
||||
url = "https://github.com/nvim-lua/popup.nvim"
|
||||
},
|
||||
["project.nvim"] = {
|
||||
config = { "\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.project\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/project.nvim",
|
||||
url = "https://github.com/ahmedkhalf/project.nvim"
|
||||
},
|
||||
["schemastore.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/schemastore.nvim",
|
||||
url = "https://github.com/b0o/schemastore.nvim"
|
||||
},
|
||||
["structlog.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/structlog.nvim",
|
||||
url = "https://github.com/Tastyep/structlog.nvim"
|
||||
},
|
||||
["telescope-fzf-native.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/telescope-fzf-native.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
config = { "\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.telescope\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/telescope.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||
},
|
||||
["todo-comments.nvim"] = {
|
||||
config = { "\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18todo-comments\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/todo-comments.nvim",
|
||||
url = "https://github.com/folke/todo-comments.nvim"
|
||||
},
|
||||
["toggleterm.nvim"] = {
|
||||
config = { "\27LJ\2\n@\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\23lvim.core.terminal\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/toggleterm.nvim",
|
||||
url = "https://github.com/akinsho/toggleterm.nvim"
|
||||
},
|
||||
["tokyonight.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/tokyonight.nvim",
|
||||
url = "https://github.com/folke/tokyonight.nvim"
|
||||
},
|
||||
["vim-floaterm"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/vim-floaterm",
|
||||
url = "https://github.com/voldikss/vim-floaterm"
|
||||
},
|
||||
["vim-repeat"] = {
|
||||
loaded = true,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/vim-repeat",
|
||||
url = "https://github.com/tpope/vim-repeat"
|
||||
},
|
||||
["vim-sanegx"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/vim-sanegx",
|
||||
url = "https://github.com/felipec/vim-sanegx"
|
||||
},
|
||||
["which-key.nvim"] = {
|
||||
config = { "\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.which-key\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/which-key.nvim",
|
||||
url = "https://github.com/max397574/which-key.nvim"
|
||||
}
|
||||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
local module_lazy_loads = {
|
||||
["^lua%-dev"] = "lua-dev.nvim"
|
||||
}
|
||||
local lazy_load_called = {['packer.load'] = true}
|
||||
local function lazy_load_module(module_name)
|
||||
local to_load = {}
|
||||
if lazy_load_called[module_name] then return nil end
|
||||
lazy_load_called[module_name] = true
|
||||
for module_pat, plugin_name in pairs(module_lazy_loads) do
|
||||
if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then
|
||||
to_load[#to_load + 1] = plugin_name
|
||||
end
|
||||
end
|
||||
|
||||
if #to_load > 0 then
|
||||
require('packer.load')(to_load, {module = module_name}, _G.packer_plugins)
|
||||
local loaded_mod = package.loaded[module_name]
|
||||
if loaded_mod then
|
||||
return function(modname) return loaded_mod end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not vim.g.packer_custom_loader_enabled then
|
||||
table.insert(package.loaders, 1, lazy_load_module)
|
||||
vim.g.packer_custom_loader_enabled = true
|
||||
end
|
||||
|
||||
-- Config for: lf.vim
|
||||
time([[Config for lf.vim]], true)
|
||||
try_loadstring("\27LJ\2\nÓ\1\0\0\4\0\a\0\0196\0\0\0009\0\1\0009\0\2\0'\2\3\0)\3\0\0B\0\3\0016\0\0\0009\0\1\0009\0\2\0'\2\4\0)\3\1\0B\0\3\0016\0\0\0009\0\1\0009\0\2\0'\2\5\0'\3\6\0B\0\3\1K\0\1\0006lf -command \"set nopreview\" -command \"set hidden\"\24lf_command_override\21lf_replace_netrw\24NERDTreeHijackNetrw\17nvim_set_var\bapi\bvim\0", "config", "lf.vim")
|
||||
time([[Config for lf.vim]], false)
|
||||
-- Config for: nvim-tree.lua
|
||||
time([[Config for nvim-tree.lua]], true)
|
||||
try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\23lvim.core.nvimtree\frequire\0", "config", "nvim-tree.lua")
|
||||
time([[Config for nvim-tree.lua]], false)
|
||||
-- Config for: LuaSnip
|
||||
time([[Config for LuaSnip]], true)
|
||||
try_loadstring("\27LJ\2\nñ\3\0\0\v\0\23\00166\0\0\0'\2\1\0B\0\2\0024\1\0\0006\2\2\0009\2\3\0029\2\4\0029\2\5\0029\2\6\2\15\0\2\0X\3\f€\21\2\1\0\22\2\0\0029\3\a\0006\5\b\0B\5\1\2'\6\t\0'\a\n\0'\b\v\0'\t\f\0'\n\r\0B\3\a\2<\3\2\0019\2\a\0006\4\14\0B\4\1\2'\5\15\0B\2\3\0029\3\16\0\18\5\2\0B\3\2\2\15\0\3\0X\4\3€\21\3\1\0\22\3\0\3<\2\3\0016\3\0\0'\5\17\0B\3\2\0029\3\18\3B\3\1\0016\3\0\0'\5\19\0B\3\2\0029\3\18\0035\5\20\0=\1\21\5B\3\2\0016\3\0\0'\5\22\0B\3\2\0029\3\18\3B\3\1\1K\0\1\0\"luasnip.loaders.from_snipmate\npaths\1\0\0 luasnip.loaders.from_vscode\14lazy_load\29luasnip.loaders.from_lua\17is_directory\rsnippets\19get_config_dir\22friendly-snippets\nstart\vpacker\tpack\tsite\20get_runtime_dir\15join_paths\22friendly_snippets\fsources\fluasnip\fbuiltin\tlvim\15lvim.utils\frequire\2\0", "config", "LuaSnip")
|
||||
time([[Config for LuaSnip]], false)
|
||||
-- Config for: nvim-cmp
|
||||
time([[Config for nvim-cmp]], true)
|
||||
try_loadstring("\27LJ\2\n`\0\0\3\0\6\0\v6\0\0\0009\0\1\0009\0\2\0\15\0\0\0X\1\5€6\0\3\0'\2\4\0B\0\2\0029\0\5\0B\0\1\1K\0\1\0\nsetup\18lvim.core.cmp\frequire\bcmp\fbuiltin\tlvim\0", "config", "nvim-cmp")
|
||||
time([[Config for nvim-cmp]], false)
|
||||
-- Config for: project.nvim
|
||||
time([[Config for project.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.project\frequire\0", "config", "project.nvim")
|
||||
time([[Config for project.nvim]], false)
|
||||
-- Config for: alpha-nvim
|
||||
time([[Config for alpha-nvim]], true)
|
||||
try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20lvim.core.alpha\frequire\0", "config", "alpha-nvim")
|
||||
time([[Config for alpha-nvim]], false)
|
||||
-- Config for: telescope.nvim
|
||||
time([[Config for telescope.nvim]], true)
|
||||
try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.telescope\frequire\0", "config", "telescope.nvim")
|
||||
time([[Config for telescope.nvim]], false)
|
||||
-- Config for: nvim-notify
|
||||
time([[Config for nvim-notify]], true)
|
||||
try_loadstring("\27LJ\2\n>\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\21lvim.core.notify\frequire\0", "config", "nvim-notify")
|
||||
time([[Config for nvim-notify]], false)
|
||||
-- Config for: lualine.nvim
|
||||
time([[Config for lualine.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.lualine\frequire\0", "config", "lualine.nvim")
|
||||
time([[Config for lualine.nvim]], false)
|
||||
-- Config for: nvim-autopairs
|
||||
time([[Config for nvim-autopairs]], true)
|
||||
try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.autopairs\frequire\0", "config", "nvim-autopairs")
|
||||
time([[Config for nvim-autopairs]], false)
|
||||
-- Config for: nvim-treesitter
|
||||
time([[Config for nvim-treesitter]], true)
|
||||
try_loadstring("\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.treesitter\frequire\0", "config", "nvim-treesitter")
|
||||
time([[Config for nvim-treesitter]], false)
|
||||
|
||||
-- Command lazy-loads
|
||||
time([[Defining lazy-load commands]], true)
|
||||
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Codi lua require("packer.load")({'codi.vim'}, { cmd = "Codi", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||
time([[Defining lazy-load commands]], false)
|
||||
|
||||
vim.cmd [[augroup packer_load_aucmds]]
|
||||
vim.cmd [[au!]]
|
||||
-- Event lazy-loads
|
||||
time([[Defining lazy-load event autocommands]], true)
|
||||
vim.cmd [[au BufRead * ++once lua require("packer.load")({'vim-sanegx', 'diffview.nvim', 'gitsigns.nvim', 'todo-comments.nvim', 'numb.nvim', 'Comment.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au BufReadPost * ++once lua require("packer.load")({'nvim-ts-context-commentstring'}, { event = "BufReadPost *" }, _G.packer_plugins)]]
|
||||
vim.cmd [[au BufWinEnter * ++once lua require("packer.load")({'toggleterm.nvim', 'which-key.nvim', 'bufferline.nvim'}, { event = "BufWinEnter *" }, _G.packer_plugins)]]
|
||||
time([[Defining lazy-load event autocommands]], false)
|
||||
vim.cmd("augroup END")
|
||||
if should_profile then save_profiles() end
|
||||
|
||||
end)
|
||||
|
||||
if not no_errors then
|
||||
error_msg = error_msg:gsub('"', '\\"')
|
||||
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||
end
|
21
.config/mimeapps.list
Normal file
21
.config/mimeapps.list
Normal file
|
@ -0,0 +1,21 @@
|
|||
[Default Applications]
|
||||
text/x-shellscript=text.desktop;
|
||||
x-scheme-handler/magnet=torrent.desktop;
|
||||
application/x-bittorrent=torrent.desktop;
|
||||
x-scheme-handler/mailto=userapp-Thunderbird-2FQGG1.desktop
|
||||
text/plain=text.desktop;
|
||||
application/postscript=pdf.desktop;
|
||||
application/pdf=pdf.desktop;
|
||||
image/png=img.desktop;
|
||||
image/jpeg=img.desktop;
|
||||
image/gif=img.desktop;
|
||||
application/rss+xml=rss.desktop
|
||||
video/x-matroska=video.desktop
|
||||
x-scheme-handler/lbry=lbry.desktop
|
||||
inode/directory=file.desktop
|
||||
message/rfc822=userapp-Thunderbird-2FQGG1.desktop
|
||||
x-scheme-handler/mid=userapp-Thunderbird-2FQGG1.desktop
|
||||
|
||||
[Added Associations]
|
||||
x-scheme-handler/mailto=userapp-Thunderbird-2FQGG1.desktop;
|
||||
x-scheme-handler/mid=userapp-Thunderbird-2FQGG1.desktop;
|
21
.config/mpd/mpd.conf
Normal file
21
.config/mpd/mpd.conf
Normal file
|
@ -0,0 +1,21 @@
|
|||
music_directory "~/Music"
|
||||
playlist_directory "~/.config/mpd/playlists"
|
||||
|
||||
auto_update "yes"
|
||||
bind_to_address "127.0.0.1"
|
||||
restore_paused "yes"
|
||||
max_output_buffer_size "16384"
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "pulse"
|
||||
#type "alsa"
|
||||
#name "ALSA"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "Visualizer feed"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:2"
|
||||
}
|
5
.config/mpv/input.conf
Normal file
5
.config/mpv/input.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
l seek 5
|
||||
h seek -5
|
||||
j seek -60
|
||||
k seek 60
|
||||
S cycle sub
|
3
.config/mpv/scripts/modules.lua
Normal file
3
.config/mpv/scripts/modules.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
local mpv_config_dir_path = require("mp").command_native({"expand-path", "~~/"})
|
||||
function load(relative_path) dofile(mpv_config_dir_path .. "/script_modules/" .. relative_path) end
|
||||
load("mpvSockets/mpvSockets.lua")
|
479
.config/ncmpcpp/bindings
Normal file
479
.config/ncmpcpp/bindings
Normal file
|
@ -0,0 +1,479 @@
|
|||
##############################################################
|
||||
## This is the example bindings file. Copy it to ##
|
||||
## ~/.ncmpcpp/bindings or $XDG_CONFIG_HOME/ncmpcpp/bindings ##
|
||||
## and set up your preferences ##
|
||||
##############################################################
|
||||
#
|
||||
#def_key "mouse"
|
||||
# mouse_event
|
||||
#
|
||||
#def_key "up"
|
||||
# scroll_up
|
||||
#
|
||||
#def_key "shift-up"
|
||||
# select_item
|
||||
# scroll_up
|
||||
#
|
||||
#def_key "down"
|
||||
# scroll_down
|
||||
#
|
||||
#def_key "shift-down"
|
||||
# select_item
|
||||
# scroll_down
|
||||
#
|
||||
#def_key "["
|
||||
# scroll_up_album
|
||||
#
|
||||
#def_key "]"
|
||||
# scroll_down_album
|
||||
#
|
||||
#def_key "{"
|
||||
# scroll_up_artist
|
||||
#
|
||||
#def_key "}"
|
||||
# scroll_down_artist
|
||||
#
|
||||
#def_key "page_up"
|
||||
# page_up
|
||||
#
|
||||
#def_key "page_down"
|
||||
# page_down
|
||||
#
|
||||
#def_key "home"
|
||||
# move_home
|
||||
#
|
||||
#def_key "end"
|
||||
# move_end
|
||||
#
|
||||
#def_key "insert"
|
||||
# select_item
|
||||
#
|
||||
#def_key "enter"
|
||||
# enter_directory
|
||||
#
|
||||
#def_key "enter"
|
||||
# toggle_output
|
||||
#
|
||||
#def_key "enter"
|
||||
# run_action
|
||||
#
|
||||
#def_key "enter"
|
||||
# play_item
|
||||
#
|
||||
#def_key "space"
|
||||
# add_item_to_playlist
|
||||
#
|
||||
#def_key "space"
|
||||
# toggle_lyrics_update_on_song_change
|
||||
#
|
||||
#def_key "space"
|
||||
# toggle_visualization_type
|
||||
#
|
||||
#def_key "delete"
|
||||
# delete_playlist_items
|
||||
#
|
||||
#def_key "delete"
|
||||
# delete_browser_items
|
||||
#
|
||||
#def_key "delete"
|
||||
# delete_stored_playlist
|
||||
#
|
||||
#def_key "right"
|
||||
# next_column
|
||||
#
|
||||
#def_key "right"
|
||||
# slave_screen
|
||||
#
|
||||
#def_key "right"
|
||||
# volume_up
|
||||
#
|
||||
#def_key "+"
|
||||
# volume_up
|
||||
#
|
||||
#def_key "left"
|
||||
# previous_column
|
||||
#
|
||||
#def_key "left"
|
||||
# master_screen
|
||||
#
|
||||
#def_key "left"
|
||||
# volume_down
|
||||
#
|
||||
#def_key "-"
|
||||
# volume_down
|
||||
#
|
||||
#def_key ":"
|
||||
# execute_command
|
||||
#
|
||||
#def_key "tab"
|
||||
# next_screen
|
||||
#
|
||||
#def_key "shift-tab"
|
||||
# previous_screen
|
||||
#
|
||||
#def_key "f1"
|
||||
# show_help
|
||||
#
|
||||
#def_key "1"
|
||||
# show_playlist
|
||||
#
|
||||
#def_key "2"
|
||||
# show_browser
|
||||
#
|
||||
#def_key "2"
|
||||
# change_browse_mode
|
||||
#
|
||||
#def_key "3"
|
||||
# show_search_engine
|
||||
#
|
||||
#def_key "3"
|
||||
# reset_search_engine
|
||||
#
|
||||
#def_key "4"
|
||||
# show_media_library
|
||||
#
|
||||
#def_key "4"
|
||||
# toggle_media_library_columns_mode
|
||||
#
|
||||
#def_key "5"
|
||||
# show_playlist_editor
|
||||
#
|
||||
#def_key "6"
|
||||
# show_tag_editor
|
||||
#
|
||||
#def_key "7"
|
||||
# show_outputs
|
||||
#
|
||||
#def_key "8"
|
||||
# show_visualizer
|
||||
#
|
||||
#def_key "="
|
||||
# show_clock
|
||||
#
|
||||
#def_key "@"
|
||||
# show_server_info
|
||||
#
|
||||
#def_key "s"
|
||||
# stop
|
||||
#
|
||||
#def_key "p"
|
||||
# pause
|
||||
#
|
||||
#def_key ">"
|
||||
# next
|
||||
#
|
||||
#def_key "<"
|
||||
# previous
|
||||
#
|
||||
#def_key "ctrl-h"
|
||||
# jump_to_parent_directory
|
||||
#
|
||||
#def_key "ctrl-h"
|
||||
# replay_song
|
||||
#
|
||||
#def_key "backspace"
|
||||
# jump_to_parent_directory
|
||||
#
|
||||
#def_key "backspace"
|
||||
# replay_song
|
||||
#
|
||||
#def_key "f"
|
||||
# seek_forward
|
||||
#
|
||||
#def_key "b"
|
||||
# seek_backward
|
||||
#
|
||||
#def_key "r"
|
||||
# toggle_repeat
|
||||
#
|
||||
#def_key "z"
|
||||
# toggle_random
|
||||
#
|
||||
#def_key "y"
|
||||
# save_tag_changes
|
||||
#
|
||||
#def_key "y"
|
||||
# start_searching
|
||||
#
|
||||
#def_key "y"
|
||||
# toggle_single
|
||||
#
|
||||
#def_key "R"
|
||||
# toggle_consume
|
||||
#
|
||||
#def_key "Y"
|
||||
# toggle_replay_gain_mode
|
||||
#
|
||||
#def_key "T"
|
||||
# toggle_add_mode
|
||||
#
|
||||
#def_key "|"
|
||||
# toggle_mouse
|
||||
#
|
||||
#def_key "#"
|
||||
# toggle_bitrate_visibility
|
||||
#
|
||||
#def_key "Z"
|
||||
# shuffle
|
||||
#
|
||||
#def_key "x"
|
||||
# toggle_crossfade
|
||||
#
|
||||
#def_key "X"
|
||||
# set_crossfade
|
||||
#
|
||||
#def_key "u"
|
||||
# update_database
|
||||
#
|
||||
#def_key "ctrl-s"
|
||||
# sort_playlist
|
||||
#
|
||||
#def_key "ctrl-s"
|
||||
# toggle_browser_sort_mode
|
||||
#
|
||||
#def_key "ctrl-s"
|
||||
# toggle_media_library_sort_mode
|
||||
#
|
||||
#def_key "ctrl-r"
|
||||
# reverse_playlist
|
||||
#
|
||||
#def_key "ctrl-f"
|
||||
# apply_filter
|
||||
#
|
||||
#def_key "ctrl-_"
|
||||
# select_found_items
|
||||
#
|
||||
#def_key "/"
|
||||
# find
|
||||
#
|
||||
#def_key "/"
|
||||
# find_item_forward
|
||||
#
|
||||
#def_key "?"
|
||||
# find
|
||||
#
|
||||
#def_key "?"
|
||||
# find_item_backward
|
||||
#
|
||||
#def_key "."
|
||||
# next_found_item
|
||||
#
|
||||
#def_key ","
|
||||
# previous_found_item
|
||||
#
|
||||
#def_key "w"
|
||||
# toggle_find_mode
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_song
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_library_tag
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_library_album
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_directory_name
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_playlist_name
|
||||
#
|
||||
#def_key "e"
|
||||
# edit_lyrics
|
||||
#
|
||||
#def_key "i"
|
||||
# show_song_info
|
||||
#
|
||||
#def_key "I"
|
||||
# show_artist_info
|
||||
#
|
||||
#def_key "g"
|
||||
# jump_to_position_in_song
|
||||
#
|
||||
#def_key "l"
|
||||
# show_lyrics
|
||||
#
|
||||
#def_key "ctrl-v"
|
||||
# select_range
|
||||
#
|
||||
#def_key "v"
|
||||
# reverse_selection
|
||||
#
|
||||
#def_key "V"
|
||||
# remove_selection
|
||||
#
|
||||
#def_key "B"
|
||||
# select_album
|
||||
#
|
||||
#def_key "a"
|
||||
# add_selected_items
|
||||
#
|
||||
#def_key "c"
|
||||
# clear_playlist
|
||||
#
|
||||
#def_key "c"
|
||||
# clear_main_playlist
|
||||
#
|
||||
#def_key "C"
|
||||
# crop_playlist
|
||||
#
|
||||
#def_key "C"
|
||||
# crop_main_playlist
|
||||
#
|
||||
#def_key "m"
|
||||
# move_sort_order_up
|
||||
#
|
||||
#def_key "m"
|
||||
# move_selected_items_up
|
||||
#
|
||||
#def_key "n"
|
||||
# move_sort_order_down
|
||||
#
|
||||
#def_key "n"
|
||||
# move_selected_items_down
|
||||
#
|
||||
#def_key "M"
|
||||
# move_selected_items_to
|
||||
#
|
||||
#def_key "A"
|
||||
# add
|
||||
#
|
||||
#def_key "S"
|
||||
# save_playlist
|
||||
#
|
||||
#def_key "o"
|
||||
# jump_to_playing_song
|
||||
#
|
||||
#def_key "G"
|
||||
# jump_to_browser
|
||||
#
|
||||
#def_key "G"
|
||||
# jump_to_playlist_editor
|
||||
#
|
||||
#def_key "~"
|
||||
# jump_to_media_library
|
||||
#
|
||||
#def_key "E"
|
||||
# jump_to_tag_editor
|
||||
#
|
||||
#def_key "U"
|
||||
# toggle_playing_song_centering
|
||||
#
|
||||
#def_key "P"
|
||||
# toggle_display_mode
|
||||
#
|
||||
#def_key "\\"
|
||||
# toggle_interface
|
||||
#
|
||||
#def_key "!"
|
||||
# toggle_separators_between_albums
|
||||
#
|
||||
#def_key "L"
|
||||
# toggle_lyrics_fetcher
|
||||
#
|
||||
#def_key "F"
|
||||
# fetch_lyrics_in_background
|
||||
#
|
||||
#def_key "alt-l"
|
||||
# toggle_fetching_lyrics_in_background
|
||||
#
|
||||
#def_key "ctrl-l"
|
||||
# toggle_screen_lock
|
||||
#
|
||||
#def_key "`"
|
||||
# toggle_library_tag_type
|
||||
#
|
||||
#def_key "`"
|
||||
# refetch_lyrics
|
||||
#
|
||||
#def_key "`"
|
||||
# add_random_items
|
||||
#
|
||||
#def_key "ctrl-p"
|
||||
# set_selected_items_priority
|
||||
#
|
||||
#def_key "q"
|
||||
# quit
|
||||
#
|
||||
#
|
||||
#def_key "f"
|
||||
# find
|
||||
#def_key "f"
|
||||
# find_item_forward
|
||||
|
||||
def_key "+"
|
||||
show_clock
|
||||
def_key "="
|
||||
volume_up
|
||||
|
||||
def_key "j"
|
||||
scroll_down
|
||||
def_key "k"
|
||||
scroll_up
|
||||
|
||||
def_key "ctrl-u"
|
||||
page_up
|
||||
#push_characters "kkkkkkkkkkkkkkk"
|
||||
def_key "ctrl-d"
|
||||
page_down
|
||||
#push_characters "jjjjjjjjjjjjjjj"
|
||||
def_key "u"
|
||||
page_up
|
||||
#push_characters "kkkkkkkkkkkkkkk"
|
||||
def_key "d"
|
||||
page_down
|
||||
#push_characters "jjjjjjjjjjjjjjj"
|
||||
def_key "h"
|
||||
previous_column
|
||||
def_key "l"
|
||||
next_column
|
||||
|
||||
def_key "."
|
||||
show_lyrics
|
||||
|
||||
def_key "n"
|
||||
next_found_item
|
||||
def_key "N"
|
||||
previous_found_item
|
||||
|
||||
# not used but bound
|
||||
def_key "J"
|
||||
move_sort_order_down
|
||||
def_key "K"
|
||||
move_sort_order_up
|
||||
def_key "h"
|
||||
jump_to_parent_directory
|
||||
def_key "l"
|
||||
enter_directory
|
||||
def_key "l"
|
||||
run_action
|
||||
def_key "l"
|
||||
play_item
|
||||
def_key "m"
|
||||
show_media_library
|
||||
def_key "m"
|
||||
toggle_media_library_columns_mode
|
||||
def_key "t"
|
||||
show_tag_editor
|
||||
def_key "v"
|
||||
show_visualizer
|
||||
def_key "G"
|
||||
move_end
|
||||
def_key "g"
|
||||
move_home
|
||||
#jump_to_position_in_song
|
||||
def_key "U"
|
||||
update_database
|
||||
def_key "s"
|
||||
reset_search_engine
|
||||
def_key "s"
|
||||
show_search_engine
|
||||
def_key "f"
|
||||
show_browser
|
||||
def_key "f"
|
||||
change_browse_mode
|
||||
def_key "x"
|
||||
delete_playlist_items
|
||||
def_key "P"
|
||||
show_playlist
|
32
.config/ncmpcpp/config
Normal file
32
.config/ncmpcpp/config
Normal file
|
@ -0,0 +1,32 @@
|
|||
# vim: filetype=conf
|
||||
|
||||
ncmpcpp_directory = "~/.config/ncmpcpp"
|
||||
lyrics_directory = "~/.local/share/lyrics"
|
||||
mpd_music_dir = "~/Music"
|
||||
message_delay_time = "1"
|
||||
visualizer_type = "spectrum"
|
||||
song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
|
||||
song_status_format = $b{{$8"%t"}} $3by {$4%a{ $3in $7%b{ (%y)}} $3}|{$8%f}
|
||||
song_library_format = {%n - }{%t}|{%f}
|
||||
alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
|
||||
alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
|
||||
current_item_prefix = $(cyan)$r$b
|
||||
current_item_suffix = $/r$(end)$/b
|
||||
current_item_inactive_column_prefix = $(magenta)$r
|
||||
current_item_inactive_column_suffix = $/r$(end)
|
||||
playlist_display_mode = columns
|
||||
browser_display_mode = columns
|
||||
progressbar_look = ->
|
||||
media_library_primary_tag = album_artist
|
||||
media_library_albums_split_by_date = no
|
||||
startup_screen = "media_library"
|
||||
display_volume_level = no
|
||||
ignore_leading_the = yes
|
||||
external_editor = nvim
|
||||
use_console_editor = yes
|
||||
empty_tag_color = magenta
|
||||
main_window_color = white
|
||||
progressbar_color = black:b
|
||||
progressbar_elapsed_color = blue:b
|
||||
statusbar_color = red
|
||||
statusbar_time_color = cyan:b
|
0
.config/ncmpcpp/error.log
Normal file
0
.config/ncmpcpp/error.log
Normal file
55
.config/newsboat/config
Normal file
55
.config/newsboat/config
Normal file
|
@ -0,0 +1,55 @@
|
|||
#show-read-feeds no
|
||||
auto-reload yes
|
||||
|
||||
external-url-viewer "urlscan -dc -r 'linkhandler {}'"
|
||||
|
||||
bind-key j down
|
||||
bind-key k up
|
||||
bind-key j next articlelist
|
||||
bind-key k prev articlelist
|
||||
bind-key J next-feed articlelist
|
||||
bind-key K prev-feed articlelist
|
||||
bind-key G end
|
||||
bind-key g home
|
||||
bind-key d pagedown
|
||||
bind-key u pageup
|
||||
bind-key l open
|
||||
bind-key h quit
|
||||
bind-key a toggle-article-read
|
||||
bind-key n next-unread
|
||||
bind-key N prev-unread
|
||||
bind-key D pb-download
|
||||
bind-key U show-urls
|
||||
bind-key x pb-delete
|
||||
|
||||
color listnormal cyan default
|
||||
color listfocus black yellow standout bold
|
||||
color listnormal_unread blue default
|
||||
color listfocus_unread yellow default bold
|
||||
color info red black bold
|
||||
color article white default bold
|
||||
|
||||
browser linkhandler
|
||||
macro , open-in-browser
|
||||
macro t set browser "qndl" ; open-in-browser ; set browser linkhandler
|
||||
macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler
|
||||
macro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler
|
||||
macro w set browser "lynx" ; open-in-browser ; set browser linkhandler
|
||||
macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler
|
||||
macro c set browser "echo %u | xclip -r -sel c" ; open-in-browser ; set browser linkhandler
|
||||
macro C set browser "youtube-viewer --comments=%u" ; open-in-browser ; set browser linkhandler
|
||||
macro p set browser "peertubetorrent %u 480" ; open-in-browser ; set browser linkhandler
|
||||
macro P set browser "peertubetorrent %u 1080" ; open-in-browser ; set browser linkhandler
|
||||
|
||||
highlight all "---.*---" yellow
|
||||
highlight feedlist ".*(0/0))" black
|
||||
highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold
|
||||
highlight article "(^Link:.*|^Date:.*)" default default
|
||||
highlight article "https?://[^ ]+" green default
|
||||
highlight article "^(Title):.*$" blue default
|
||||
highlight article "\\[[0-9][0-9]*\\]" magenta default bold
|
||||
highlight article "\\[image\\ [0-9]+\\]" green default bold
|
||||
highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold
|
||||
highlight article ":.*\\(link\\)$" cyan default
|
||||
highlight article ":.*\\(image\\)$" blue default
|
||||
highlight article ":.*\\(embedded flash\\)$" magenta default
|
1
.config/newsboat/urls
Normal file
1
.config/newsboat/urls
Normal file
|
@ -0,0 +1 @@
|
|||
https://www.archlinux.org/feeds/news/ "tech"
|
14
.config/notmuch-config
Normal file
14
.config/notmuch-config
Normal file
|
@ -0,0 +1,14 @@
|
|||
[database]
|
||||
path=.config/claws-mail/imapcache/imap.gmail.com/luca.bilke
|
||||
[user]
|
||||
name=luca.bilke
|
||||
primary_email=luca.bilke@gmail.com
|
||||
[new]
|
||||
tags=unread;inbox;
|
||||
ignore=.mbsyncstate;.uidvalidity
|
||||
[search]
|
||||
exclude_tags=deleted;spam;
|
||||
[maildir]
|
||||
synchronize_flags=true
|
||||
[crypto]
|
||||
gpg_path=gpg
|
2
.config/pam-gnupg
Normal file
2
.config/pam-gnupg
Normal file
|
@ -0,0 +1,2 @@
|
|||
009CC59DF3B1680EAFCB70DE4209DEA679821037
|
||||
65FFD26CAE2D6FC37B8A22E12FF0D706002843D6
|
2
.config/pam_environment
Normal file
2
.config/pam_environment
Normal file
|
@ -0,0 +1,2 @@
|
|||
GNUPGHOME DEFAULT=@{HOME}/.config/gnupg
|
||||
XDG_CONFIG_HOME DEFAULT=@{HOME}/.config
|
5
.config/pinentry/preexec
Executable file
5
.config/pinentry/preexec
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/hint/sh
|
||||
|
||||
# Define additional functionality for pinentry. For example
|
||||
test -e /usr/lib/libgcr-base-3.so.1 && exec /usr/bin/pinentry-gnome3 "$@"
|
||||
#test -e /usr/lib/libQt5Widgets.so.5 && exec /usr/bin/pinentry-qt "$@"
|
247
.config/pipewire/pipewire.conf
Normal file
247
.config/pipewire/pipewire.conf
Normal file
|
@ -0,0 +1,247 @@
|
|||
# Daemon config file for PipeWire version "0.3.40" #
|
||||
#
|
||||
# Copy and edit this file in /etc/pipewire for system-wide changes
|
||||
# or in ~/.config/pipewire for local changes.
|
||||
|
||||
context.properties = {
|
||||
## Configure properties in the system.
|
||||
#library.name.system = support/libspa-support
|
||||
#context.data-loop.library.name.system = support/libspa-support
|
||||
#support.dbus = true
|
||||
#link.max-buffers = 64
|
||||
link.max-buffers = 16 # version < 3 clients can't handle more
|
||||
#mem.warn-mlock = false
|
||||
#mem.allow-mlock = true
|
||||
#mem.mlock-all = false
|
||||
#clock.power-of-two-quantum = true
|
||||
#log.level = 2
|
||||
#cpu.zero.denormals = true
|
||||
|
||||
core.daemon = true # listening for socket connections
|
||||
core.name = pipewire-0 # core name and socket name
|
||||
|
||||
## Properties for the DSP configuration.
|
||||
#default.clock.rate = 48000
|
||||
#default.clock.allowed-rates = [ 48000 ]
|
||||
#default.clock.quantum = 1024
|
||||
#default.clock.min-quantum = 32
|
||||
#default.clock.max-quantum = 8192
|
||||
#default.video.width = 640
|
||||
#default.video.height = 480
|
||||
#default.video.rate.num = 25
|
||||
#default.video.rate.denom = 1
|
||||
#
|
||||
# These overrides are only applied when running in a vm.
|
||||
vm.overrides = {
|
||||
default.clock.min-quantum = 1024
|
||||
}
|
||||
}
|
||||
|
||||
context.spa-libs = {
|
||||
#<factory-name regex> = <library-name>
|
||||
#
|
||||
# Used to find spa factory names. It maps an spa factory name
|
||||
# regular expression to a library name that should contain
|
||||
# that factory.
|
||||
#
|
||||
audio.convert.* = audioconvert/libspa-audioconvert
|
||||
api.alsa.* = alsa/libspa-alsa
|
||||
api.v4l2.* = v4l2/libspa-v4l2
|
||||
api.libcamera.* = libcamera/libspa-libcamera
|
||||
api.bluez5.* = bluez5/libspa-bluez5
|
||||
api.vulkan.* = vulkan/libspa-vulkan
|
||||
api.jack.* = jack/libspa-jack
|
||||
support.* = support/libspa-support
|
||||
#videotestsrc = videotestsrc/libspa-videotestsrc
|
||||
#audiotestsrc = audiotestsrc/libspa-audiotestsrc
|
||||
}
|
||||
|
||||
context.modules = [
|
||||
#{ name = <module-name>
|
||||
# [ args = { <key> = <value> ... } ]
|
||||
# [ flags = [ [ ifexists ] [ nofail ] ]
|
||||
#}
|
||||
#
|
||||
# Loads a module with the given parameters.
|
||||
# If ifexists is given, the module is ignored when it is not found.
|
||||
# If nofail is given, module initialization failures are ignored.
|
||||
#
|
||||
|
||||
# Uses RTKit to boost the data thread priority.
|
||||
{ name = libpipewire-module-rtkit
|
||||
args = {
|
||||
#nice.level = -11
|
||||
#rt.prio = 88
|
||||
#rt.time.soft = 2000000
|
||||
#rt.time.hard = 2000000
|
||||
}
|
||||
flags = [ ifexists nofail ]
|
||||
}
|
||||
|
||||
# Set thread priorities without using RTKit.
|
||||
#{ name = libpipewire-module-rt
|
||||
# args = {
|
||||
# nice.level = -11
|
||||
# rt.prio = 88
|
||||
# rt.time.soft = 2000000
|
||||
# rt.time.hard = 2000000
|
||||
# }
|
||||
# flags = [ ifexists nofail ]
|
||||
#}
|
||||
|
||||
# The native communication protocol.
|
||||
{ name = libpipewire-module-protocol-native }
|
||||
|
||||
# The profile module. Allows application to access profiler
|
||||
# and performance data. It provides an interface that is used
|
||||
# by pw-top and pw-profiler.
|
||||
{ name = libpipewire-module-profiler }
|
||||
|
||||
# Allows applications to create metadata objects. It creates
|
||||
# a factory for Metadata objects.
|
||||
{ name = libpipewire-module-metadata }
|
||||
|
||||
# Creates a factory for making devices that run in the
|
||||
# context of the PipeWire server.
|
||||
{ name = libpipewire-module-spa-device-factory }
|
||||
|
||||
# Creates a factory for making nodes that run in the
|
||||
# context of the PipeWire server.
|
||||
{ name = libpipewire-module-spa-node-factory }
|
||||
|
||||
# Allows creating nodes that run in the context of the
|
||||
# client. Is used by all clients that want to provide
|
||||
# data to PipeWire.
|
||||
{ name = libpipewire-module-client-node }
|
||||
|
||||
# Allows creating devices that run in the context of the
|
||||
# client. Is used by the session manager.
|
||||
{ name = libpipewire-module-client-device }
|
||||
|
||||
# The portal module monitors the PID of the portal process
|
||||
# and tags connections with the same PID as portal
|
||||
# connections.
|
||||
{ name = libpipewire-module-portal
|
||||
flags = [ ifexists nofail ]
|
||||
}
|
||||
|
||||
# The access module can perform access checks and block
|
||||
# new clients.
|
||||
{ name = libpipewire-module-access
|
||||
args = {
|
||||
# access.allowed to list an array of paths of allowed
|
||||
# apps.
|
||||
#access.allowed = [
|
||||
# /usr/bin/pipewire-media-session
|
||||
#]
|
||||
|
||||
# An array of rejected paths.
|
||||
#access.rejected = [ ]
|
||||
|
||||
# An array of paths with restricted access.
|
||||
#access.restricted = [ ]
|
||||
|
||||
# Anything not in the above lists gets assigned the
|
||||
# access.force permission.
|
||||
#access.force = flatpak
|
||||
}
|
||||
}
|
||||
|
||||
# Makes a factory for wrapping nodes in an adapter with a
|
||||
# converter and resampler.
|
||||
{ name = libpipewire-module-adapter }
|
||||
|
||||
# Makes a factory for creating links between ports.
|
||||
{ name = libpipewire-module-link-factory }
|
||||
|
||||
# Provides factories to make session manager objects.
|
||||
{ name = libpipewire-module-session-manager }
|
||||
]
|
||||
|
||||
context.objects = [
|
||||
#{ factory = <factory-name>
|
||||
# [ args = { <key> = <value> ... } ]
|
||||
# [ flags = [ [ nofail ] ]
|
||||
#}
|
||||
#
|
||||
# Creates an object from a PipeWire factory with the given parameters.
|
||||
# If nofail is given, errors are ignored (and no object is created).
|
||||
#
|
||||
#{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc Spa:Pod:Object:Param:Props:patternType = 1 } }
|
||||
#{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
|
||||
#{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } }
|
||||
#{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
|
||||
#{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test } }
|
||||
#{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
|
||||
|
||||
# A default dummy driver. This handles nodes marked with the "node.always-driver"
|
||||
# property when no other driver is currently active. JACK clients need this.
|
||||
{ factory = spa-node-factory
|
||||
args = {
|
||||
factory.name = support.node.driver
|
||||
node.name = Dummy-Driver
|
||||
node.group = pipewire.dummy
|
||||
priority.driver = 20000
|
||||
}
|
||||
}
|
||||
{ factory = spa-node-factory
|
||||
args = {
|
||||
factory.name = support.node.driver
|
||||
node.name = Freewheel-Driver
|
||||
priority.driver = 19000
|
||||
node.group = pipewire.freewheel
|
||||
node.freewheel = true
|
||||
}
|
||||
}
|
||||
# This creates a new Source node. It will have input ports
|
||||
# that you can link, to provide audio for this source.
|
||||
#{ factory = adapter
|
||||
# args = {
|
||||
# factory.name = support.null-audio-sink
|
||||
# node.name = "my-mic"
|
||||
# node.description = "Microphone"
|
||||
# media.class = "Audio/Source/Virtual"
|
||||
# audio.position = "FL,FR"
|
||||
# }
|
||||
#}
|
||||
|
||||
# This creates a single PCM source device for the given
|
||||
# alsa device path hw:0. You can change source to sink
|
||||
# to make a sink in the same way.
|
||||
#{ factory = adapter
|
||||
# args = {
|
||||
# factory.name = api.alsa.pcm.source
|
||||
# node.name = "alsa-source"
|
||||
# node.description = "PCM Source"
|
||||
# media.class = "Audio/Source"
|
||||
# api.alsa.path = "hw:0"
|
||||
# api.alsa.period-size = 1024
|
||||
# api.alsa.headroom = 0
|
||||
# api.alsa.disable-mmap = false
|
||||
# api.alsa.disable-batch = false
|
||||
# audio.format = "S16LE"
|
||||
# audio.rate = 48000
|
||||
# audio.channels = 2
|
||||
# audio.position = "FL,FR"
|
||||
# }
|
||||
#}
|
||||
]
|
||||
|
||||
context.exec = [
|
||||
#{ path = <program-name> [ args = "<arguments>" ] }
|
||||
#
|
||||
# Execute the given program with arguments.
|
||||
#
|
||||
# You can optionally start the session manager here,
|
||||
# but it is better to start it as a systemd service.
|
||||
# Run the session manager with -h for options.
|
||||
#
|
||||
{ path = "/usr/bin/pipewire-media-session" args = "" }
|
||||
#
|
||||
# You can optionally start the pulseaudio-server here as well
|
||||
# but it is better to start it as a systemd service.
|
||||
# It can be interesting to start another daemon here that listens
|
||||
# on another address with the -a option (eg. -a tcp:4713).
|
||||
#
|
||||
{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" }
|
||||
]
|
1
.config/pulse/cookie
Normal file
1
.config/pulse/cookie
Normal file
|
@ -0,0 +1 @@
|
|||
uߎKle2ĹĚvj‹ť»ČŘw˝J@ÓzđëxÓ¨T¤db-–ÇýO¸)ŰDiÓŇçn“<SfŽ
vRz96!Úzt§l"r3ńL‰!Z-./ĺm%čşbN’<4E>wńD–ŮtpâkĺÂů×ŘrŠéú'WŢ–K1Ú÷ŔsW8±ÜXÜjáËôŢ:ĚČśC=Dß!<21>—łQŽˇî“JR™Bd,Ő–ĘĘŞG—…s!Bh]ťĹ`i˛Stwßů8‘őu«“źl4·k=×
GčXëdšOpńźĹÔőĽă÷*}d mHy<48>–oü’ĘKŐx•Ę‡IZ2vPv
|
4
.config/pulse/daemon.conf
Normal file
4
.config/pulse/daemon.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Never exit pulseaudio if idle. This is to deal with an issue of Chromium
|
||||
# browsers not properly starting Pulseaudio by themselves. When the underlying
|
||||
# issue is solved, this file/directory should be removed.
|
||||
exit-idle-time = -1
|
53
.config/shell/aliasrc
Normal file
53
.config/shell/aliasrc
Normal file
|
@ -0,0 +1,53 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Use neovim for vim if present.
|
||||
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
|
||||
|
||||
# Use $XINITRC variable if file exists.
|
||||
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
|
||||
|
||||
# sudo not required for some system commands
|
||||
for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do
|
||||
alias $command="sudo $command"
|
||||
done; unset command
|
||||
|
||||
# Verbosity and settings that you pretty much just always are going to want.
|
||||
alias \
|
||||
cp="cp -iv" \
|
||||
mv="mv -iv" \
|
||||
rm="rm -vI" \
|
||||
bc="bc -ql" \
|
||||
mkd="mkdir -pv" \
|
||||
ffmpeg="ffmpeg -hide_banner" \
|
||||
exa="exa -abghHliS" \
|
||||
claws="claws-mail --alternate-config-dir $CLAWSRC" \
|
||||
lock='slock -m "$(cowsay "$(fortune)" | lolcat -ft)"'
|
||||
|
||||
# Colorize commands when possible.
|
||||
alias \
|
||||
ls="ls -hN --color=auto --group-directories-first" \
|
||||
grep="grep --color=auto" \
|
||||
diff="diff --color=auto" \
|
||||
ccat="highlight --out-format=ansi"
|
||||
|
||||
# These common commands are just too long! Abbreviate them.
|
||||
alias \
|
||||
ka="killall" \
|
||||
g="git" \
|
||||
trem="transmission-remote" \
|
||||
YT="youtube-viewer" \
|
||||
sdn="shutdown -h now" \
|
||||
e="$EDITOR" \
|
||||
v="$EDITOR" \
|
||||
p="pacman" \
|
||||
xi="sudo xbps-install" \
|
||||
xr="sudo xbps-remove -R" \
|
||||
xq="xbps-query" \
|
||||
z="zathura"
|
||||
# Misc.
|
||||
alias \
|
||||
magit="nvim -c MagitOnly" \
|
||||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
||||
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
|
||||
remvirt="virt-manager -c 'qemu+ssh://luca@192.168.178.200/system'" \
|
||||
vim="lvim"
|
15
.config/shell/bm-dirs
Normal file
15
.config/shell/bm-dirs
Normal file
|
@ -0,0 +1,15 @@
|
|||
# You can add comments to these files with #
|
||||
tr ${XDG_DATA_HOME:-$HOME/Trash}
|
||||
cac ${XDG_CACHE_HOME:-$HOME/.cache}
|
||||
cf ${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
|
||||
d ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
|
||||
dt ${XDG_DATA_HOME:-$HOME/.local/share}
|
||||
rr $HOME/.local/src
|
||||
h $HOME
|
||||
m ${XDG_MUSIC_DIR:-$HOME/Music}
|
||||
mn /mnt
|
||||
pp ${XDG_PICTURES_DIR:-$HOME/Pictures}
|
||||
sc $HOME/.local/bin
|
||||
src $HOME/.local/src
|
||||
vv ${XDG_VIDEOS_DIR:-$HOME/Videos}
|
23
.config/shell/bm-files
Normal file
23
.config/shell/bm-files
Normal file
|
@ -0,0 +1,23 @@
|
|||
# These files automatically update when edited/saved in vim:
|
||||
|
||||
# keys filename description
|
||||
bf ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files # This file, a list of bookmarked files
|
||||
bd ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs # A list of bookmarked directories similar to this file
|
||||
cfx ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources # Colors, themes and variables for X11
|
||||
cfb ~/.local/src/dwmblocks/config.h # dwmblocks: the status bar for dwm
|
||||
|
||||
|
||||
# These do not update automatically, but on the next new instance of a program:
|
||||
|
||||
cfv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim # vim/neovim config
|
||||
cfz $ZDOTDIR/.zshrc # zsh (shell) config
|
||||
cfa ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc # aliases used by zsh (and potentially other shells)
|
||||
cfp ${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile # profile file for login settings for zsh
|
||||
cfm ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc # mutt (email client) config
|
||||
cfn ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config # newsboat (RSS reader)
|
||||
cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls # RSS urls for newsboat
|
||||
cfmb ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings # ncmpcpp (music player) keybinds file
|
||||
cfmc ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config # ncmpcpp (music player) config
|
||||
cfl ${XDG_CONFIG_HOME:-$HOME/.config}/lf/lfrc # lf (file browser) config
|
||||
cfL ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope # lf's scope/preview file
|
||||
cfX ${XDG_CONFIG_HOME:-$HOME/.config}/sxiv/exec/key-handler # sxiv (image viewer) key/script handler
|
19
.config/shell/inputrc
Normal file
19
.config/shell/inputrc
Normal file
|
@ -0,0 +1,19 @@
|
|||
$include /etc/inputrc
|
||||
set editing-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
|
||||
# these are for vi-command mode
|
||||
Control-l: clear-screen
|
||||
Control-a: beginning-of-line
|
||||
|
||||
set keymap vi-insert
|
||||
# these are for vi-insert mode
|
||||
Control-l: clear-screen
|
||||
Control-a: beginning-of-line
|
||||
|
||||
$endif
|
230
.config/shell/profile
Normal file
230
.config/shell/profile
Normal file
|
@ -0,0 +1,230 @@
|
|||
#!/bin/zsh
|
||||
|
||||
# profile file. Runs on login. Environmental variables are set here.
|
||||
|
||||
# Adds `~/.local/bin` to $PATH
|
||||
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}"
|
||||
|
||||
# Adds `~/.local/share/npm-global` to $PATH
|
||||
export PATH=~/.npm-global/bin:$PATH
|
||||
|
||||
unsetopt PROMPT_SP
|
||||
|
||||
# Default programs:
|
||||
export EDITOR="lvim"
|
||||
export TERMINAL="st"
|
||||
export BROWSER="firefox"
|
||||
|
||||
# ~/ Clean-up:
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc"
|
||||
# export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
|
||||
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
|
||||
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
|
||||
export LESSHISTFILE="-"
|
||||
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
|
||||
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
|
||||
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
|
||||
# export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc"
|
||||
export GNUPGHOME="${XDG_CONFIG_HOME:-$HOME/.config}/gnupg"
|
||||
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
|
||||
export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
|
||||
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
|
||||
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
|
||||
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
|
||||
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
|
||||
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
|
||||
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
|
||||
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
|
||||
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
|
||||
export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat"
|
||||
export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config"
|
||||
export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum"
|
||||
export CLAWSRC="${XDG_CONFIG_HOME:-$HOME/.config}/claws-mail"
|
||||
|
||||
# Other program settings:
|
||||
export DICS="/usr/share/stardict/dic/"
|
||||
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
|
||||
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
||||
export LESS=-R
|
||||
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
||||
export LESS_TERMCAP_md="$(printf '%b' '[1;36m')"
|
||||
export LESS_TERMCAP_me="$(printf '%b' '[0m')"
|
||||
export LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')"
|
||||
export LESS_TERMCAP_se="$(printf '%b' '[0m')"
|
||||
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
|
||||
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
||||
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
||||
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
|
||||
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
|
||||
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
|
||||
export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible
|
||||
|
||||
# This is the list for lf icons:
|
||||
export LF_ICONS="\
|
||||
tw=:\
|
||||
st=:\
|
||||
ow=:\
|
||||
dt=:\
|
||||
di=:\
|
||||
fi=:\
|
||||
ln=:\
|
||||
or=:\
|
||||
ex=:\
|
||||
*.c=:\
|
||||
*.cc=:\
|
||||
*.clj=:\
|
||||
*.coffee=:\
|
||||
*.cpp=:\
|
||||
*.css=:\
|
||||
*.d=:\
|
||||
*.dart=:\
|
||||
*.erl=:\
|
||||
*.exs=:\
|
||||
*.fs=:\
|
||||
*.go=:\
|
||||
*.h=:\
|
||||
*.hh=:\
|
||||
*.hpp=:\
|
||||
*.hs=:\
|
||||
*.html=:\
|
||||
*.java=:\
|
||||
*.jl=:\
|
||||
*.js=:\
|
||||
*.json=:\
|
||||
*.lua=:\
|
||||
*.md=:\
|
||||
*.php=:\
|
||||
*.pl=:\
|
||||
*.pro=:\
|
||||
*.py=:\
|
||||
*.rb=:\
|
||||
*.rs=:\
|
||||
*.scala=:\
|
||||
*.ts=:\
|
||||
*.vim=:\
|
||||
*.cmd=:\
|
||||
*.ps1=:\
|
||||
*.sh=:\
|
||||
*.bash=:\
|
||||
*.zsh=:\
|
||||
*.fish=:\
|
||||
*.tar=:\
|
||||
*.tgz=:\
|
||||
*.arc=:\
|
||||
*.arj=:\
|
||||
*.taz=:\
|
||||
*.lha=:\
|
||||
*.lz4=:\
|
||||
*.lzh=:\
|
||||
*.lzma=:\
|
||||
*.tlz=:\
|
||||
*.txz=:\
|
||||
*.tzo=:\
|
||||
*.t7z=:\
|
||||
*.zip=:\
|
||||
*.z=:\
|
||||
*.dz=:\
|
||||
*.gz=:\
|
||||
*.lrz=:\
|
||||
*.lz=:\
|
||||
*.lzo=:\
|
||||
*.xz=:\
|
||||
*.zst=:\
|
||||
*.tzst=:\
|
||||
*.bz2=:\
|
||||
*.bz=:\
|
||||
*.tbz=:\
|
||||
*.tbz2=:\
|
||||
*.tz=:\
|
||||
*.deb=:\
|
||||
*.rpm=:\
|
||||
*.jar=:\
|
||||
*.war=:\
|
||||
*.ear=:\
|
||||
*.sar=:\
|
||||
*.rar=:\
|
||||
*.alz=:\
|
||||
*.ace=:\
|
||||
*.zoo=:\
|
||||
*.cpio=:\
|
||||
*.7z=:\
|
||||
*.rz=:\
|
||||
*.cab=:\
|
||||
*.wim=:\
|
||||
*.swm=:\
|
||||
*.dwm=:\
|
||||
*.esd=:\
|
||||
*.jpg=:\
|
||||
*.jpeg=:\
|
||||
*.mjpg=:\
|
||||
*.mjpeg=:\
|
||||
*.gif=:\
|
||||
*.bmp=:\
|
||||
*.pbm=:\
|
||||
*.pgm=:\
|
||||
*.ppm=:\
|
||||
*.tga=:\
|
||||
*.xbm=:\
|
||||
*.xpm=:\
|
||||
*.tif=:\
|
||||
*.tiff=:\
|
||||
*.png=:\
|
||||
*.svg=:\
|
||||
*.svgz=:\
|
||||
*.mng=:\
|
||||
*.pcx=:\
|
||||
*.mov=:\
|
||||
*.mpg=:\
|
||||
*.mpeg=:\
|
||||
*.m2v=:\
|
||||
*.mkv=:\
|
||||
*.webm=:\
|
||||
*.ogm=:\
|
||||
*.mp4=:\
|
||||
*.m4v=:\
|
||||
*.mp4v=:\
|
||||
*.vob=:\
|
||||
*.qt=:\
|
||||
*.nuv=:\
|
||||
*.wmv=:\
|
||||
*.asf=:\
|
||||
*.rm=:\
|
||||
*.rmvb=:\
|
||||
*.flc=:\
|
||||
*.avi=:\
|
||||
*.fli=:\
|
||||
*.flv=:\
|
||||
*.gl=:\
|
||||
*.dl=:\
|
||||
*.xcf=:\
|
||||
*.xwd=:\
|
||||
*.yuv=:\
|
||||
*.cgm=:\
|
||||
*.emf=:\
|
||||
*.ogv=:\
|
||||
*.ogx=:\
|
||||
*.aac=:\
|
||||
*.au=:\
|
||||
*.flac=:\
|
||||
*.m4a=:\
|
||||
*.mid=:\
|
||||
*.midi=:\
|
||||
*.mka=:\
|
||||
*.mp3=:\
|
||||
*.mpc=:\
|
||||
*.ogg=:\
|
||||
*.ra=:\
|
||||
*.wav=:\
|
||||
*.oga=:\
|
||||
*.opus=:\
|
||||
*.spx=:\
|
||||
*.xspf=:\
|
||||
*.pdf=:\
|
||||
*.nix=:\
|
||||
"
|
||||
|
||||
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 &
|
31
.config/shell/shortcutrc
Normal file
31
.config/shell/shortcutrc
Normal file
|
@ -0,0 +1,31 @@
|
|||
# vim: filetype=sh
|
||||
alias tr="cd /home/luca/.local/share && ls -a" \
|
||||
cac="cd /home/luca/.cache && ls -a" \
|
||||
cf="cd /home/luca/.config && ls -a" \
|
||||
D="cd /home/luca/Downloads && ls -a" \
|
||||
d="cd /home/luca/Documents && ls -a" \
|
||||
dt="cd /home/luca/.local/share && ls -a" \
|
||||
rr="cd /home/luca/.local/src && ls -a" \
|
||||
h="cd /home/luca && ls -a" \
|
||||
m="cd /home/luca/Music && ls -a" \
|
||||
mn="cd /mnt && ls -a" \
|
||||
pp="cd /home/luca/Pictures && ls -a" \
|
||||
sc="cd /home/luca/.local/bin && ls -a" \
|
||||
src="cd /home/luca/.local/src && ls -a" \
|
||||
vv="cd /home/luca/Videos && ls -a" \
|
||||
bf="$EDITOR /home/luca/.config/shell/bm-files" \
|
||||
bd="$EDITOR /home/luca/.config/shell/bm-dirs" \
|
||||
cfx="$EDITOR /home/luca/.config/x11/xresources" \
|
||||
cfb="$EDITOR ~/.local/src/dwmblocks/config.h" \
|
||||
cfv="$EDITOR /home/luca/.config/nvim/init.vim" \
|
||||
cfz="$EDITOR /home/luca/.config/zsh/.zshrc" \
|
||||
cfa="$EDITOR /home/luca/.config/shell/aliasrc" \
|
||||
cfp="$EDITOR /home/luca/.config/shell/profile" \
|
||||
cfm="$EDITOR /home/luca/.config/mutt/muttrc" \
|
||||
cfn="$EDITOR /home/luca/.config/newsboat/config" \
|
||||
cfu="$EDITOR /home/luca/.config/newsboat/urls" \
|
||||
cfmb="$EDITOR /home/luca/.config/ncmpcpp/bindings" \
|
||||
cfmc="$EDITOR /home/luca/.config/ncmpcpp/config" \
|
||||
cfl="$EDITOR /home/luca/.config/lf/lfrc" \
|
||||
cfL="$EDITOR /home/luca/.config/lf/scope" \
|
||||
cfX="$EDITOR /home/luca/.config/sxiv/exec/key-handler" \
|
30
.config/shell/zshnameddirrc
Normal file
30
.config/shell/zshnameddirrc
Normal file
|
@ -0,0 +1,30 @@
|
|||
hash -d tr=/home/luca/.local/share
|
||||
hash -d cac=/home/luca/.cache
|
||||
hash -d cf=/home/luca/.config
|
||||
hash -d D=/home/luca/Downloads
|
||||
hash -d d=/home/luca/Documents
|
||||
hash -d dt=/home/luca/.local/share
|
||||
hash -d rr=/home/luca/.local/src
|
||||
hash -d h=/home/luca
|
||||
hash -d m=/home/luca/Music
|
||||
hash -d mn=/mnt
|
||||
hash -d pp=/home/luca/Pictures
|
||||
hash -d sc=/home/luca/.local/bin
|
||||
hash -d src=/home/luca/.local/src
|
||||
hash -d vv=/home/luca/Videos
|
||||
hash -d bf=/home/luca/.config/shell/bm-files
|
||||
hash -d bd=/home/luca/.config/shell/bm-dirs
|
||||
hash -d cfx=/home/luca/.config/x11/xresources
|
||||
hash -d cfb=~/.local/src/dwmblocks/config.h
|
||||
hash -d cfv=/home/luca/.config/nvim/init.vim
|
||||
hash -d cfz=/home/luca/.config/zsh/.zshrc
|
||||
hash -d cfa=/home/luca/.config/shell/aliasrc
|
||||
hash -d cfp=/home/luca/.config/shell/profile
|
||||
hash -d cfm=/home/luca/.config/mutt/muttrc
|
||||
hash -d cfn=/home/luca/.config/newsboat/config
|
||||
hash -d cfu=/home/luca/.config/newsboat/urls
|
||||
hash -d cfmb=/home/luca/.config/ncmpcpp/bindings
|
||||
hash -d cfmc=/home/luca/.config/ncmpcpp/config
|
||||
hash -d cfl=/home/luca/.config/lf/lfrc
|
||||
hash -d cfL=/home/luca/.config/lf/scope
|
||||
hash -d cfX=/home/luca/.config/sxiv/exec/key-handler
|
33
.config/sxiv/exec/key-handler
Executable file
33
.config/sxiv/exec/key-handler
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
while read file
|
||||
do
|
||||
case "$1" in
|
||||
"w") setbg "$file" & ;;
|
||||
"c")
|
||||
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
|
||||
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
|
||||
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
|
||||
;;
|
||||
"m")
|
||||
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
|
||||
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
|
||||
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
|
||||
;;
|
||||
"r")
|
||||
convert -rotate 90 "$file" "$file" ;;
|
||||
"R")
|
||||
convert -rotate -90 "$file" "$file" ;;
|
||||
"f")
|
||||
convert -flop "$file" "$file" ;;
|
||||
"y")
|
||||
echo -n "$file" | tr -d '\n' | xclip -selection clipboard &&
|
||||
notify-send "$file copied to clipboard" & ;;
|
||||
"Y")
|
||||
readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
|
||||
notify-send "$(readlink -f "$file") copied to clipboard" & ;;
|
||||
"d")
|
||||
[ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
|
||||
"g") ifinstalled gimp && setsid -f gimp "$file" ;;
|
||||
"i") notify-send "File information" "$(mediainfo "$file")" ;;
|
||||
esac
|
||||
done
|
1
.config/user-dirs.dirs
Normal file
1
.config/user-dirs.dirs
Normal file
|
@ -0,0 +1 @@
|
|||
XDG_DESKTOP_DIR="$HOME/"
|
45
.config/x11/xinitrc
Executable file
45
.config/x11/xinitrc
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
|
||||
# xinitrc runs automatically when you run startx.
|
||||
|
||||
# There are some small but important commands that need to be run when we start
|
||||
# the graphical environment. There is a link to this file in ~/.xprofile
|
||||
# because that file is run automatically if someone uses a display manager
|
||||
# (login screen) and so they are needed there. To prevent doubling up commands,
|
||||
# I source them here with the line below.
|
||||
|
||||
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then
|
||||
. "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile"
|
||||
else
|
||||
. "$HOME/.xprofile"
|
||||
fi
|
||||
|
||||
# Start gpg-agent if not already running
|
||||
if ! pgrep -x -u "${USER}" gpg-agent &> /dev/null; then
|
||||
gpg-connect-agent /bye &> /dev/null
|
||||
fi
|
||||
|
||||
# Set SSH to use gpg-agent (see 'man gpg-agent', section EXAMPLES)
|
||||
unset SSH_AGENT_PID
|
||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||
# export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
fi
|
||||
|
||||
# Set GPG TTY as stated in 'man gpg-agent'
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
# Refresh gpg-agent tty
|
||||
gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||
|
||||
# Set lock screen on x screensaver
|
||||
xautolock -time 10 -locker 'slock -m "$(cowsay -f octopus "$(fortune)" | lolcat -ft)"' &
|
||||
|
||||
# Check for updates
|
||||
checkup &
|
||||
|
||||
# Set GPU settings
|
||||
gwe --hide-window &
|
||||
|
||||
# Start Console TDM
|
||||
exec dwm
|
16
.config/x11/xprofile
Executable file
16
.config/x11/xprofile
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
xrandr --dpi 109 --fb 4480x1633 \
|
||||
--output DP-2 --mode 2560x1440 --pos 1920x0 \
|
||||
--output HDMI-0 --mode 1920x1080 --pos 0x553
|
||||
setbg & # set the background with the `setbg` script
|
||||
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
|
||||
remaps & # run the remaps script, switching caps/esc and more; check it for more info
|
||||
|
||||
autostart="xcompmgr dunst unclutter pipewire"
|
||||
|
||||
for program in $autostart; do
|
||||
pidof -s "$program" || setsid -f "$program"
|
||||
done >/dev/null 2>&1
|
||||
|
||||
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
||||
[ -n "$xrdbpid" ] && wait "$xrdbpid"
|
200
.config/x11/xresources
Normal file
200
.config/x11/xresources
Normal file
|
@ -0,0 +1,200 @@
|
|||
!! Set cursor size (Check GTK in .config too):
|
||||
Xcursor.size: 24
|
||||
!! Set transparency (0-1):
|
||||
*.alpha: 0.8
|
||||
|
||||
!! Set a default font and font size:
|
||||
*.font: FiraCode Nerd Font Mono:pixelsize=14:antialias=true:autohint=true;
|
||||
|
||||
/* name dark light */
|
||||
/* black 0 8 */
|
||||
/* red 1 9 */
|
||||
/* green 2 10 */
|
||||
/* yellow 3 11 */
|
||||
/* blue 4 12 */
|
||||
/* purple 5 13 */
|
||||
/* cyan 6 14 */
|
||||
/* white 7 15 */
|
||||
|
||||
!! tokyo-night:
|
||||
*.color0: #32344a
|
||||
*.color1: #f7768e
|
||||
*.color2: #9ece6a
|
||||
*.color3: #e0af68
|
||||
*.color4: #7aa2f7
|
||||
*.color5: #ad8ee6
|
||||
*.color6: #449dab
|
||||
*.color7: #787c99
|
||||
*.color8: #444b6a
|
||||
*.color9: #ff7a93
|
||||
*.color10: #b9f27c
|
||||
*.color11: #ff9e64
|
||||
*.color12: #7da6ff
|
||||
*.color13: #bb9af7
|
||||
*.color14: #0db9d7
|
||||
*.color15: #acb0d0
|
||||
*.background: #1a1b26
|
||||
*.foreground: #a9b1d6
|
||||
*.cursorColor: #c0caf5
|
||||
|
||||
!! tokyo-night-storm:
|
||||
/* *.color0: #32344a */
|
||||
/* *.color1: #f7768e */
|
||||
/* *.color2: #9ece6a */
|
||||
/* *.color3: #e0af68 */
|
||||
/* *.color4: #7aa2f7 */
|
||||
/* *.color5: #ad8ee6 */
|
||||
/* *.color6: #449dab */
|
||||
/* *.color7: #9699a8 */
|
||||
/* *.color8: #444b6a */
|
||||
/* *.color9: #ff7a93 */
|
||||
/* *.color10: #b9f27c */
|
||||
/* *.color11: #ff9e64 */
|
||||
/* *.color12: #7da6ff */
|
||||
/* *.color13: #bb9af7 */
|
||||
/* *.color14: #0db9d7 */
|
||||
/* *.color15: #acb0d0 */
|
||||
/* *.background:#24283b */
|
||||
/* *.foreground:#a9b1d6 */
|
||||
/* *.cursor: #c0caf5 */
|
||||
|
||||
/* !! gruvbox: */
|
||||
/* *.color0: #1d2021 */
|
||||
/* *.color1: #cc241d */
|
||||
/* *.color2: #98971a */
|
||||
/* *.color3: #d79921 */
|
||||
/* *.color4: #458588 */
|
||||
/* *.color5: #b16286 */
|
||||
/* *.color6: #689d6a */
|
||||
/* *.color7: #a89984 */
|
||||
/* *.color8: #928374 */
|
||||
/* *.color9: #fb4934 */
|
||||
/* *.color10: #b8bb26 */
|
||||
/* *.color11: #fabd2f */
|
||||
/* *.color12: #83a598 */
|
||||
/* *.color13: #d3869b */
|
||||
/* *.color14: #8ec07c */
|
||||
/* *.color15: #ebdbb2 */
|
||||
/* *.color256: #1d2021 */
|
||||
/* *.color257: #ebdbb2 */
|
||||
|
||||
/* !! gruvbox light: */
|
||||
/* *.color0: #fbf1c7 */
|
||||
/* *.color1: #cc241d */
|
||||
/* *.color2: #98971a */
|
||||
/* *.color3: #d79921 */
|
||||
/* *.color4: #458588 */
|
||||
/* *.color5: #b16286 */
|
||||
/* *.color6: #689d6a */
|
||||
/* *.color7: #7c6f64 */
|
||||
/* *.color8: #928374 */
|
||||
/* *.color9: #9d0006 */
|
||||
/* *.color10: #79740e */
|
||||
/* *.color11: #b57614 */
|
||||
/* *.color12: #076678 */
|
||||
/* *.color13: #8f3f71 */
|
||||
/* *.color14: #427b58 */
|
||||
/* *.color15: #3c3836 */
|
||||
/* *.background: #fbf1c7 */
|
||||
/* *.foreground: #282828 */
|
||||
/* st.alpha: 0.9 */
|
||||
|
||||
/* !! brogrammer: */
|
||||
/* *.foreground: #d6dbe5 */
|
||||
/* *.background: #131313 */
|
||||
/* *.color0: #1f1f1f */
|
||||
/* *.color8: #d6dbe5 */
|
||||
/* *.color1: #f81118 */
|
||||
/* *.color9: #de352e */
|
||||
/* *.color2: #2dc55e */
|
||||
/* *.color10: #1dd361 */
|
||||
/* *.color3: #ecba0f */
|
||||
/* *.color11: #f3bd09 */
|
||||
/* *.color4: #2a84d2 */
|
||||
/* *.color12: #1081d6 */
|
||||
/* *.color5: #4e5ab7 */
|
||||
/* *.color13: #5350b9 */
|
||||
/* *.color6: #1081d6 */
|
||||
/* *.color14: #0f7ddb */
|
||||
/* *.color7: #d6dbe5 */
|
||||
/* *.color15: #ffffff */
|
||||
/* *.colorBD: #d6dbe5 */
|
||||
|
||||
/* ! base16 */
|
||||
/* *.color0: #181818 */
|
||||
/* *.color1: #ab4642 */
|
||||
/* *.color2: #a1b56c */
|
||||
/* *.color3: #f7ca88 */
|
||||
/* *.color4: #7cafc2 */
|
||||
/* *.color5: #ba8baf */
|
||||
/* *.color6: #86c1b9 */
|
||||
/* *.color7: #d8d8d8 */
|
||||
/* *.color8: #585858 */
|
||||
/* *.color9: #ab4642 */
|
||||
/* *.color10: #a1b56c */
|
||||
/* *.color11: #f7ca88 */
|
||||
/* *.color12: #7cafc2 */
|
||||
/* *.color13: #ba8baf */
|
||||
/* *.color14: #86c1b9 */
|
||||
/* *.color15: #f8f8f8 */
|
||||
|
||||
/* !! solarized */
|
||||
/* *.color0: #073642 */
|
||||
/* *.color1: #dc322f */
|
||||
/* *.color2: #859900 */
|
||||
/* *.color3: #b58900 */
|
||||
/* *.color4: #268bd2 */
|
||||
/* *.color5: #d33682 */
|
||||
/* *.color6: #2aa198 */
|
||||
/* *.color7: #eee8d5 */
|
||||
/* *.color9: #cb4b16 */
|
||||
/* *.color8: #fdf6e3 */
|
||||
/* *.color10: #586e75 */
|
||||
/* *.color11: #657b83 */
|
||||
/* *.color12: #839496 */
|
||||
/* *.color13: #6c71c4 */
|
||||
/* *.color14: #93a1a1 */
|
||||
/* *.color15: #fdf6e3 */
|
||||
|
||||
/* !! xterm */
|
||||
/* *.color0: #000000 */
|
||||
/* *.color1: #cd0000 */
|
||||
/* *.color2: #00cd00 */
|
||||
/* *.color3: #cdcd00 */
|
||||
/* *.color4: #0000cd */
|
||||
/* *.color5: #cd00cd */
|
||||
/* *.color6: #00cdcd */
|
||||
/* *.color7: #e5e5e5 */
|
||||
/* *.color8: #4d4d4d */
|
||||
/* *.color9: #ff0000 */
|
||||
/* *.color10: #00ff00 */
|
||||
/* *.color11: #ffff00 */
|
||||
/* *.color12: #0000ff */
|
||||
/* *.color13: #ff00ff */
|
||||
/* *.color14: #00ffff */
|
||||
/* *.color15: #aabac8 */
|
||||
/* *.background: #000000 */
|
||||
|
||||
/* ! Dracula Xresources palette */
|
||||
/* *.foreground: #F8F8F2 */
|
||||
/* *.background: #282A36 */
|
||||
/* *.color0: #000000 */
|
||||
/* *.color8: #4D4D4D */
|
||||
/* *.color1: #FF5555 */
|
||||
/* *.color9: #FF6E67 */
|
||||
/* *.color2: #50FA7B */
|
||||
/* *.color10: #5AF78E */
|
||||
/* *.color3: #F1FA8C */
|
||||
/* *.color11: #F4F99D */
|
||||
/* *.color4: #BD93F9 */
|
||||
/* *.color12: #CAA9FA */
|
||||
/* *.color5: #FF79C6 */
|
||||
/* *.color13: #FF92D0 */
|
||||
/* *.color6: #8BE9FD */
|
||||
/* *.color14: #9AEDFE */
|
||||
/* *.color7: #BFBFBF */
|
||||
/* *.color15: #E6E6E6 */
|
||||
|
||||
/* *.background: .color0 */
|
||||
/* *.color256: 0#1d2021 */
|
||||
/* *.color257: 15#ebdbb2 */
|
58
.config/zathura/zathurarc
Normal file
58
.config/zathura/zathurarc
Normal file
|
@ -0,0 +1,58 @@
|
|||
set sandbox none
|
||||
set statusbar-h-padding 0
|
||||
set statusbar-v-padding 0
|
||||
set recolor true
|
||||
set page-padding 1
|
||||
set selection-clipboard clipboard
|
||||
map u scroll half-up
|
||||
map d scroll half-down
|
||||
map D toggle_page_mode
|
||||
map r reload
|
||||
map R rotate
|
||||
map K zoom in
|
||||
map J zoom out
|
||||
map i recolor
|
||||
map p print
|
||||
map g goto top
|
||||
|
||||
# Lighthaus Colors:
|
||||
|
||||
set notification-error-bg "#FC2929"
|
||||
set notification-error-fg "#18191E"
|
||||
set notification-warning-bg "#E25600"
|
||||
set notification-warning-fg "#18191E"
|
||||
set notification-bg "#D68EB2"
|
||||
set notification-fg "#18191E"
|
||||
|
||||
set completion-bg "#18191E"
|
||||
set completion-fg "#44B273"
|
||||
set completion-group-bg "#18191E"
|
||||
set completion-group-fg "#ED722E"
|
||||
set completion-highlight-bg "#FFFF00"
|
||||
set completion-highlight-fg "#21252D"
|
||||
|
||||
set index-bg "#18191E"
|
||||
set index-fg "#44B273"
|
||||
set index-active-bg "#21252D"
|
||||
set index-active-fg "#FFFF00"
|
||||
|
||||
set inputbar-bg "#21252D"
|
||||
set inputbar-fg "#FFFADE"
|
||||
set statusbar-bg "#21252D"
|
||||
set statusbar-fg "#D68EB2"
|
||||
|
||||
set highlight-color "#D68EB2"
|
||||
set highlight-active-color "#ff79c6"
|
||||
|
||||
set default-bg "#18191E"
|
||||
set default-fg "#FFEE79"
|
||||
|
||||
set render-loading true
|
||||
set render-loading-fg "#FFEE79"
|
||||
set render-loading-bg "#18191E"
|
||||
|
||||
# Recolor mode settings
|
||||
|
||||
set recolor-lightcolor "#21252D"
|
||||
set recolor-darkcolor "#FFFADE"
|
||||
|
1845
.config/zsh/.zcompdump
Normal file
1845
.config/zsh/.zcompdump
Normal file
File diff suppressed because it is too large
Load diff
76
.config/zsh/.zshrc
Normal file
76
.config/zsh/.zshrc
Normal file
|
@ -0,0 +1,76 @@
|
|||
# Enable colors and change prompt:
|
||||
autoload -U colors && colors # Load colors
|
||||
PS1="%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$reset_color%}[%{$fg[magenta]%}%3~%{$reset_color%}] %{$fg[green]%}»%{$reset_color%} "
|
||||
stty stop undef # Disable ctrl-s to freeze terminal.
|
||||
setopt interactive_comments histignorealldups autocd
|
||||
|
||||
# History in cache directory:
|
||||
HISTSIZE=10000000
|
||||
SAVEHIST=10000000
|
||||
HISTFILE=~/.cache/zsh/history
|
||||
|
||||
# Load aliases and shortcuts if existent.
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
|
||||
|
||||
# Basic auto/tab complete:
|
||||
autoload -U compinit
|
||||
zstyle ':completion:*' menu select
|
||||
zmodload zsh/complist
|
||||
compinit
|
||||
_comp_options+=(globdots) # Include hidden files.
|
||||
|
||||
# vi mode
|
||||
bindkey -v
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
# Use vim keys in tab complete menu:
|
||||
bindkey -M menuselect 'h' vi-backward-char
|
||||
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||
bindkey -M menuselect 'l' vi-forward-char
|
||||
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||
bindkey -v '^?' backward-delete-char
|
||||
bindkey '^[[P' delete-char
|
||||
bindkey "^[[H" beginning-of-line
|
||||
bindkey "^[[4~" end-of-line
|
||||
|
||||
# Change cursor shape for different vi modes.
|
||||
function zle-keymap-select () {
|
||||
case $KEYMAP in
|
||||
vicmd) echo -ne '\e[1 q';; # block
|
||||
viins|main) echo -ne '\e[5 q';; # beam
|
||||
esac
|
||||
}
|
||||
zle -N zle-keymap-select
|
||||
zle-line-init() {
|
||||
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
||||
echo -ne "\e[5 q"
|
||||
}
|
||||
zle -N zle-line-init
|
||||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
||||
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
||||
|
||||
# Use lf to switch directories and bind it to ctrl-o
|
||||
lfcd () {
|
||||
tmp="$(mktemp)"
|
||||
lfrun -last-dir-path="$tmp" "$@"
|
||||
if [ -f "$tmp" ]; then
|
||||
dir="$(cat "$tmp")"
|
||||
rm -f "$tmp" >/dev/null
|
||||
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
||||
fi
|
||||
}
|
||||
bindkey -s '^o' 'lfcd\n'
|
||||
|
||||
bindkey -s '^a' 'bc -lq\n'
|
||||
|
||||
bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'
|
||||
|
||||
|
||||
# Edit line in vim with ctrl-e:
|
||||
autoload edit-command-line; zle -N edit-command-line
|
||||
bindkey '^e' edit-command-line
|
||||
|
||||
# Load syntax highlighting; should be last.
|
||||
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
|
5
.gitconfig
Normal file
5
.gitconfig
Normal file
|
@ -0,0 +1,5 @@
|
|||
[include]
|
||||
path = ~/.gitconfig.local
|
||||
|
||||
[credential]
|
||||
helper = store
|
8
.local/bin/black
Executable file
8
.local/bin/black
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from black import patched_main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(patched_main())
|
8
.local/bin/blackd
Executable file
8
.local/bin/blackd
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from blackd import patched_main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(patched_main())
|
46
.local/bin/booksplit
Executable file
46
.local/bin/booksplit
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Requires ffmpeg (audio splitting) and my `tag` wrapper script.
|
||||
|
||||
[ ! -f "$2" ] && printf "The first file should be the audio, the second should be the timecodes.\\n" && exit
|
||||
|
||||
echo "Enter the album/book title:"; read -r booktitle
|
||||
|
||||
echo "Enter the artist/author:"; read -r author
|
||||
|
||||
echo "Enter the publication year:"; read -r year
|
||||
|
||||
inputaudio="$1"
|
||||
|
||||
# Get a safe file name from the book.
|
||||
escbook="$(echo "$booktitle" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
||||
|
||||
! mkdir -p "$escbook" && echo "Do you have write access in this directory?" && exit 1
|
||||
|
||||
# As long as the extension is in the tag script, it'll work.
|
||||
ext="opus"
|
||||
#ext="${1#*.}"
|
||||
|
||||
# Get the total number of tracks from the number of lines.
|
||||
total="$(wc -l < "$2")"
|
||||
|
||||
while read -r x;
|
||||
do
|
||||
end="$(echo "$x" | cut -d' ' -f1)"
|
||||
|
||||
[ -n "$start" ] &&
|
||||
echo "From $start to $end; $track $title"
|
||||
file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext"
|
||||
[ -n "$start" ] && echo "Splitting \"$title\"..." &&
|
||||
ffmpeg -nostdin -y -loglevel -8 -i "$inputaudio" -ss "$start" -to "$end" -vn -c copy "$file" &&
|
||||
echo "Tagging \"$title\"..." && tag -a "$author" -A "$booktitle" -t "$title" -n "$track" -N "$total" -d "$year" "$file"
|
||||
title="$(echo "$x" | cut -d' ' -f 2-)"
|
||||
esctitle="$(echo "$title" | iconv -cf UTF-8 -t ASCII//TRANSLIT | tr -d '[:punct:]' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | sed "s/-\+/-/g;s/\(^-\|-\$\)//g")"
|
||||
track="$((track+1))"
|
||||
start="$end"
|
||||
done < "$2"
|
||||
# The last track must be done outside the loop.
|
||||
echo "From $start to the end: $title"
|
||||
file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext"
|
||||
echo "Splitting \"$title\"..." && ffmpeg -nostdin -y -loglevel -8 -i "$inputaudio" -ss "$start" -vn -c copy "$file" &&
|
||||
echo "Tagging \"$title\"..." && tag -a "$author" -A "$booktitle" -t "$title" -n "$track" -N "$total" -d "$year" "$file"
|
57
.local/bin/compiler
Executable file
57
.local/bin/compiler
Executable file
|
@ -0,0 +1,57 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script will compile or run another finishing operation on a document. I
|
||||
# have this script run via vim.
|
||||
#
|
||||
# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent
|
||||
# presentations. Runs scripts based on extention or shebang.
|
||||
#
|
||||
# Note that .tex files which you wish to compile with XeLaTeX should have the
|
||||
# string "xelatex" somewhere in a comment/command in the first 5 lines.
|
||||
|
||||
file=$(readlink -f "$1")
|
||||
dir=${file%/*}
|
||||
base="${file%.*}"
|
||||
ext="${file##*.}"
|
||||
|
||||
cd "$dir" || exit 1
|
||||
|
||||
textype() { \
|
||||
command="pdflatex"
|
||||
( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex"
|
||||
$command --output-directory="$dir" "$base" &&
|
||||
grep -qi addbibresource "$file" &&
|
||||
biber --input-directory "$dir" "$base" &&
|
||||
$command --output-directory="$dir" "$base" &&
|
||||
$command --output-directory="$dir" "$base"
|
||||
}
|
||||
|
||||
case "$ext" in
|
||||
# Try to keep these cases in alphabetical order.
|
||||
[0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;;
|
||||
c) cc "$file" -o "$base" && "$base" ;;
|
||||
cpp) g++ "$file" -o "$base" && "$base" ;;
|
||||
cs) mcs "$file" && mono "$base".exe ;;
|
||||
go) go run "$file" ;;
|
||||
h) sudo make install ;;
|
||||
java) javac -d classes "$file" && java -cp classes "${1%.*}" ;;
|
||||
m) octave "$file" ;;
|
||||
md) if [ -x "$(command -v lowdown)" ]; then
|
||||
lowdown --parse-no-intraemph "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf
|
||||
elif [ -x "$(command -v groffdown)" ]; then
|
||||
groffdown -i "$file" | groff > "$base.pdf"
|
||||
else
|
||||
pandoc -t ms --highlight-style=kate -s -o "$base".pdf "$file"
|
||||
fi ; ;;
|
||||
mom) preconv "$file" | refer -PS -e | groff -mom -kept -T pdf > "$base".pdf ;;
|
||||
ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf > "$base".pdf ;;
|
||||
org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;;
|
||||
py) python "$file" ;;
|
||||
[rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;;
|
||||
rs) cargo build ;;
|
||||
sass) sassc -a "$file" "$base.css" ;;
|
||||
scad) openscad -o "$base".stl "$file" ;;
|
||||
sent) setsid -f sent "$file" 2>/dev/null ;;
|
||||
tex) textype "$file" ;;
|
||||
*) sed -n '/^#!/s/^#!//p; q' "$file" | xargs -r -I % "$file" ;;
|
||||
esac
|
11
.local/bin/cron/README.md
Normal file
11
.local/bin/cron/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Important Note
|
||||
|
||||
These cronjobs have components that require information about your current display to display notifications correctly.
|
||||
|
||||
When you add them as cronjobs, I recommend you precede the command with commands as those below:
|
||||
|
||||
```
|
||||
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u $USER)/bus; export DISPLAY=:0; . $HOME/.zprofile; then_command_goes_here
|
||||
```
|
||||
|
||||
This ensures that notifications will display, xdotool commands will function and environmental variables will work as well.
|
17
.local/bin/cron/checkup
Executable file
17
.local/bin/cron/checkup
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Syncs repositories and downloads updates, meant to be run as a cronjob.
|
||||
|
||||
notify-send " Repository Sync" "Checking for package updates..."
|
||||
|
||||
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates.
|
||||
|
||||
Check your internet connection, if pacman is already running, or run update manually to see errors."
|
||||
pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
|
||||
|
||||
if pacman -Qu | grep -v "\[ignored\]"
|
||||
then
|
||||
notify-send " Repository Sync" "Updates available. Click statusbar icon () for update."
|
||||
else
|
||||
notify-send " Repository Sync" "Sync complete. No new packages for update."
|
||||
fi
|
6
.local/bin/cron/crontog
Executable file
6
.local/bin/cron/crontog
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Toggles all cronjobs off/on.
|
||||
# Stores disabled crontabs in ~/.consaved until restored.
|
||||
|
||||
([ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved ] && crontab - < "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && rm "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && notify-send "🕓 Cronjobs re-enabled.") || ( crontab -l > "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && crontab -r && notify-send "🕓 Cronjobs saved and disabled.")
|
94
.local/bin/cron/mailsync
Executable file
94
.local/bin/cron/mailsync
Executable file
|
@ -0,0 +1,94 @@
|
|||
#!/bin/sh
|
||||
|
||||
# - Syncs mail for all accounts, or a single account given as an argument.
|
||||
# - Displays a notification showing the number of new mails.
|
||||
# - Displays a notification for each new mail with its subject displayed.
|
||||
# - Runs notmuch to index new mail.
|
||||
# - This script can be set up as a cron job for automated mail syncing.
|
||||
|
||||
# There are many arbitrary and ugly features in this script because it is
|
||||
# inherently difficult to pass environmental variables to cronjobs and other
|
||||
# issues. It also should at least be compatible with Linux (and maybe BSD) with
|
||||
# Xorg and MacOS as well.
|
||||
|
||||
# Run only if user logged in (prevent cron errors)
|
||||
pgrep -u "${USER:=$LOGNAME}" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;}
|
||||
# Run only if not already running in other instance
|
||||
pgrep mbsync >/dev/null && { echo "mbsync is already running."; exit ;}
|
||||
|
||||
# First, we have to get the right variables for the mbsync file, the pass
|
||||
# archive, notmuch and the GPG home. This is done by searching common profile
|
||||
# files for variable assignments. This is ugly, but there are few options that
|
||||
# will work on the maximum number of machines.
|
||||
|
||||
pkill -RTMIN+12 dwmblocks
|
||||
|
||||
eval "$(grep -h -- \
|
||||
"^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\)=" \
|
||||
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" "$HOME/.zshenv" \
|
||||
"$HOME/.config/zsh/.zshenv" "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" \
|
||||
"$HOME/.pam_environment" 2>/dev/null)"
|
||||
|
||||
export GPG_TTY="$(tty)"
|
||||
|
||||
alias mbsync="mbsync -c $MBSYNCRC"
|
||||
|
||||
# Settings are different for MacOS (Darwin) systems.
|
||||
case "$(uname)" in
|
||||
Darwin)
|
||||
notify() { osascript -e "display notification \"$2 in $1\" with title \"You've got Mail\" subtitle \"Account: $account\"" && sleep 2 ;}
|
||||
;;
|
||||
*)
|
||||
case "$(readlink -f /sbin/init)" in
|
||||
*systemd*|*openrc*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
|
||||
esac
|
||||
# remember if a display server is running since `ps` doesn't always contain a display
|
||||
pgrepoutput="$(pgrep -a X\(org\|wayland\))"
|
||||
displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
|
||||
notify() { [ -n "$pgrepoutput" ] && for x in ${displays:-0:}; do
|
||||
export DISPLAY=$x
|
||||
notify-send --app-name="mutt-wizard" "New mail!" "📬 $2 new mail(s) in \`$1\` account."
|
||||
done ;}
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check account for new mail. Notify if there is new content.
|
||||
syncandnotify() {
|
||||
acc="$(echo "$account" | sed "s/.*\///")"
|
||||
if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi
|
||||
new=$(find\
|
||||
"$HOME/.local/share/mail/$acc/INBOX/new/"\
|
||||
"$HOME/.local/share/mail/$acc/Inbox/new/"\
|
||||
"$HOME/.local/share/mail/$acc/inbox/new/"\
|
||||
"$HOME/.local/share/mail/$acc/INBOX/cur/"\
|
||||
"$HOME/.local/share/mail/$acc/Inbox/cur/"\
|
||||
"$HOME/.local/share/mail/$acc/inbox/cur/"\
|
||||
-type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2> /dev/null)
|
||||
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
|
||||
case 1 in
|
||||
$((newcount > 0)) ) notify "$acc" "$newcount" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Sync accounts passed as argument or all.
|
||||
if [ "$#" -eq "0" ]; then
|
||||
accounts="$(awk '/^Channel/ {print $2}' "$MBSYNCRC")"
|
||||
else
|
||||
for arg in "$@"; do
|
||||
[ "${arg%${arg#?}}" = '-' ] && opts="${opts:+${opts} }${arg}" && shift 1
|
||||
done
|
||||
accounts=$*
|
||||
fi
|
||||
|
||||
# Parallelize multiple accounts
|
||||
for account in $accounts; do
|
||||
syncandnotify &
|
||||
done
|
||||
|
||||
wait
|
||||
|
||||
notmuch new 2>/dev/null
|
||||
|
||||
#Create a touch file that indicates the time of the last run of mailsync
|
||||
touch "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun"
|
||||
pkill -RTMIN+12 dwmblocks
|
15
.local/bin/cron/newsup
Executable file
15
.local/bin/cron/newsup
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Set as a cron job to check for new RSS entries for newsboat.
|
||||
# If newsboat is open, sends it an "R" key to refresh.
|
||||
|
||||
/usr/bin/notify-send " Updating RSS feeds..."
|
||||
|
||||
pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit
|
||||
|
||||
echo " 痢" > /tmp/newsupdate
|
||||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
||||
/usr/bin/newsboat -x reload
|
||||
rm -f /tmp/newsupdate
|
||||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
||||
/usr/bin/notify-send " RSS feed update complete."
|
83
.local/bin/displayselect
Executable file
83
.local/bin/displayselect
Executable file
|
@ -0,0 +1,83 @@
|
|||
#!/bin/sh
|
||||
|
||||
# A UI for detecting and selecting all displays. Probes xrandr for connected
|
||||
# displays and lets user select one to use. User may also select "manual
|
||||
# selection" which opens arandr.
|
||||
|
||||
twoscreen() { # If multi-monitor is selected and there are two screens.
|
||||
|
||||
mirror=$(printf "no\\nyes" | dmenu -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:")
|
||||
internal=$(echo "$screens" | grep -v "$external")
|
||||
|
||||
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
|
||||
tail -n 1 | awk '{print $1}')
|
||||
res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \
|
||||
tail -n 1 | awk '{print $1}')
|
||||
|
||||
res_ext_x=$(echo "$res_external" | sed 's/x.*//')
|
||||
res_ext_y=$(echo "$res_external" | sed 's/.*x//')
|
||||
res_int_x=$(echo "$res_internal" | sed 's/x.*//')
|
||||
res_int_y=$(echo "$res_internal" | sed 's/.*x//')
|
||||
|
||||
scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l)
|
||||
scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l)
|
||||
|
||||
xrandr --output "$external" --auto --scale 1.0x1.0 \
|
||||
--output "$internal" --auto --same-as "$external" \
|
||||
--scale "$scale_x"x"$scale_y"
|
||||
else
|
||||
|
||||
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
|
||||
secondary=$(echo "$screens" | grep -v "$primary")
|
||||
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
|
||||
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$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\\nright" | 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:")
|
||||
xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto
|
||||
}
|
||||
|
||||
multimon() { # Multi-monitor handler.
|
||||
case "$(echo "$screens" | wc -l)" in
|
||||
2) twoscreen ;;
|
||||
*) morescreen ;;
|
||||
esac ;}
|
||||
|
||||
onescreen() { # If only one output available or chosen.
|
||||
xrandr --output "$1" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "\b$1" | awk '{print "--output", $1, "--off"}' | paste -sd ' ' -)
|
||||
}
|
||||
|
||||
postrun() { # Stuff to run to clean up.
|
||||
setbg # Fix background if screen size/arangement has changed.
|
||||
remaps # Re-remap keys if keyboard added (for laptop bases)
|
||||
{ killall dunst ; setsid -f dunst ;} >/dev/null 2>&1 # Restart dunst to ensure proper location on screen
|
||||
}
|
||||
|
||||
# Get all possible displays
|
||||
allposs=$(xrandr -q | grep "connected")
|
||||
|
||||
# Get all connected screens.
|
||||
screens=$(echo "$allposs" | awk '/ connected/ {print $1}')
|
||||
|
||||
# If there's only one screen
|
||||
[ "$(echo "$screens" | wc -l)" -lt 2 ] &&
|
||||
{ onescreen "$screens"; postrun; notify-send "💻 Only one screen detected." "Using it in its optimal settings..."; exit ;}
|
||||
|
||||
# Get user choice including multi-monitor and manual selection:
|
||||
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
|
||||
case "$chosen" in
|
||||
"manual selection") arandr ; exit ;;
|
||||
"multi-monitor") multimon ;;
|
||||
*) onescreen "$chosen" ;;
|
||||
esac
|
||||
|
||||
postrun
|
21
.local/bin/dmenuhandler
Executable file
21
.local/bin/dmenuhandler
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Feed this script a link and it will give dmenu
|
||||
# some choice programs to use to open it.
|
||||
feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}"
|
||||
|
||||
case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dl\\nqueue yt-dl audio" | dmenu -i -p "Open it with?")" in
|
||||
"copy url") echo "$feed" | xclip -selection clipboard ;;
|
||||
mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;;
|
||||
"mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;;
|
||||
"mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;;
|
||||
"queue yt-dl") qndl "$feed" >/dev/null 2>&1 ;;
|
||||
"queue yt-dl audio") qndl "$feed" 'youtube-dl --add-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;;
|
||||
"queue download") qndl "$feed" 'curl -LO' >/dev/null 2>&1 ;;
|
||||
PDF) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;
|
||||
sxiv) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;
|
||||
vim) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && setsid -f "$TERMINAL" -e "$EDITOR" "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;;
|
||||
setbg) curl -L "$feed" > $XDG_CACHE_HOME/pic ; xwallpaper --zoom $XDG_CACHE_HOME/pic >/dev/null 2>&1 ;;
|
||||
browser) setsid -f "$BROWSER" "$feed" >/dev/null 2>&1 ;;
|
||||
lynx) lynx "$feed" >/dev/null 2>&1 ;;
|
||||
esac
|
67
.local/bin/dmenumount
Executable file
67
.local/bin/dmenumount
Executable file
|
@ -0,0 +1,67 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Gives a dmenu prompt to mount unmounted drives and Android phones. If
|
||||
# they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll
|
||||
# be prompted to give a mountpoint from already existsing directories. If you
|
||||
# input a novel directory, it will prompt you to create that directory.
|
||||
|
||||
getmount() { \
|
||||
[ -z "$chosen" ] && exit 1
|
||||
# shellcheck disable=SC2086
|
||||
mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" || exit 1
|
||||
test -z "$mp" && exit 1
|
||||
if [ ! -d "$mp" ]; then
|
||||
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") || exit 1
|
||||
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
|
||||
fi
|
||||
}
|
||||
|
||||
mountusb() { \
|
||||
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?")" || exit 1
|
||||
chosen="$(echo "$chosen" | awk '{print $1}')"
|
||||
sudo -A mount "$chosen" 2>/dev/null && notify-send "禍 USB mounting" "$chosen mounted." && exit 0
|
||||
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}')
|
||||
getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted"
|
||||
partitiontype="$(lsblk -no "fstype" "$chosen")"
|
||||
case "$partitiontype" in
|
||||
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
|
||||
"exfat") sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)";;
|
||||
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
|
||||
esac
|
||||
notify-send "禍 USB mounting" "$chosen mounted to $mp."
|
||||
}
|
||||
|
||||
mountandroid() { \
|
||||
chosen="$(echo "$anddrives" | dmenu -i -p "Which Android device?")" || exit 1
|
||||
chosen="$(echo "$chosen" | cut -d : -f 1)"
|
||||
getmount "$HOME -maxdepth 3 -type d"
|
||||
simple-mtpfs --device "$chosen" "$mp"
|
||||
echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1
|
||||
simple-mtpfs --device "$chosen" "$mp"
|
||||
notify-send " Android Mounting" "Android device mounted to $mp."
|
||||
}
|
||||
|
||||
asktype() { \
|
||||
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?")" || exit 1
|
||||
case $choice in
|
||||
USB) mountusb ;;
|
||||
Android) mountandroid ;;
|
||||
esac
|
||||
}
|
||||
|
||||
anddrives=$(simple-mtpfs -l 2>/dev/null)
|
||||
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | grep 'part\|rom' | awk '$4==""{printf "%s (%s)\n",$1,$3}')"
|
||||
|
||||
if [ -z "$usbdrives" ]; then
|
||||
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
|
||||
echo "Android device(s) detected."
|
||||
mountandroid
|
||||
else
|
||||
if [ -z "$anddrives" ]; then
|
||||
echo "USB drive(s) detected."
|
||||
mountusb
|
||||
else
|
||||
echo "Mountable USB drive(s) and Android device(s) detected."
|
||||
asktype
|
||||
fi
|
||||
fi
|
19
.local/bin/dmenumountcifs
Executable file
19
.local/bin/dmenumountcifs
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
# Gives a dmenu prompt to mount unmounted local NAS shares for read/write.
|
||||
# Requirements - "%wheel ALL=(ALL) NOPASSWD: ALL"
|
||||
#
|
||||
# Browse for mDNS/DNS-SD services using the Avahi daemon...
|
||||
srvname=$(avahi-browse _smb._tcp -t | awk '{print $4}' | dmenu -i -p "Which NAS?") || exit 1
|
||||
notify-send "Searching for network shares..." "Please wait..."
|
||||
# Choose share disk...
|
||||
share=$(smbclient -L "$srvname" -N | grep Disk | awk '{print $1}' | dmenu -i -p "Mount which share?") || exit 1
|
||||
# Format URL...
|
||||
share2mnt=//"$srvname".local/"$share"
|
||||
|
||||
sharemount() {
|
||||
mounted=$(mount -v | grep "$share2mnt") || ([ ! -d /mnt/"$share" ] && sudo mkdir /mnt/"$share")
|
||||
[ -z "$mounted" ] && sudo mount -t cifs "$share2mnt" -o user=nobody,password="",noperm /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0
|
||||
notify-send "Netshare $share already mounted"; exit 1
|
||||
}
|
||||
|
||||
sharemount
|
6
.local/bin/dmenupass
Executable file
6
.local/bin/dmenupass
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script is the SUDO_ASKPASS variable, meaning that it will be used as a
|
||||
# password prompt if needed.
|
||||
|
||||
dmenu -fn Monospace-18 -P -p "$1" <&- && echo
|
123
.local/bin/dmenurecord
Executable file
123
.local/bin/dmenurecord
Executable file
|
@ -0,0 +1,123 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Usage:
|
||||
# `$0`: Ask for recording type via dmenu
|
||||
# `$0 screencast`: Record both audio and screen
|
||||
# `$0 video`: Record only screen
|
||||
# `$0 audio`: Record only audio
|
||||
# `$0 kill`: Kill existing recording
|
||||
#
|
||||
# If there is already a running instance, user will be prompted to end it.
|
||||
|
||||
updateicon() { \
|
||||
echo "$1" > /tmp/recordingicon
|
||||
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
|
||||
}
|
||||
|
||||
killrecording() {
|
||||
recpid="$(cat /tmp/recordingpid)"
|
||||
# kill with SIGTERM, allowing finishing touches.
|
||||
kill -15 "$recpid"
|
||||
rm -f /tmp/recordingpid
|
||||
updateicon ""
|
||||
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
|
||||
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
|
||||
sleep 3
|
||||
kill -9 "$recpid"
|
||||
exit
|
||||
}
|
||||
|
||||
screencast() { \
|
||||
ffmpeg -y \
|
||||
-f x11grab \
|
||||
-framerate 60 \
|
||||
-s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \
|
||||
-i "$DISPLAY" \
|
||||
-f alsa -i default \
|
||||
-r 30 \
|
||||
-c:v h264 -crf 0 -preset ultrafast -c:a aac \
|
||||
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon "ﲠ"
|
||||
}
|
||||
|
||||
video() { ffmpeg \
|
||||
-f x11grab \
|
||||
-s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \
|
||||
-i "$DISPLAY" \
|
||||
-c:v libx264 -qp 0 -r 30 \
|
||||
"$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon "ﲣ"
|
||||
}
|
||||
|
||||
webcamhidef() { ffmpeg \
|
||||
-f v4l2 \
|
||||
-i /dev/video0 \
|
||||
-video_size 1920x1080 \
|
||||
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon ""
|
||||
}
|
||||
|
||||
webcam() { ffmpeg \
|
||||
-f v4l2 \
|
||||
-i /dev/video0 \
|
||||
-video_size 640x480 \
|
||||
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon ""
|
||||
}
|
||||
|
||||
|
||||
audio() { \
|
||||
ffmpeg \
|
||||
-f alsa -i default \
|
||||
-c:a flac \
|
||||
"$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon ""
|
||||
}
|
||||
|
||||
askrecording() { \
|
||||
choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:")
|
||||
case "$choice" in
|
||||
screencast) screencast;;
|
||||
audio) audio;;
|
||||
video) video;;
|
||||
*selected) videoselected;;
|
||||
webcam) webcam;;
|
||||
"webcam (hi-def)") webcamhidef;;
|
||||
esac
|
||||
}
|
||||
|
||||
asktoend() { \
|
||||
response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") &&
|
||||
[ "$response" = "Yes" ] && killrecording
|
||||
}
|
||||
|
||||
videoselected()
|
||||
{
|
||||
slop -f "%x %y %w %h" > /tmp/slop
|
||||
read -r X Y W H < /tmp/slop
|
||||
rm /tmp/slop
|
||||
|
||||
ffmpeg \
|
||||
-f x11grab \
|
||||
-framerate 60 \
|
||||
-video_size "$W"x"$H" \
|
||||
-i :0.0+"$X,$Y" \
|
||||
-c:v libx264 -qp 0 -r 30 \
|
||||
"$HOME/box-$(date '+%y%m%d-%H%M-%S').mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
updateicon "ﲣ"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
screencast) screencast;;
|
||||
audio) audio;;
|
||||
video) video;;
|
||||
*selected) videoselected;;
|
||||
kill) killrecording;;
|
||||
*) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;;
|
||||
esac
|
44
.local/bin/dmenuumount
Executable file
44
.local/bin/dmenuumount
Executable file
|
@ -0,0 +1,44 @@
|
|||
#!/bin/sh
|
||||
|
||||
# A dmenu prompt to unmount drives.
|
||||
# Provides you with mounted partitions, select one to unmount.
|
||||
# Drives mounted at /, /boot and /home will not be options to unmount.
|
||||
|
||||
unmountusb() {
|
||||
[ -z "$drives" ] && exit
|
||||
chosen="$(echo "$drives" | dmenu -i -p "Unmount which drive?")" || exit 1
|
||||
chosen="$(echo "$chosen" | awk '{print $1}')"
|
||||
[ -z "$chosen" ] && exit
|
||||
sudo -A umount "$chosen" && notify-send "禍 USB unmounting" "$chosen unmounted."
|
||||
}
|
||||
|
||||
unmountandroid() { \
|
||||
chosen="$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")" || exit 1
|
||||
[ -z "$chosen" ] && exit
|
||||
sudo -A umount -l "$chosen" && notify-send " Android unmounting" "$chosen unmounted."
|
||||
}
|
||||
|
||||
asktype() { \
|
||||
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" || exit 1
|
||||
case "$choice" in
|
||||
USB) unmountusb ;;
|
||||
Android) unmountandroid ;;
|
||||
esac
|
||||
}
|
||||
|
||||
drives=$(lsblk -nrpo "name,type,size,mountpoint,label" | awk -F':' '{gsub(/ /,":")}$4!~/\/boot|\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s) %s\n",$4,$3,$5}')
|
||||
|
||||
if ! grep simple-mtpfs /etc/mtab; then
|
||||
[ -z "$drives" ] && echo "No drives to unmount." && exit
|
||||
echo "Unmountable USB drive detected."
|
||||
unmountusb
|
||||
else
|
||||
if [ -z "$drives" ]
|
||||
then
|
||||
echo "Unmountable Android device detected."
|
||||
unmountandroid
|
||||
else
|
||||
echo "Unmountable USB drive(s) and Android device(s) detected."
|
||||
asktype
|
||||
fi
|
||||
fi
|
18
.local/bin/dmenuunicode
Executable file
18
.local/bin/dmenuunicode
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
# The famous "get a menu of emojis to copy" script.
|
||||
|
||||
# Get user selection via dmenu from emoji file.
|
||||
chosen=$(cut -d ';' -f1 ~/.local/share/emoji | dmenu -i -l 30 | sed "s/ .*//")
|
||||
|
||||
# Exit if none chosen.
|
||||
[ -z "$chosen" ] && exit
|
||||
|
||||
# If you run this command with an argument, it will automatically insert the
|
||||
# character. Otherwise, show a message that the emoji has been copied.
|
||||
if [ -n "$1" ]; then
|
||||
xdotool type "$chosen"
|
||||
else
|
||||
printf "$chosen" | xclip -selection clipboard
|
||||
notify-send "'$chosen' copied to clipboard." &
|
||||
fi
|
14
.local/bin/getbib
Executable file
14
.local/bin/getbib
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
[ -z "$1" ] && echo "Give either a pdf file or a DOI as an argument." && exit
|
||||
|
||||
if [ -f "$1" ]; then
|
||||
# Try to get DOI from pdfinfo or pdftotext output.
|
||||
doi=$(pdfinfo "$1" | grep -io "doi:.*") ||
|
||||
doi=$(pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1) ||
|
||||
exit 1
|
||||
else
|
||||
doi="$1"
|
||||
fi
|
||||
|
||||
# Check crossref.org for the bib citation.
|
||||
curl -s "https://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n"
|
5
.local/bin/getkeys
Executable file
5
.local/bin/getkeys
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
cat "${XDG_DATA_HOME:-$HOME/.local/share}"/getkeys/"$1" 2>/dev/null && exit
|
||||
echo "Run command with one of the following arguments for info about that program:"
|
||||
ls "${XDG_DATA_HOME:-$HOME/.local/share}"/getkeys
|
12
.local/bin/ifinstalled
Executable file
12
.local/bin/ifinstalled
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Some optional functions in LARBS require programs not installed by default. I
|
||||
# use this little script to check to see if a command exists and if it doesn't
|
||||
# it informs the user that they need that command to continue. This is used in
|
||||
# various other scripts for clarity's sake.
|
||||
|
||||
for x in "$@"; do
|
||||
if ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1; then
|
||||
notify-send " $x" "must be installed for this function." && exit 1 ;
|
||||
fi
|
||||
done
|
9
.local/bin/lf-select
Executable file
9
.local/bin/lf-select
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Reads file names from stdin and selects them in lf.
|
||||
|
||||
while read -r file; do
|
||||
[ -z "$file" ] && continue
|
||||
lf -remote "send select \"$file\""
|
||||
lf -remote "send toggle"
|
||||
done
|
24
.local/bin/lfrun
Executable file
24
.local/bin/lfrun
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ -n "$DISPLAY" ]; then
|
||||
export FIFO_UEBERZUG="${TMPDIR:-/tmp}/lf-ueberzug-$$"
|
||||
|
||||
cleanup() {
|
||||
exec 3>&-
|
||||
rm "$FIFO_UEBERZUG"
|
||||
}
|
||||
|
||||
mkfifo "$FIFO_UEBERZUG"
|
||||
ueberzug layer -s <"$FIFO_UEBERZUG" &
|
||||
exec 3>"$FIFO_UEBERZUG"
|
||||
trap cleanup EXIT
|
||||
|
||||
if ! [ -d "$HOME/.cache/lf" ]; then
|
||||
mkdir -p "$HOME/.cache/lf"
|
||||
fi
|
||||
|
||||
lf "$@" 3>&-
|
||||
else
|
||||
exec lf "$@"
|
||||
fi
|
23
.local/bin/linkhandler
Executable file
23
.local/bin/linkhandler
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Feed script a url or file location.
|
||||
# If an image, it will view in sxiv,
|
||||
# if a video or gif, it will view in mpv
|
||||
# if a music file or pdf, it will download,
|
||||
# otherwise it opens link in browser.
|
||||
|
||||
# If no url given. Opens browser. For using script as $BROWSER.
|
||||
[ -z "$1" ] && { "$BROWSER"; exit; }
|
||||
|
||||
case "$1" in
|
||||
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)
|
||||
setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;;
|
||||
*png|*jpg|*jpe|*jpeg|*gif)
|
||||
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
|
||||
*pdf|*cbz|*cbr)
|
||||
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
|
||||
*mp3|*flac|*opus|*mp3?source*)
|
||||
qndl "$1" 'curl -LO' >/dev/null 2>&1 ;;
|
||||
*)
|
||||
[ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1
|
||||
esac
|
7
.local/bin/lvim
Executable file
7
.local/bin/lvim
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-"/home/luca/.local/share/lunarvim"}"
|
||||
export LUNARVIM_CONFIG_DIR="${LUNARVIM_CONFIG_DIR:-"/home/luca/.config/lvim"}"
|
||||
export LUNARVIM_CACHE_DIR="${LUNARVIM_CACHE_DIR:-"/home/luca/.cache/lvim"}"
|
||||
|
||||
exec nvim -u "$LUNARVIM_RUNTIME_DIR/lvim/init.lua" "$@"
|
14
.local/bin/maimpick
Executable file
14
.local/bin/maimpick
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This is bound to Shift+PrintScreen by default, requires maim. It lets you
|
||||
# choose the kind of screenshot to take, including copying the image or even
|
||||
# highlighting an area to copy. scrotcucks on suicidewatch right now.
|
||||
|
||||
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" ;;
|
||||
"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" ;;
|
||||
"a selected area (copy)") maim -s | 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 ;;
|
||||
esac
|
81
.local/bin/noisereduce
Executable file
81
.local/bin/noisereduce
Executable file
|
@ -0,0 +1,81 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
usage ()
|
||||
{
|
||||
printf "Usage : noisereduce <input video file> <output video file>\n"
|
||||
exit
|
||||
}
|
||||
|
||||
# Tests for requirements
|
||||
ifinstalled ffmpeg || { echo >&2 "We require 'ffmpeg' but it's not installed."; exit 1; }
|
||||
ifinstalled sox || { echo >&2 "We require 'ffmpeg' but it's not installed."; exit 1; }
|
||||
|
||||
if [ "$#" -ne 2 ]
|
||||
then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ ! -e "$1" ]
|
||||
then
|
||||
printf "File not found: %s\n" "$1"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -e "$2" ]
|
||||
then
|
||||
printf "File %s already exists, overwrite? [y/N]\n: " "$2"
|
||||
read -r yn
|
||||
case $yn in
|
||||
[Yy]* ) ;;
|
||||
* ) exit;;
|
||||
esac
|
||||
fi
|
||||
|
||||
inBasename=$(basename "$1")
|
||||
inExt="${inBasename##*.}"
|
||||
|
||||
isVideoStr=$(ffprobe -v warning -show_streams "$1" | grep codec_type=video)
|
||||
if [ -n "$isVideoStr" ]
|
||||
then
|
||||
isVideo=1
|
||||
printf "Detected %s as a video file\n" "$inBasename"
|
||||
else
|
||||
isVideo=0
|
||||
printf "Detected %s as an audio file\n" "$inBasename"
|
||||
fi
|
||||
|
||||
printf "Sample noise start time [00:00:00]: "
|
||||
read -r sampleStart
|
||||
if [ -z "$sampleStart" ] ; then sampleStart="00:00:00"; fi
|
||||
printf "Sample noise end time [00:00:00.900]: "
|
||||
read -r sampleEnd
|
||||
if [ -z "$sampleEnd" ] ; then sampleEnd="00:00:00.900"; fi
|
||||
printf "Noise reduction amount [0.21]: "
|
||||
read -r sensitivity
|
||||
if [ -z "$sensitivity" ] ; then sensitivity="0.21"; fi
|
||||
|
||||
|
||||
tmpVidFile="/tmp/noiseclean_tmpvid.$inExt"
|
||||
tmpAudFile="/tmp/noiseclean_tmpaud.wav"
|
||||
noiseAudFile="/tmp/noiseclean_noiseaud.wav"
|
||||
noiseProfFile="/tmp/noiseclean_noise.prof"
|
||||
tmpAudCleanFile="/tmp/noiseclean_tmpaud-clean.wav"
|
||||
|
||||
printf "Cleaning noise on %s...\n" "$1"
|
||||
|
||||
if [ $isVideo -eq "1" ]; then
|
||||
ffmpeg -v warning -y -i "$1" -qscale:v 0 -vcodec copy -an "$tmpVidFile"
|
||||
ffmpeg -v warning -y -i "$1" -qscale:a 0 "$tmpAudFile"
|
||||
else
|
||||
cp "$1" "$tmpAudFile"
|
||||
fi
|
||||
ffmpeg -v warning -y -i "$1" -vn -ss "$sampleStart" -t "$sampleEnd" "$noiseAudFile"
|
||||
sox "$noiseAudFile" -n noiseprof "$noiseProfFile"
|
||||
sox "$tmpAudFile" "$tmpAudCleanFile" noisered "$noiseProfFile" "$sensitivity"
|
||||
if [ $isVideo -eq "1" ]; then
|
||||
ffmpeg -v warning -y -i "$tmpAudCleanFile" -i "$tmpVidFile" -vcodec copy -qscale:v 0 -qscale:a 0 "$2"
|
||||
else
|
||||
cp "$tmpAudCleanFile" "$2"
|
||||
fi
|
||||
|
||||
printf "Done"
|
10
.local/bin/openfile
Executable file
10
.local/bin/openfile
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Helps open a file with xdg-open from mutt in a external program without weird side effects.
|
||||
tempdir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard/files"
|
||||
file="$tempdir/$(basename "$1")"
|
||||
[ "$(uname)" = "Darwin" ] && opener="open" || opener="setsid -f xdg-open"
|
||||
mkdir -p "$tempdir"
|
||||
cp -f "$1" "$file"
|
||||
$opener "$file" >/dev/null 2>&1
|
||||
find "${tempdir:?}" -mtime +1 -type f -delete
|
13
.local/bin/opout
Executable file
13
.local/bin/opout
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
# opout: "open output": A general handler for opening a file's intended output,
|
||||
# usually the pdf of a compiled document. I find this useful especially
|
||||
# running from vim.
|
||||
|
||||
basename="${1%.*}"
|
||||
|
||||
case "${*}" in
|
||||
*.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;;
|
||||
*.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;;
|
||||
*.sent) setsid -f sent "$1" >/dev/null 2>&1 ;;
|
||||
esac
|
53
.local/bin/otp
Executable file
53
.local/bin/otp
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Get a one-time password, or add a OTP secret to your pass-otp store.
|
||||
|
||||
# The assumption of this script is that all otp passwords are stored with the
|
||||
# suffix `-otp`. This script automatically appends newly added otps as such.
|
||||
|
||||
# For OTP passwords to be generated properly, it is important for the local
|
||||
# computer to have its time properly synced. This can be done with the command
|
||||
# below which requires the package `ntp`.
|
||||
|
||||
ifinstalled pass pass-otp
|
||||
|
||||
dir="${PASSWORD_STORE_DIR}"
|
||||
|
||||
choice="$({ echo "🆕add" ; echo "🕙sync-time" ; ls ${dir}/*-otp.gpg ;} | sed "s/.*\///;s/-otp.gpg//" | dmenu -p "Pick a 2FA:")"
|
||||
|
||||
case $choice in
|
||||
🆕add )
|
||||
ifinstalled maim zbar xclip || exit 1
|
||||
|
||||
temp="$dir/temp.png"
|
||||
otp="otp-test-script"
|
||||
trap 'shred -fu $temp; pass rm $otp' HUP INT QUIT TERM PWR EXIT
|
||||
|
||||
notify-send "Scan the image." "Scan the OTP QR code."
|
||||
|
||||
maim -s "$temp" || exit 1
|
||||
info="$(zbarimg -q "$temp")"
|
||||
info="${info#QR-Code:}"
|
||||
issuer="$(echo "$info" | grep -o "issuer=[A-z0-9]\+")"
|
||||
name="${issuer#issuer=}"
|
||||
|
||||
if echo "$info" | pass otp insert "$otp"; then
|
||||
while true ; do
|
||||
export name="$(prinf | dmenu -p "Give this One Time Password a one-word name:")"
|
||||
echo "$name" | grep -q -- "^[A-z0-9-]\+$" && break
|
||||
done
|
||||
pass mv "$otp" "$name-otp"
|
||||
notify-send "Successfully added." "$name-otp has been created."
|
||||
else
|
||||
notify-send "No OTP data found." "Try to scan the image again more precisely."
|
||||
fi
|
||||
|
||||
;;
|
||||
🕙sync-time )
|
||||
ifinstalled ntp || exit 1
|
||||
notify-send -u low "🕙 Synchronizing Time..." "Synching time with remote NTP servers..."
|
||||
updatedata="$(sudo ntpdate pool.ntp.org)" &&
|
||||
notify-send -u low "🕙 Synchronizing Time..." "Done. Time changed by ${updatedata#*offset }"
|
||||
;;
|
||||
*) pass otp -c ${choice}-otp ;;
|
||||
esac
|
10
.local/bin/pauseallmpv
Executable file
10
.local/bin/pauseallmpv
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# You might notice all mpv commands are aliased to have this input-ipc-server
|
||||
# thing. That's just for this particular command, which allows us to pause
|
||||
# every single one of them with one command! This is bound to super + shift + p
|
||||
# (with other things) by default and is used in some other places.
|
||||
|
||||
for i in $(ls /tmp/mpvSockets/*); do
|
||||
echo '{ "command": ["set_property", "pause", true] }' | socat - "$i";
|
||||
done
|
7
.local/bin/peertubetorrent
Executable file
7
.local/bin/peertubetorrent
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
# torrent peertube videos, requires the transadd script
|
||||
# first argument is the video link, second is the quality (480 or 1080)
|
||||
# 13/07/20 - Arthur Bais
|
||||
|
||||
link="$(echo "$1" | sed "s/w/download\/torrents/")""-$2.torrent"
|
||||
transadd "$link"
|
7
.local/bin/podentr
Executable file
7
.local/bin/podentr
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# entr command to run `queueandnotify` when newsboat queue is changed
|
||||
|
||||
[ "$(pgrep -x "$(basename "$0")" | wc -l)" -gt 2 ] && exit
|
||||
|
||||
echo "${XDG_DATA_HOME:-$HOME/.local/share}"/newsboat/queue | entr -p queueandnotify 2>/dev/null
|
8
.local/bin/prompt
Executable file
8
.local/bin/prompt
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# A dmenu binary prompt script.
|
||||
# Gives a dmenu prompt labeled with $1 to perform command $2.
|
||||
# For example:
|
||||
# `./prompt "Do you want to shutdown?" "shutdown -h now"`
|
||||
|
||||
[ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray )" = "Yes" ] && $2
|
12
.local/bin/qndl
Executable file
12
.local/bin/qndl
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $1 is a url; $2 is a command
|
||||
[ -z "$1" ] && exit
|
||||
base="$(basename "$1")"
|
||||
notify-send "⏳ Queuing $base..."
|
||||
cmd="$2"
|
||||
[ -z "$cmd" ] && cmd="youtube-dl --add-metadata -ic"
|
||||
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 "👍 $realname done."
|
14
.local/bin/queueandnotify
Executable file
14
.local/bin/queueandnotify
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Podboat sucks. This script replaces it.
|
||||
# It reads the newsboat queue, queuing downloads with taskspooler.
|
||||
# It also removes the junk from extentions.
|
||||
queuefile="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue"
|
||||
|
||||
while read -r line; do
|
||||
[ -z "$line" ] && continue
|
||||
url="${line%%[ ]*}"
|
||||
qndl "$url" "curl -LO"
|
||||
done < "$queuefile"
|
||||
|
||||
echo > "$queuefile"
|
13
.local/bin/remaps
Executable file
13
.local/bin/remaps
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script is called on startup to remap keys.
|
||||
# Increase key speed via a rate change
|
||||
xset r rate 300 50
|
||||
# Map the caps lock key to super and change keymap
|
||||
setxkbmap -layout de -option caps:super
|
||||
# But when it is pressed only once, treat it as escape.
|
||||
# killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
|
||||
# Map the menu button to right super as well.
|
||||
xmodmap -e 'keycode 135 = Super_R'
|
||||
# Turn off the caps lock if on since there is no longer a key for it.
|
||||
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
|
12
.local/bin/rotdir
Executable file
12
.local/bin/rotdir
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# When I open an image from the file manager in sxiv (the image viewer), I want
|
||||
# to be able to press the next/previous keys to key through the rest of the
|
||||
# images in the same directory. This script "rotates" the content of a
|
||||
# directory based on the first chosen file, so that if I open the 15th image,
|
||||
# if I press next, it will go to the 16th etc. Autistic, I know, but this is
|
||||
# one of the reasons that sxiv is great for being able to read standard input.
|
||||
|
||||
[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1
|
||||
base="$(basename "$1")"
|
||||
ls "$PWD" | awk -v BASE="$base" 'BEGIN { lines = ""; m = 0; } { if ($0 == BASE) { m = 1; } } { if (!m) { if (lines) { lines = lines"\n"; } lines = lines""$0; } else { print $0; } } END { print lines; }'
|
18
.local/bin/rssadd
Executable file
18
.local/bin/rssadd
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
if echo "$1" | grep -q "https*://\S\+\.[A-Za-z]\+\S*" ; then
|
||||
url="$1"
|
||||
else
|
||||
url="$(grep -Eom1 '<[^>]+(rel="self"|application/[a-z]+\+xml)[^>]+>' "$1" |
|
||||
grep -o "https?://[^\" ]")"
|
||||
|
||||
echo "$url" | grep -q "https*://\S\+\.[A-Za-z]\+\S*" ||
|
||||
notify-send "That doesn't look like a full URL." && exit 1
|
||||
fi
|
||||
|
||||
RSSFILE="${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls"
|
||||
if awk '{print $1}' "$RSSFILE" | grep "^$url$" >/dev/null; then
|
||||
notify-send "You already have this RSS feed."
|
||||
else
|
||||
echo "$url" >> "$RSSFILE" && notify-send "RSS feed added."
|
||||
fi
|
10
.local/bin/samedir
Executable file
10
.local/bin/samedir
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Open a terminal window in the same directory as the currently active window.
|
||||
|
||||
PID=$(xprop -id "$(xprop -root | xprop -root | sed -n "/_NET_ACTIVE_WINDOW/ s/^.*# // p")" | sed -n "/PID/ s/^.*= // p")
|
||||
PID="$(pstree -lpA "$PID")"
|
||||
PID="${PID##*(}"
|
||||
PID="${PID%)}"
|
||||
cd "$(readlink /proc/"$PID"/cwd)" || return 1
|
||||
"$TERMINAL"
|
33
.local/bin/setbg
Executable file
33
.local/bin/setbg
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script does the following:
|
||||
# Run by itself, set the wallpaper (at X start).
|
||||
# If given a file, set that as the new wallpaper.
|
||||
# If given a directory, choose random file in it.
|
||||
# If wal is installed, also generates a colorscheme.
|
||||
|
||||
# Location of link to wallpaper link.
|
||||
bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/bg"
|
||||
|
||||
# Configuration files of applications that have their themes changed by pywal.
|
||||
dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
|
||||
zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc"
|
||||
|
||||
trueloc="$(readlink -f "$1")" &&
|
||||
case "$(file --mime-type -b "$trueloc")" in
|
||||
image/* ) ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." ;;
|
||||
inode/directory ) ln -sf "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random Wallpaper chosen." ;;
|
||||
*) notify-send "Error" "Not a valid image." ; exit 1;;
|
||||
esac
|
||||
|
||||
# If pywal is installed, use it.
|
||||
if command -v wal >/dev/null 2>&1 ; then
|
||||
wal -i "$(readlink -f $bgloc)" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 &&
|
||||
pidof dwm >/dev/null && xdotool key super+F12
|
||||
# If pywal is removed, return config files to normal.
|
||||
else
|
||||
[ -f "$dunstconf.bak" ] && unlink "$dunstconf" && mv "$dunstconf.bak" "$dunstconf"
|
||||
[ -f "$zathuraconf.bak" ] && unlink "$zathuraconf" && mv "$zathuraconf.bak" "$zathuraconf"
|
||||
fi
|
||||
|
||||
xwallpaper --zoom "$bgloc"
|
40
.local/bin/shortcuts
Executable file
40
.local/bin/shortcuts
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
|
||||
bmdirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs"
|
||||
bmfiles="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files"
|
||||
|
||||
# Output locations. Unactivated progs should go to /dev/null.
|
||||
shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
|
||||
zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
|
||||
lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc"
|
||||
ranger_shortcuts="/dev/null"
|
||||
qute_shortcuts="/dev/null"
|
||||
fish_shortcuts="/dev/null"
|
||||
vifm_shortcuts="/dev/null"
|
||||
|
||||
# Remove, prepare files
|
||||
rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" 2>/dev/null
|
||||
printf "# vim: filetype=sh\\n" > "$fish_shortcuts"
|
||||
printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
|
||||
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
|
||||
|
||||
# Format the `directories` file in the correct syntax and sent it to all three configs.
|
||||
eval "echo \"$(cat "$bmdirs")\"" | \
|
||||
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
||||
printf(\"%s=\42cd %s && ls -a\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
|
||||
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
|
||||
printf(\"abbr %s \42cd %s; and ls -a\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ;
|
||||
printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ;
|
||||
printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ;
|
||||
printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ;
|
||||
printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
|
||||
|
||||
# Format the `files` file in the correct syntax and sent it to both configs.
|
||||
eval "echo \"$(cat "$bmfiles")\"" | \
|
||||
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
||||
printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
|
||||
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
|
||||
printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ;
|
||||
printf(\"map %s :e %s<CR> \n\",\$1,\$2) >> \"$vifm_shortcuts\" ;
|
||||
printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ;
|
||||
printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
|
126
.local/bin/slider
Executable file
126
.local/bin/slider
Executable file
|
@ -0,0 +1,126 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Give a file with images and timecodes and creates a video slideshow of them.
|
||||
#
|
||||
# Timecodes must be in format 00:00:00.
|
||||
#
|
||||
# Imagemagick and ffmpeg required.
|
||||
|
||||
# Application cache if not stated elsewhere.
|
||||
cache="${XDG_CACHE_HOME:-$HOME/.cache}/slider"
|
||||
|
||||
while getopts "hvrpi:c:a:o:d:f:t:e:x:" o; do case "${o}" in
|
||||
c) bgc="$OPTARG" ;;
|
||||
t) fgc="$OPTARG" ;;
|
||||
f) font="$OPTARG" ;;
|
||||
i) file="$OPTARG" ;;
|
||||
a) audio="$OPTARG" ;;
|
||||
o) outfile="$OPTARG" ;;
|
||||
d) prepdir="$OPTARG" ;;
|
||||
r) redo="$OPTARG" ;;
|
||||
s) ppt="$OPTARG" ;;
|
||||
e) endtime="$OPTARG" ;;
|
||||
x) res="$OPTARG"
|
||||
echo "$res" | grep -qv "^[0-9]\+x[0-9]\+$" &&
|
||||
echo "Resolution must be dimensions separated by a 'x': 1280x720, etc." &&
|
||||
exit 1 ;;
|
||||
p) echo "Purge old build files in $cache? [y/N]"
|
||||
read -r confirm
|
||||
echo "$confirm" | grep -iq "^y$" && rm -rf "$cache" && echo "Done."
|
||||
exit ;;
|
||||
v) verbose=True ;;
|
||||
*) echo "$(basename "$0") usage:
|
||||
-i input timecode list (required)
|
||||
-a audio file
|
||||
-c color of background (use html names, black is default)
|
||||
-t text color for text slides (white is default)
|
||||
-s text font size for text slides (150 is default)
|
||||
-f text font for text slides (sans serif is default)
|
||||
-o output video file
|
||||
-e if no audio given, the time in seconds that the last slide will be shown (5 is default)
|
||||
-x resolution (1920x1080 is default)
|
||||
-d tmp directory
|
||||
-r rerun imagemagick commands even if done previously (in case files or background has changed)
|
||||
-p purge old build files instead of running
|
||||
-v be verbose" && exit 1
|
||||
|
||||
esac done
|
||||
|
||||
# Check that the input file looks like it should.
|
||||
{ head -n 1 "$file" 2>/dev/null | grep -q "^00:00:00 " ;} || {
|
||||
echo "Give an input file with -i." &&
|
||||
echo "The file should look as this example:
|
||||
|
||||
00:00:00 first_image.jpg
|
||||
00:00:03 otherdirectory/next_image.jpg
|
||||
00:00:09 this_image_starts_at_9_seconds.jpg
|
||||
etc...
|
||||
|
||||
Timecodes and filenames must be separated by Tabs." &&
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -n "${audio+x}" ]; then
|
||||
# Check that the audio file looks like an actual audio file.
|
||||
case "$(file --dereference --brief --mime-type -- "$audio")" in
|
||||
audio/*) ;;
|
||||
*) echo "That doesn't look like an audio file."; exit 1 ;;
|
||||
esac
|
||||
totseconds="$(date '+%s' -d $(ffmpeg -i "$audio" 2>&1 | awk '/Duration/ {print $2}' | sed s/,//))"
|
||||
endtime="$((totseconds-seconds))"
|
||||
fi
|
||||
|
||||
prepdir="${prepdir:-$cache/$file}"
|
||||
outfile="${outfile:-$file.mp4}"
|
||||
prepfile="$prepdir/$file.prep"
|
||||
|
||||
[ -n "${verbose+x}" ] && echo "Preparing images... May take a while depending on the number of files."
|
||||
mkdir -p "$prepdir"
|
||||
|
||||
{
|
||||
while read -r x;
|
||||
do
|
||||
# Get the time from the first column.
|
||||
time="${x%% *}"
|
||||
seconds="$(date '+%s' -d "$time")"
|
||||
# Duration is not used on the first looped item.
|
||||
duration="$((seconds - prevseconds))"
|
||||
|
||||
# Get the filename/text content from the rest.
|
||||
content="${x#* }"
|
||||
base="$(basename "$content")"
|
||||
base="${base%.*}.jpg"
|
||||
|
||||
if [ -f "$content" ]; then
|
||||
# If images have already been made in a previous run, do not recreate
|
||||
# them unless -r was given.
|
||||
{ [ ! -f "$prepdir/$base" ] || [ -n "${redo+x}" ] ;} &&
|
||||
convert -size "${res:-1920x1080}" canvas:"${bgc:-black}" -gravity center "$content" -resize 1920x1080 -composite "$prepdir/$base"
|
||||
else
|
||||
{ [ ! -f "$prepdir/$base" ] || [ -n "${redo+x}" ] ;} &&
|
||||
convert -size "${res:-1920x1080}" -background "${bgc:-black}" -fill "${fgc:-white}" -font "${font:-Sans}" -pointsize "${ppt:-150}" -gravity center label:"$content" "$prepdir/$base"
|
||||
fi
|
||||
|
||||
# If the first line, do not write yet.
|
||||
[ "$time" = "00:00:00" ] || echo "file '$prevbase'
|
||||
duration $duration"
|
||||
|
||||
# Keep the information required for the next file.
|
||||
prevbase="$base"
|
||||
prevtime="$time"
|
||||
prevseconds="$(date '+%s' -d "$prevtime")"
|
||||
done < "$file"
|
||||
# Do last file which must be given twice as follows
|
||||
echo "file '$base'
|
||||
duration ${endtime:-5}
|
||||
file '$base'"
|
||||
} > "$prepfile"
|
||||
if [ -n "${audio+x}" ]; then
|
||||
ffmpeg -hide_banner -y -f concat -safe 0 -i "$prepfile" -i "$audio" -c:a aac -vsync vfr -c:v libx264 -pix_fmt yuv420p "$outfile"
|
||||
else
|
||||
ffmpeg -hide_banner -y -f concat -safe 0 -i "$prepfile" -vsync vfr -c:v libx264 -pix_fmt yuv420p "$outfile"
|
||||
fi
|
||||
|
||||
# Might also try:
|
||||
# -vf "fps=${fps:-24},format=yuv420p" "$outfile"
|
||||
# but has given some problems.
|
29
.local/bin/statusbar/sb-clock
Executable file
29
.local/bin/statusbar/sb-clock
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
clock=$(date '+%I')
|
||||
|
||||
case "$clock" in
|
||||
"00") icon=" " ;;
|
||||
"01") icon=" " ;;
|
||||
"02") icon=" " ;;
|
||||
"03") icon=" " ;;
|
||||
"04") icon=" " ;;
|
||||
"05") icon=" " ;;
|
||||
"06") icon=" " ;;
|
||||
"07") icon=" " ;;
|
||||
"08") icon=" " ;;
|
||||
"09") icon=" " ;;
|
||||
"10") icon=" " ;;
|
||||
"11") icon=" " ;;
|
||||
"12") icon=" " ;;
|
||||
esac
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;;
|
||||
2) setsid -f "$TERMINAL" -e calcurse ;;
|
||||
3) notify-send " Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\`
|
||||
- Middle click opens calcurse if installed" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
date "+%Y %b %d (%a) $icon%I:%M%p"
|
12
.local/bin/statusbar/sb-cpu
Executable file
12
.local/bin/statusbar/sb-cpu
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send " CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)\\n(100% per core)" ;;
|
||||
2) setsid -f "$TERMINAL" -e htop ;;
|
||||
3) notify-send " CPU module " "\- Shows CPU temperature.
|
||||
- Click to show intensive processes.
|
||||
- Middle click to open htop." ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
sensors | awk '/Core 0/ {print "🌡" $3}'
|
44
.local/bin/statusbar/sb-cpubars
Executable file
44
.local/bin/statusbar/sb-cpubars
Executable file
|
@ -0,0 +1,44 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Module showing CPU load as a changing bars.
|
||||
# Just like in polybar.
|
||||
# Each bar represents amount of load on one core since
|
||||
# last run.
|
||||
|
||||
# Cache in tmpfs to improve speed and reduce SSD load
|
||||
cache=/tmp/cpubarscache
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
2) setsid -f "$TERMINAL" -e htop ;;
|
||||
3) notify-send " CPU load module" "Each bar represents
|
||||
one CPU core";;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
# id total idle
|
||||
stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat)
|
||||
[ ! -f $cache ] && echo "$stats" > "$cache"
|
||||
old=$(cat "$cache")
|
||||
printf ""
|
||||
echo "$stats" | while read -r row; do
|
||||
id=${row%% *}
|
||||
rest=${row#* }
|
||||
total=${rest%% *}
|
||||
idle=${rest##* }
|
||||
|
||||
case "$(echo "$old" | awk '{if ($1 == id)
|
||||
printf "%d\n", (1 - (idle - $3) / (total - $2))*100 /12.5}' \
|
||||
id="$id" total="$total" idle="$idle")" in
|
||||
|
||||
"0") printf "▁";;
|
||||
"1") printf "▂";;
|
||||
"2") printf "▃";;
|
||||
"3") printf "▄";;
|
||||
"4") printf "▅";;
|
||||
"5") printf "▆";;
|
||||
"6") printf "▇";;
|
||||
"7") printf "█";;
|
||||
"8") printf "█";;
|
||||
esac
|
||||
done; printf "\\n"
|
||||
echo "$stats" > "$cache"
|
23
.local/bin/statusbar/sb-disk
Executable file
23
.local/bin/statusbar/sb-disk
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Status bar module for disk space
|
||||
# $1 should be drive mountpoint, otherwise assumed /.
|
||||
|
||||
location=${1:-/}
|
||||
|
||||
[ -d "$location" ] || exit
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send " Disk space" "$(df -h --output=target,used,size)" ;;
|
||||
3) notify-send " Disk module" "\- Shows used hard drive space.
|
||||
- Click to show all disk info." ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
case "$location" in
|
||||
"/home"* ) icon="" ;;
|
||||
"/mnt"* ) icon="禍" ;;
|
||||
*) icon="ﲾ";;
|
||||
esac
|
||||
|
||||
printf "%s: %s\n" "$icon" "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')"
|
54
.local/bin/statusbar/sb-forecast
Executable file
54
.local/bin/statusbar/sb-forecast
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Displays todays precipication chance (☔) and daily low (🥶) and high (🌞).
|
||||
# Usually intended for the statusbar.
|
||||
|
||||
# If we have internet, get a weather report from wttr.in and store it locally.
|
||||
# You could set up a shell alias to view the full file in a pager in the
|
||||
# terminal if desired. This function will only be run once a day when needed.
|
||||
# Options can be found at https://wttr.in/:help
|
||||
weatherreport="${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport"
|
||||
weatheremoji="${XDG_DATA_HOME:-$HOME/.local/share}/weatheremoji"
|
||||
url="wttr.in/Karlsruhe"
|
||||
opt="?F"
|
||||
emojiopt="?format=1"
|
||||
convertemoji() {
|
||||
sed -i '
|
||||
s/☀️//
|
||||
s/☁️//
|
||||
s/⛅️//
|
||||
s/⛈//
|
||||
s/✨//
|
||||
s/❄️//
|
||||
s/🌦//
|
||||
s/🌧//
|
||||
s/🌨//
|
||||
s/🌩//
|
||||
s/🌫//
|
||||
' ${weatheremoji}
|
||||
}
|
||||
getforecast() { curl -sf "$url$opt" > "$weatherreport" && curl -sf "$url$emojiopt" > "$weatheremoji" || exit 1 ;}
|
||||
|
||||
# Some very particular and terse stream manipulation. We get the maximum
|
||||
# precipitation chance and the daily high and low from the downloaded file and
|
||||
# display them with coresponding emojis.
|
||||
showweather() { emoji=$(cat $weatheremoji) && printf "%s" "$(sed '16q;d' "$weatherreport" |
|
||||
grep -wo "[0-9]*%" | sort -rn | sed "s/^/ ${emoji:0:1} /g;1q" | tr -d '\n')"
|
||||
sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " " $1 "°"," " $2 "°"}' ;}
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f "$TERMINAL" -e less -Srf "$weatherreport" ;;
|
||||
2) getforecast && showweather ;;
|
||||
3) notify-send " Weather module" "\- Left click for full forecast.
|
||||
- Middle click to update forecast.
|
||||
${emoji}: Chance of rain/snow
|
||||
: Daily low
|
||||
: Daily high" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
# The test if our forcecast is updated to the day. If it isn't download a new
|
||||
# weather report from wttr.in with the above function.
|
||||
[ "$(stat -c %y "$weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
|
||||
getforecast && convertemoji
|
||||
showweather
|
17
.local/bin/statusbar/sb-help-icon
Executable file
17
.local/bin/statusbar/sb-help-icon
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
# The clickable help menu. Middle click to restart wm.
|
||||
|
||||
# If dwm is running, use dwm's readme and restart.
|
||||
pidof dwm >/dev/null &&
|
||||
READMEFILE=/usr/local/share/dwm/larbs.mom
|
||||
restartwm() { pkill -HUP dwm ;} ||
|
||||
restartwm() { i3 restart ;}
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) groff -mom "${READMEFILE:-${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom}" -Tpdf | zathura - ;;
|
||||
2) restartwm ;;
|
||||
3) notify-send "❓ Help module" "\- Left click to open LARBS guide.
|
||||
- Middle click to refresh window manager." ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac; echo "❓"
|
26
.local/bin/statusbar/sb-internet
Executable file
26
.local/bin/statusbar/sb-internet
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Show wifi 直 and percent strength or 睊 if none.
|
||||
# Show if connected to ethernet or if none.
|
||||
# Show 嬨 if a vpn connection is active
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;;
|
||||
3) notify-send " Internet module" "\- Click to connect
|
||||
: wifi disabled
|
||||
睊: no wifi connection
|
||||
直: wifi connection with quality
|
||||
: no ethernet
|
||||
: ethernet working
|
||||
嬨: vpn is active
|
||||
" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
|
||||
wifiicon="$(awk '/^\s*w/ { print "直 ", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
|
||||
elif grep -xq 'down' /sys/class/net/w*/operstate 2>/dev/null ; then
|
||||
grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="睊 " || wifiicon=" "
|
||||
fi
|
||||
|
||||
printf "%s%s%s\n" "$wifiicon" "$(sed "s/down/ /;s/up/ /" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/嬨 /" /sys/class/net/tun*/operstate 2>/dev/null)"
|
10
.local/bin/statusbar/sb-iplocate
Executable file
10
.local/bin/statusbar/sb-iplocate
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Gets your public ip address checks which country you are in and
|
||||
# displays that information in the statusbar
|
||||
#
|
||||
# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/
|
||||
|
||||
ifinstalled "geoip" || exit
|
||||
addr="$(curl ifconfig.me 2>/dev/null)" || exit
|
||||
grep "flag: " "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji" | grep "$(geoiplookup "$addr" | sed 's/.*, //')" | sed "s/flag: //;s/;.*//"
|
16
.local/bin/statusbar/sb-kbselect
Executable file
16
.local/bin/statusbar/sb-kbselect
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
# works on any init system
|
||||
# requirements: dmenu, xorg-setxkbmap
|
||||
kb="$(setxkbmap -query | grep -oP 'layout:\s*\K\w+')" || exit 1
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) kb_choice="$(awk '/! layout/{flag=1; next} /! variant/{flag=0} flag {print $2, "- " $1}' /usr/share/X11/xkb/rules/base.lst | dmenu -l 15)"
|
||||
kb="$(echo "$kb_choice" | awk '{print $3}')"
|
||||
setxkbmap "$kb"
|
||||
pkill -RTMIN+30 "${STATUSBAR:-dwmblocks}";;
|
||||
3) notify-send "⌨ Keyboard/language module" "$(printf "%s" "\- Current layout: $(setxkbmap -query | grep -oP 'layout:\s*\K\w+')")
|
||||
- Left click to change keyboard.";;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
echo "$kb"
|
20
.local/bin/statusbar/sb-mailbox
Executable file
20
.local/bin/statusbar/sb-mailbox
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Displays number of unread mail and an loading icon if updating.
|
||||
# When clicked, brings up `neomutt`.
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f claws-mail --alternate-config-dir $CLAWSRC ;;
|
||||
2) setsid -f mw -Y >/dev/null ;;
|
||||
3) notify-send " Mail module" "\- Shows unread mail
|
||||
- Shows 痢 if syncing mail
|
||||
- Left click opens claws mail
|
||||
- Middle click syncs mail" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
unread="$(find "${XDG_DATA_HOME:-$HOME/.config}"/claws-mail/imapcache/imap.gmail.com/luca.bilke/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)"
|
||||
|
||||
pidof mbsync >/dev/null 2>&1 && icon="痢"
|
||||
|
||||
[ "$unread" = "0" ] && [ "$icon" = "" ] || echo " $unread$icon"
|
12
.local/bin/statusbar/sb-memory
Executable file
12
.local/bin/statusbar/sb-memory
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send " Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
|
||||
2) setsid -f "$TERMINAL" -e htop ;;
|
||||
3) notify-send " Memory module" "\- Shows Memory Used/Total.
|
||||
- Click to show memory hogs.
|
||||
- Middle click to open htop." ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}'
|
8
.local/bin/statusbar/sb-mpdup
Executable file
8
.local/bin/statusbar/sb-mpdup
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This loop will update the mpd statusbar module whenever a command changes the
|
||||
# music player's status. mpd must be running on X's start for this to work.
|
||||
|
||||
while : ; do
|
||||
mpc idle >/dev/null && kill -45 "$(pidof "${STATUSBAR:-dwmblocks}")" || break
|
||||
done
|
19
.local/bin/statusbar/sb-music
Executable file
19
.local/bin/statusbar/sb-music
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;}
|
||||
|
||||
pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 &
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) mpc status | filter ; setsid -f "$TERMINAL" -e ncmpcpp ;; # right click, pause/unpause
|
||||
2) mpc toggle | filter ;; # right click, pause/unpause
|
||||
3) mpc status | filter ; notify-send "🎵 Music module" "\- Shows mpd song playing.
|
||||
- ⏸ when paused.
|
||||
- Left click opens ncmpcpp.
|
||||
- Middle click pauses.
|
||||
- Scroll changes track.";; # right click, pause/unpause
|
||||
4) mpc prev | filter ;; # scroll up, previous
|
||||
5) mpc next | filter ;; # scroll down, next
|
||||
6) mpc status | filter ; "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
*) mpc status | filter ;;
|
||||
esac
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue