configs. fixed misspell. added gen-thumb-md.

generates thumbnails for videos and puts all video and non video in a markdown file
This commit is contained in:
iceyrazor 2025-06-21 23:06:47 -05:00
parent 3252a201c1
commit 56a9849623
5 changed files with 77 additions and 4 deletions

View File

@ -70,7 +70,7 @@ alias music="nohup vlc $YT_PLAYLIST_DIR/title_vids > /dev/null 2> /dev/null < /d
alias ibuss="ibus-daemon -rxRd" alias ibuss="ibus-daemon -rxRd"
alias ygg="fukn bash -c 'mkdir /var/run/yggdrasil; yggdrasil -useconf < /etc/yggdrasil.conf'" alias ygg="fukn bash -c 'mkdir /var/run/yggdrasil; yggdrasil -useconf < /etc/yggdrasil.conf'"
alias obss="obs && obs --enable-media-stream & disown" alias obss="obs && obs --enable-media-stream & disown"
alias get_channel_id="xargs curl -s | grep -Eo 'channel_id=.{0,50}' | sed 's/\".*//g' | fzf | xargs printf \"https://www.youtube.com/feeds/videos.xml?%s\" | xclip -selection clipboard" alias get_channel_id="xargs curl -s | grep -Eo 'channel_id=.{0,50}' | sed 's/\".*//g' | fzf | xargs printf \"https://www.youtube.com/feeds/videos.xml?%s\""
alias vasm="~/stuff/manual-programs/vasm/vasm6502_oldstyle -Fbin -dotdir " alias vasm="~/stuff/manual-programs/vasm/vasm6502_oldstyle -Fbin -dotdir "
alias pipes="pipes.sh -t 0 -p 3 -f 30 -r 2000" alias pipes="pipes.sh -t 0 -p 3 -f 30 -r 2000"

View File

@ -32,7 +32,8 @@ if ok then
vim.keymap.set("n", "<Leader>dl", function() dap.step_into() end) vim.keymap.set("n", "<Leader>dl", function() dap.step_into() end)
vim.keymap.set("n", "<Leader>dj", function() dap.step_over() end) vim.keymap.set("n", "<Leader>dj", function() dap.step_over() end)
vim.keymap.set("n", "<Leader>dk", function() dap.step_out() end) vim.keymap.set("n", "<Leader>dk", function() dap.step_out() end)
vim.keymap.set("n", "<Leader>dc", function() dap.continue() end) vim.keymap.set("n", "<Leader>dc", function() dap.run(dap.configurations.rust[1]) end)
vim.keymap.set("n", "<Leader>dC", function() dap.continue() end)
vim.keymap.set("n", "<Leader>db", function() dap.toggle_breakpoint() end) vim.keymap.set("n", "<Leader>db", function() dap.toggle_breakpoint() end)
vim.keymap.set("n", "<Leader>dB", function() vim.keymap.set("n", "<Leader>dB", function()
dap.set_breakpoint(vim.fn.input('Breakpoint condition: ')) dap.set_breakpoint(vim.fn.input('Breakpoint condition: '))
@ -65,6 +66,7 @@ if ok then
request = "launch", request = "launch",
program = function() program = function()
--return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug/", "file") --return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug/", "file")
vim.fn.jobstart('cargo build')
if vim.fn.expand("%:t:r") == "main" then if vim.fn.expand("%:t:r") == "main" then
return vim.fn.getcwd() .. "/target/debug/" .. vim.fn.fnamemodify(vim.fn.getcwd(), ':t') return vim.fn.getcwd() .. "/target/debug/" .. vim.fn.fnamemodify(vim.fn.getcwd(), ':t')
else else

View File

@ -38,7 +38,7 @@ vim.keymap.set('v', '<', '<gv', {noremap = true})
vim.keymap.set('v', '>', '>gv', {noremap = true}) vim.keymap.set('v', '>', '>gv', {noremap = true})
--reize with arrows --reize with alt
vim.keymap.set('n', '<A-k>', ':resize -2<CR>') vim.keymap.set('n', '<A-k>', ':resize -2<CR>')
vim.keymap.set('n', '<A-j>', ':resize +2<CR>') vim.keymap.set('n', '<A-j>', ':resize +2<CR>')
vim.keymap.set('n', '<A-h>', ':vertical resize -2<CR>') vim.keymap.set('n', '<A-h>', ':vertical resize -2<CR>')

View File

@ -15,7 +15,7 @@ fsyncb () {
fi fi
} }
syncfile="stuff .surf/styles .gnupg .ssh .local/bin/lf-gadgets .config/FreeTube .config/wlxoverlay .config/newsboat .config/zsh .config/vesktop/themes .keepass .config/Pinta .config/cmus .config/cava .local/share/applications/custom .local/share/osu" syncfile="stuff .surf/styles .config/eDEX-UI/ .gnupg .ssh .local/bin/lf-gadgets .config/FreeTube .config/wlxoverlay .config/newsboat .config/zsh .config/vesktop/themes .keepass .config/Pinta .config/cmus .config/cava .local/share/applications/custom .local/share/osu"
# se shit # se shit
syncfile="$syncfile /home/iceyrazor/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/Blueprints /home/iceyrazor/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/IngameScripts /home/iceyrazor/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/Saves" syncfile="$syncfile /home/iceyrazor/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/Blueprints /home/iceyrazor/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/IngameScripts /home/iceyrazor/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/Saves"

71
env/.local/bin/scripts/gen-thumb-md vendored Executable file
View File

@ -0,0 +1,71 @@
#!/bin/bash
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
disable_thumb_gen=0
disable_auto_editor=0
while getopts "de" opt; do
case "$opt" in
d) disable_thumb_gen=1
;;
e) disable_auto_editor=1
;;
esac
done
shift $((OPTIND-1))
[ "${1:-}" = "--" ] && shift
[ "$1" ] && view_dir="$1"
if [ ! "$view_dir" ]; then
echo NO DIR
exit 1
fi
view_dir="$( cd "$view_dir" &> /dev/null && pwd )"
to_file() {
printf -- "- [%s](<%s>)" "$2" "$1" >> genthumb.md
if [ $3 == 1 ]; then
printf -- "\n - ![%s](</tmp/gen-thumb-md/%s.png>)\n" "$2" "$2" >> genthumb.md
else
printf -- "\n - ![%s](<%s>)\n" "$2" "$1" >> genthumb.md
fi
}
gen_thumb() {
file="$1"
file_name="$(basename "$file")"
case "$file" in
*.avi|*.gif|*.mp4|*.mkv|*.webm|*.mov)
if [ $disable_thumb_gen == 0 ]; then
ffmpegthumbnailer -i "$file" -s 0 -q 5 -o "/tmp/gen-thumb-md/$file_name.png"
fi
to_file "$file" "$file_name" 1
;;
*)
to_file "$file" "$file_name" 0
;;
esac
}
if [ ! -d /tmp/gen-thumb-md ]; then
mkdir /tmp/gen-thumb-md
fi
printf "# gen thumb $view_dir\n\n" > genthumb.md
files="$(find "$view_dir" -type f)"
printf "$files" | while read file; do
gen_thumb "$file"
done
if [ $disable_auto_editor == 0 ]; then
$EDITOR ./genthumb.md
fi