diff --git a/env/.config/.profile b/env/.config/.profile index 3512850..464a550 100755 --- a/env/.config/.profile +++ b/env/.config/.profile @@ -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 ygg="fukn bash -c 'mkdir /var/run/yggdrasil; yggdrasil -useconf < /etc/yggdrasil.conf'" 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 pipes="pipes.sh -t 0 -p 3 -f 30 -r 2000" diff --git a/env/.config/nvim/after/plugin/dap.lua b/env/.config/nvim/after/plugin/dap.lua index b52a5e4..9e16f83 100644 --- a/env/.config/nvim/after/plugin/dap.lua +++ b/env/.config/nvim/after/plugin/dap.lua @@ -32,7 +32,8 @@ if ok then vim.keymap.set("n", "dl", function() dap.step_into() end) vim.keymap.set("n", "dj", function() dap.step_over() end) vim.keymap.set("n", "dk", function() dap.step_out() end) - vim.keymap.set("n", "dc", function() dap.continue() end) + vim.keymap.set("n", "dc", function() dap.run(dap.configurations.rust[1]) end) + vim.keymap.set("n", "dC", function() dap.continue() end) vim.keymap.set("n", "db", function() dap.toggle_breakpoint() end) vim.keymap.set("n", "dB", function() dap.set_breakpoint(vim.fn.input('Breakpoint condition: ')) @@ -65,6 +66,7 @@ if ok then request = "launch", program = function() --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 return vim.fn.getcwd() .. "/target/debug/" .. vim.fn.fnamemodify(vim.fn.getcwd(), ':t') else diff --git a/env/.config/nvim/lua/yourmom/remap.lua b/env/.config/nvim/lua/yourmom/remap.lua index 30b0b95..a24d479 100755 --- a/env/.config/nvim/lua/yourmom/remap.lua +++ b/env/.config/nvim/lua/yourmom/remap.lua @@ -38,7 +38,7 @@ vim.keymap.set('v', '<', '', '>gv', {noremap = true}) ---reize with arrows +--reize with alt vim.keymap.set('n', '', ':resize -2') vim.keymap.set('n', '', ':resize +2') vim.keymap.set('n', '', ':vertical resize -2') diff --git a/env/.local/bin/scripts/backup/bbackup b/env/.local/bin/scripts/backup/bbackup index 545d770..0401eed 100755 --- a/env/.local/bin/scripts/backup/bbackup +++ b/env/.local/bin/scripts/backup/bbackup @@ -15,7 +15,7 @@ fsyncb () { 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 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" diff --git a/env/.local/bin/scripts/gen-thumb-md b/env/.local/bin/scripts/gen-thumb-md new file mode 100755 index 0000000..90b9189 --- /dev/null +++ b/env/.local/bin/scripts/gen-thumb-md @@ -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]()\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