aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-12-03 13:13:10 +0100
committerlonkaars <loek@pipeframe.xyz>2023-12-03 13:13:10 +0100
commite497364287c5271d922fe5c4ebb5d97e4083158c (patch)
tree63a3f2c8e0637e61b36f8abd6bd9ccf0c3bf3ba7
parenta412f335f07691b6f4a3bd391714d03c788e9336 (diff)
dotfiles update 2023-12-03
-rw-r--r--.config/mozc/keymap.tsv2
-rw-r--r--.config/mpv/scripts/full-ao-volume.lua7
-rw-r--r--.config/nvim/init.vim6
-rwxr-xr-x.local/share/bin/ccpreview17
4 files changed, 17 insertions, 15 deletions
diff --git a/.config/mozc/keymap.tsv b/.config/mozc/keymap.tsv
index f1ea8fb..d2674ab 100644
--- a/.config/mozc/keymap.tsv
+++ b/.config/mozc/keymap.tsv
@@ -37,7 +37,7 @@ Conversion Space ConvertNext
Conversion Tab ConvertNext
Conversion Up ConvertPrev
Precomposition Backspace Revert
-Precomposition Ctrl Backspace Reconvert
+Precomposition Shift Backspace Reconvert
Precomposition Space InsertSpace
Composition ASCII InsertCharacter
Composition Kanji IMEOff
diff --git a/.config/mpv/scripts/full-ao-volume.lua b/.config/mpv/scripts/full-ao-volume.lua
deleted file mode 100644
index 591138b..0000000
--- a/.config/mpv/scripts/full-ao-volume.lua
+++ /dev/null
@@ -1,7 +0,0 @@
--- make sure AO (pulseaudio/pipewire) output is at 100%
-mp.register_event("audio-reconfig", function ()
- if mp.get_property("ao-volume") ~= 100 then
- mp.set_property_number("ao-volume", 100)
- end
-end)
-
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index ea30a6b..153652f 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -61,6 +61,7 @@ Plug 'AndrewRadev/tagalong.vim'
Plug 'terrortylor/nvim-comment'
Plug 'liuchengxu/vim-which-key'
Plug 'justinmk/vim-sneak'
+Plug 'mbbill/undotree'
" Plug 'jbgutierrez/vim-better-comments'
Plug 'junegunn/goyo.vim'
@@ -90,7 +91,7 @@ Plug 'tikhomirov/vim-glsl'
" Plug 'gabrielelana/vim-markdown'
Plug 'vim-scripts/syntaxm4.vim'
Plug 'elkowar/yuck.vim'
-Plug 'bhurlow/vim-parinfer'
+Plug 'eraserhd/parinfer-rust', {'do': 'cargo build --release'}
Plug 'sile-typesetter/vim-sile'
" 'vim=ide'
@@ -216,6 +217,9 @@ let g:which_key_map['.'] = {
\ 'v': 'vim',
\ }
+map <silent> <leader>u :UndotreeToggle<cr>
+let g:which_key_map.u = 'toggle undo tree'
+
" cmd maps
cnoreabbrev W w
cnoreabbrev sudow w !sudo tee %
diff --git a/.local/share/bin/ccpreview b/.local/share/bin/ccpreview
index 6452e34..7ae1f53 100755
--- a/.local/share/bin/ccpreview
+++ b/.local/share/bin/ccpreview
@@ -2,17 +2,22 @@
caffeine
+PCI_ADDRESS="0000:00:14.0"
+USB_BUS_NUM="2"
+VIDEO_DEVICE="/dev/v4l/by-path/pci-$PCI_ADDRESS-usb-0:$USB_BUS_NUM:1.0-video-index0"
+
WIDTH="$1"
HEIGHT="$2"
FRAMERATE="$3"
RESOLUTION="${WIDTH}x${HEIGHT}"
-DEVICE="/dev/$(readlink /dev/v4l/by-id/usb-MACROSILICON_USB_Video-* | head -n1 | cut -c7-)"
-
-CAPTURE_FL="$(pw-link -oI | grep 'usb-MACROSILICON_USB_Video-.*:capture_AUX0' | cut -f3 -d' ')"
-CAPTURE_FR="$(pw-link -oI | grep 'usb-MACROSILICON_USB_Video-.*:capture_AUX1' | cut -f3 -d' ')"
+DEVICE="$(readlink -f "$VIDEO_DEVICE")"
+DEVICE_INDEX="$(grep "usb-$PCI_ADDRESS-$USB_BUS_NUM" /proc/asound/card*/usbmixer | cut -d: -f1 | tr -cd '[:digit:]')"
DEFAULT_SINK_ALIAS="$(pw-metadata 0 default.audio.sink | grep -Po "value:'(.*?)'" | head -c-2 | cut -c8- | jq --raw-output .name)"
-OUTPUT_FL="$(pw-link -iI | grep "$DEFAULT_SINK_ALIAS:playback_FL" | cut -f3 -d' ')"
-OUTPUT_FR="$(pw-link -iI | grep "$DEFAULT_SINK_ALIAS:playback_FR" | cut -f3 -d' ')"
+
+CAPTURE_FL="alsa:pcm:$DEVICE_INDEX:front:$DEVICE_INDEX:capture:capture_0"
+CAPTURE_FR="alsa:pcm:$DEVICE_INDEX:front:$DEVICE_INDEX:capture:capture_1"
+OUTPUT_FL="$DEFAULT_SINK_ALIAS:playback_0"
+OUTPUT_FR="$DEFAULT_SINK_ALIAS:playback_1"
echo "link $CAPTURE_FR -> $OUTPUT_FR"
echo "link $CAPTURE_FL -> $OUTPUT_FL"