generally simple improvements and fixes master
authorIan Kelling <ian@iankelling.org>
Sat, 19 Apr 2025 08:12:20 +0000 (04:12 -0400)
committerIan Kelling <ian@iankelling.org>
Sat, 19 Apr 2025 08:12:20 +0000 (04:12 -0400)
14 files changed:
brc
brc2
brc3
disabled/hub [new file with mode: 0644]
distro-end
gitslink
machine_specific/frodo/filesystem/etc/btrbk/rust.conf
machine_specific/frodo/filesystem/etc/systemd/system/btrbkrust.timer
subdir_files/.config/gh/config.yml [deleted file]
subdir_files/.config/gh/hosts.yml [deleted file]
subdir_files/.config/mpv/scripts/iank-like1.lua [moved from subdir_files/.config/mpv/scripts/iank-like.lua with 78% similarity]
subdir_files/.config/mpv/scripts/iank-like2.lua [new file with mode: 0644]
subdir_files/.config/mpv/scripts/iank-like3.lua [new file with mode: 0644]
subdir_files/.config/mpv/scripts/playlistmanager.lua

diff --git a/brc b/brc
index da736c4c7845115ff6bc60d0c8fe745155812476..43aaadb0f69f6b226895c947301d0d3caf93f573 100644 (file)
--- a/brc
+++ b/brc
@@ -2046,54 +2046,6 @@ go-github-install() {
 }
 
 
-## 2024: I'm using gh instead of hub, but leaving this just in case.
-## I tried the github cli tool (gh) and it seems easier than
-## I remember hub.
-##
-## hub predated github's 2020 official cli tool gh.
-## more info at
-## https://raw.githubusercontent.com/cli/cli/trunk/docs/gh-vs-hub.md
-# get latest hub and run it
-# main command to use:
-# hub pull-request --no-edit
-# --no-edit means to use the first commit\'s message as the pull request message.
-# If that fails, try doing
-# hub pull-request --no-edit -b UPSTREAM_OWNER:branch
-# where branch is usually master. it does the pr against your current branch.
-#
-# On first use, you input username/pass and it gets an oath token so you dont have to repeat
-# it\'s at ~/.config/hub
-hub() {
-  local up uptar updir p re
-  # example https://github.com/github/hub/releases/download/v2.14.2/hub-linux-amd64-2.14.2.tgz
-  up=$(wget -q -O- https://api.github.com/repos/github/hub/releases/latest | jq -r .assets[].browser_download_url | grep linux-amd64)
-  re='[[:space:]]'
-  if [[ ! $up || $up =~ $re ]]; then
-    echo "failed to get good update url. got: $up"
-  fi
-  uptar=${up##*/}
-  updir=${uptar%.tgz}
-  if [[ ! -e /a/opt/$updir ]]; then
-    rm -rf /a/opt/hub-linux-amd64*
-    wget -P /a/opt $up
-    tar -C /a/opt -zxf /a/opt/$uptar
-    rm -f /a/opt/$uptar
-  fi
-  if ! which hub &>/dev/null; then
-    sudo /a/opt/$updir/install
-  fi
-
-  # save token across computers
-  if [[ ! -L ~/.config/hub ]]; then
-    if [[ -e ~/.config/hub  ]]; then
-      mv ~/.config/hub /p/c/subdir_files/.config/
-    fi
-    if [[ -e /p/c/subdir_files/.config/hub ]]; then
-      conflink
-    fi
-  fi
-  command hub "$@"
-}
 
 # git alias
 i() { git "$@"; }
diff --git a/brc2 b/brc2
index c7500167f8bc0d7eebc537bd5ba916e5524e8862..0c6745e36bb93e93eff3aa4b6211f91b668ceff4 100644 (file)
--- a/brc2
+++ b/brc2
@@ -2113,6 +2113,8 @@ hiup() {
   done
   root_hosts+=(cmc)
 
+  work_hosts=(10.8.0.97 10.8.0.99)
+
   while read -r ip host mac opts; do
     if [[ $ip == *#*  || ! $host ]]; then continue; fi
 
@@ -2145,7 +2147,7 @@ hiup() {
     else
       nonvpn_ips[$host]=$ip
     fi
-    if [[ $host == librestation03 ]]; then
+    if [[ $host == librestation0[13] ]]; then
       work_hosts+=($host ${host}wg)
     elif $root; then
       # note: the reason we have b8.nz suffix here but not for non_root
@@ -2312,6 +2314,9 @@ EOF
   b8_ip=$(dig +short b8.nz @iankelling.org | tail -1)
   # if our dynamic ip updates broke, set manually, eg:
   #b8_ip=72.74.193.xxx
+  if [[ ! $b8_ip ]]; then
+    b8_ip=$(curl --connect-timeout 10 -s4 https://iankelling.org/cgi/pubip)
+  fi
   if [[ ! $b8_ip ]]; then
     echo "$0: error: got empty b8.nz ip. returning 1"
     return 1
@@ -4141,7 +4146,7 @@ rep() {
       break
     fi
   done
-  paths="/p/c/ /p/profanity-config/ /b/bash_unpublished/ /c/ /f/s/fsf/ /f/backup-scripts/ /f/gluestick/"
+  paths="/p/c/ /p/bin/ /p/profanity-config/ /b/bash_unpublished/ /c/ /f/s/fsf/ /f/backup-scripts/ /f/gluestick/"
   find $paths -not \( -name .svn -prune -o -name .git -prune \
        -o -name .hg -prune -o -name .editor-backups -prune \
        -o -name .undo-tree-history -prune \) 2>/dev/null | grep -iP --color=auto -- "$*" ||:
@@ -4807,6 +4812,16 @@ webp-anim-array() {
   fi
 }
 
+
+# usage: pass encoded string on stdin
+url-decode() {
+  python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));"
+}
+
+osimain() {
+  i push && i push gh main
+  }
+
 export BASEFILE_DIR=/a/bin/fai-basefiles
 
 #export ANDROID_HOME=/a/opt/android-home
diff --git a/brc3 b/brc3
index 289ee99f633c0594dbb405cd7e7e9f9162a140af..559d08d217f2c4a22d836d38d3a328371729127b 100644 (file)
--- a/brc3
+++ b/brc3
@@ -126,7 +126,3 @@ schroot-cleanup() {
 # regex="("$'\n'"|^)$string("$'\n'"|$)"
 
 
-# usage: pass encoded string on stdin
-url-decode() {
-  python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));"
-}
diff --git a/disabled/hub b/disabled/hub
new file mode 100644 (file)
index 0000000..25cea8e
--- /dev/null
@@ -0,0 +1,50 @@
+# removed from brc
+
+## 2024: I'm using gh instead of hub, but leaving this just in case.
+## I tried the github cli tool (gh) and it seems easier than
+## I remember hub.
+##
+## hub predated github's 2020 official cli tool gh.
+## more info at
+## https://raw.githubusercontent.com/cli/cli/trunk/docs/gh-vs-hub.md
+# get latest hub and run it
+# main command to use:
+# hub pull-request --no-edit
+# --no-edit means to use the first commit\'s message as the pull request message.
+# If that fails, try doing
+# hub pull-request --no-edit -b UPSTREAM_OWNER:branch
+# where branch is usually master. it does the pr against your current branch.
+#
+# On first use, you input username/pass and it gets an oath token so you dont have to repeat
+# it\'s at ~/.config/hub
+hub() {
+  local up uptar updir p re
+  # example https://github.com/github/hub/releases/download/v2.14.2/hub-linux-amd64-2.14.2.tgz
+  up=$(wget -q -O- https://api.github.com/repos/github/hub/releases/latest | jq -r .assets[].browser_download_url | grep linux-amd64)
+  re='[[:space:]]'
+  if [[ ! $up || $up =~ $re ]]; then
+    echo "failed to get good update url. got: $up"
+  fi
+  uptar=${up##*/}
+  updir=${uptar%.tgz}
+  if [[ ! -e /a/opt/$updir ]]; then
+    rm -rf /a/opt/hub-linux-amd64*
+    wget -P /a/opt $up
+    tar -C /a/opt -zxf /a/opt/$uptar
+    rm -f /a/opt/$uptar
+  fi
+  if ! which hub &>/dev/null; then
+    sudo /a/opt/$updir/install
+  fi
+
+  # save token across computers
+  if [[ ! -L ~/.config/hub ]]; then
+    if [[ -e ~/.config/hub  ]]; then
+      mv ~/.config/hub /p/c/subdir_files/.config/
+    fi
+    if [[ -e /p/c/subdir_files/.config/hub ]]; then
+      conflink
+    fi
+  fi
+  command hub "$@"
+}
index 10c0de0741cc02383737658cbf666a4ee368c906..79a75bdfd3800986b621e35d042c9084f3e36745 100755 (executable)
@@ -90,7 +90,7 @@ Package: $pkg
 Description: $pkg-dummy
 EOF
   equivs-build $pkg
-  sudo dpkg -i /tmp/user/1000/${pkg}_${ver}_all.deb
+  sudo dpkg -i /tmp/user/$EUID/${pkg}_${ver}_all.deb
   cd
   rm -r "$tmpdir"
 }
@@ -591,8 +591,72 @@ esac
 #### desktop stuff
 
 ### system76 things ###
+
+# sy was working without this, but consistently got kernel freezes within a day of being on.
+#
+# First, it repeats this for hours:
+# Apr 12 21:25:28 sy kernel: BUG: Bad rss-counter state mm:000000003f3d390c type:MM_ANONPAGES val:-1
+# Apr 12 21:25:28 sy kernel: BUG: Bad rss-counter state mm:000000003f3d390c type:MM_SHMEMPAGES val:1
+#
+# Then many kernel freeze messages
+# Apr 12 22:40:24 sy kernel: watchdog: BUG: soft lockup - CPU#6 stuck for 1467s! [system-status:2059]
+# Apr 12 22:40:24 sy kernel: Modules linked in: ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_tcpudp nft_compat nf_tables wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libcurve25519_generic libchacha ip6_udp_tunnel udp_tunnel ccm cmac algif_hash algif_skcipher af_alg snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic qrtr bnep binfmt_misc snd_sof_pci_intel_cnl intel_uncore_frequency intel_uncore_frequency_common snd_sof_intel_hda_common soundwire_intel snd_sof_intel_hda_mlink soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof iwlmvm(OE) snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi intel_tcc_cooling soundwire_generic_allocation soundwire_bus x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_core mac80211(OE) cmdlinepart snd_compress ac97_bus kvm_intel snd_pcm_dmaengine spi_nor nls_iso8859_1 intel_rapl_msr mtd libarc4 snd_hda_intel uvcvideo snd_intel_dspcfg i915 videobuf2_vmalloc kvm snd_intel_sdw_acpi uvc
+# Apr 12 22:40:24 sy kernel:  videobuf2_memops snd_hda_codec btusb videobuf2_v4l2 btrtl iwlwifi(OE) processor_thermal_device_pci_legacy processor_thermal_device irqbypass btintel processor_thermal_wt_hint snd_hda_core processor_thermal_rfim processor_thermal_rapl drm_buddy snd_hwdep btbcm rapl videodev btmtk videobuf2_common intel_rapl_common mc bluetooth snd_pcm ttm processor_thermal_wt_req cfg80211(OE) ecdh_generic intel_cstate processor_thermal_power_floor snd_timer ecc drm_display_helper snd i2c_i801 spi_intel_pci cec spi_intel iwlwifi_compat(OE) soundcore i2c_smbus processor_thermal_mbox int340x_thermal_zone rc_core intel_soc_dts_iosf intel_pch_thermal intel_pmc_core i2c_algo_bit intel_vsec pmt_telemetry intel_hid pmt_class sparse_keymap system76_acpi joydev input_leds mac_hid serio_raw sch_fq_codel nfsd usbhid parport_pc auth_rpcgss ppdev nfs_acl lp lockd parport grace efi_pstore sunrpc nfnetlink dmi_sysfs ip_tables x_tables autofs4 btrfs blake2b_generic dm_crypt raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor
+# Apr 12 22:40:24 sy kernel:  async_tx xor raid6_pq libcrc32c raid1 raid0 hid_multitouch hid_generic 8250_dw rtsx_pci_sdmmc nvme nvme_core crct10dif_pclmul crc32_pclmul polyval_clmulni intel_lpss_pci polyval_generic ghash_clmulni_intel sha256_ssse3 rtsx_pci psmouse sha1_ssse3 intel_lpss nvme_auth xhci_pci i2c_hid_acpi idma64 xhci_pci_renesas i2c_hid hid video wmi pinctrl_cannonlake aesni_intel crypto_simd cryptd
+# Apr 12 22:40:24 sy kernel: CPU: 6 PID: 2059 Comm: system-status Tainted: G      D W  OEL     6.8.0-57-generic #59trisquel35
+# Apr 12 22:40:24 sy kernel: Hardware name: System76 Lemur Pro/Lemur Pro, BIOS 2023-08-18_a8dd6c2 08/18/2023
+# Apr 12 22:40:24 sy kernel: RIP: 0010:native_queued_spin_lock_slowpath+0x83/0x300
+# Apr 12 22:40:24 sy kernel: Code: 00 00 f0 0f ba 2b 08 0f 92 c2 8b 03 0f b6 d2 c1 e2 08 30 e4 09 d0 3d ff 00 00 00 77 61 85 c0 74 10 0f b6 03 84 c0 74 09 f3 90 <0f> b6 03 84 c0 75 f7 b8 01 00 00 00 66 89 03 5b 41 5c 41 5d 41 5e
+# Apr 12 22:40:24 sy kernel: RSP: 0018:ffffbf0c80d17a80 EFLAGS: 00000202
+# Apr 12 22:40:24 sy kernel: RAX: 0000000000000001 RBX: fffff58f444330a8 RCX: 000fffffffe00000
+# Apr 12 22:40:24 sy kernel: RDX: 0000000000000000 RSI: 0000000000000001 RDI: fffff58f444330a8
+# Apr 12 22:40:24 sy kernel: RBP: ffffbf0c80d17aa8 R08: 0000000000000000 R09: 0000000000000000
+# Apr 12 22:40:24 sy kernel: R10: 000060b7a94fd000 R11: 0000000000000000 R12: ffff9ac2675baa48
+# Apr 12 22:40:24 sy kernel: R13: 000060b7a9320000 R14: ffffbf0c80d17b68 R15: ffff9ac250cc2900
+# Apr 12 22:40:24 sy kernel: FS:  0000000000000000(0000) GS:ffff9acb9d300000(0000) knlGS:0000000000000000
+# Apr 12 22:40:24 sy kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+# Apr 12 22:40:24 sy kernel: CR2: 000073f5239deb48 CR3: 000000010939c006 CR4: 00000000003706f0
+# Apr 12 22:40:24 sy kernel: Call Trace:
+# Apr 12 22:40:24 sy kernel:  <IRQ>
+# Apr 12 22:40:24 sy kernel:  ? show_regs+0x6d/0x80
+# Apr 12 22:40:24 sy kernel:  ? watchdog_timer_fn+0x206/0x290
+# Apr 12 22:40:24 sy kernel:  ? __pfx_watchdog_timer_fn+0x10/0x10
+# Apr 12 22:40:24 sy kernel:  ? __hrtimer_run_queues+0x10f/0x2a0
+# Apr 12 22:40:24 sy kernel:  ? clockevents_program_event+0xbe/0x150
+# Apr 12 22:40:24 sy kernel:  ? hrtimer_interrupt+0xf6/0x250
+# Apr 12 22:40:24 sy kernel:  ? __sysvec_apic_timer_interrupt+0x4e/0x120
+# Apr 12 22:40:24 sy kernel:  ? sysvec_apic_timer_interrupt+0x8d/0xd0
+# Apr 12 22:40:24 sy kernel:  </IRQ>
+# Apr 12 22:40:24 sy kernel:  <TASK>
+# Apr 12 22:40:24 sy kernel:  ? asm_sysvec_apic_timer_interrupt+0x1b/0x20
+# Apr 12 22:40:24 sy kernel:  ? native_queued_spin_lock_slowpath+0x83/0x300
+# Apr 12 22:40:24 sy kernel:  _raw_spin_lock+0x3f/0x60
+# Apr 12 22:40:24 sy kernel:  __pte_offset_map_lock+0xa3/0x130
+# Apr 12 22:40:24 sy kernel:  zap_pte_range+0x6b/0xcc0
+# Apr 12 22:40:24 sy kernel:  zap_pmd_range.isra.0+0x121/0x280
+# Apr 12 22:40:24 sy kernel:  ? prb_read+0xa5/0x190
+# Apr 12 22:40:24 sy kernel:  unmap_page_range+0x2c6/0x4f0
+# Apr 12 22:40:24 sy kernel:  unmap_single_vma+0x89/0xf0
+# Apr 12 22:40:24 sy kernel:  unmap_vmas+0xb5/0x190
+# Apr 12 22:40:24 sy kernel:  exit_mmap+0x10a/0x3e0
+# Apr 12 22:40:24 sy kernel:  __mmput+0x41/0x140
+# Apr 12 22:40:24 sy kernel:  mmput+0x31/0x40
+# Apr 12 22:40:24 sy kernel:  exit_mm+0xbe/0x130
+# Apr 12 22:40:24 sy kernel:  do_exit+0x27b/0x530
+# Apr 12 22:40:24 sy kernel:  make_task_dead+0x80/0x140
+# Apr 12 22:40:24 sy kernel:  rewind_stack_and_make_dead+0x17/0x20
+# Apr 12 22:40:24 sy kernel: RIP: 0033:0x73f5236ad7cd
+# Apr 12 22:40:24 sy kernel: Code: Unable to access opcode bytes at 0x73f5236ad7a3.
+# Apr 12 22:40:24 sy kernel: RSP: 002b:00007fffc2d20de0 EFLAGS: 00010246
+# Apr 12 22:40:24 sy kernel: RAX: 000060b7a9350b10 RBX: 0000000000000100 RCX: 0000000000000000
+# Apr 12 22:40:24 sy kernel: RDX: 000060b7a9320010 RSI: 0000000000000000 RDI: 000000000000001f
+# Apr 12 22:40:24 sy kernel: RBP: 00007fffc2d20e10 R08: 0000000000000008 R09: 0000000000000190
+# Apr 12 22:40:24 sy kernel: R10: 0000000000000008 R11: 000060b7850a0240 R12: 000000000000000f
+# Apr 12 22:40:24 sy kernel: R13: ffffffffffffffc0 R14: 0000000000000073 R15: 0000000000000000
+# Apr 12 22:40:24 sy kernel:  </TASK>
+
 case $HOSTNAME in
-  bo|so) # sy|  sy doesnt seem to really need this.
+  bo|so|sy)
     # note, i stored the initial popos packages at /a/bin/data/popos-pkgs
     if [[ ! -e /etc/apt/sources.list.d/system76.list ]]; then
       # https://blog.zackad.dev/en/2017/08/17/add-ppa-simple-way.html
@@ -2193,6 +2257,14 @@ case $codename_compat in
     ;;
 esac
 
+case $HOSTNAME in
+  frodo)
+    systemctl enable btrbkrust.timer
+    systemctl enable btrbkr.timer
+    ;;
+  esac
+
+
 hiup
 
 /p/c/distro-extra
index 6edbae2a36cf32a110963d1b1b4f74ff2b3b9de0..be4abbe9951cb6abfb8ebe1141b0b9eebab86b8d 100755 (executable)
--- a/gitslink
+++ b/gitslink
@@ -61,6 +61,7 @@ lnf -v /p/bin/* /a/exe
 cd /a/exe
 if (( ${#existing[@]} )); then
   echo run manually:
+  echo cd /a/exe
 fi
 for f in ${!existing[@]}; do
   echo rm -fv $f
index 9c47db02780b714b4d68073c82c99553c24e57f2..7199bafe2a7da0cd826f6fb9b414ff22bd08b679 100644 (file)
@@ -15,5 +15,6 @@ target_preserve_min 2d
 
 rate_limit no
 volume /mnt/rbackup
+subvolume ar
 subvolume d
 subvolume roverflow
index 4e73b09b4cdf26b3dc177c1b275a3b7419e2797e..66af87694de54e88024053ea9e3265c3ece7e36d 100644 (file)
@@ -2,7 +2,7 @@
 Description=Btrbk rust timer
 
 [Timer]
-OnCalendar=*-*-* 05:00:00 America/New_York
+OnCalendar=*-*-* 07:00:00 America/New_York
 
 [Install]
 WantedBy=timers.target
diff --git a/subdir_files/.config/gh/config.yml b/subdir_files/.config/gh/config.yml
deleted file mode 100644 (file)
index b8f811d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# The current version of the config schema
-version: 1
-# What protocol to use when performing git operations. Supported values: ssh, https
-git_protocol: ssh
-# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
-editor:
-# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
-prompt: enabled
-# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager.
-pager:
-# Aliases allow you to create nicknames for gh commands
-aliases:
-    co: pr checkout
-# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport.
-http_unix_socket:
-# What web browser gh should use when opening URLs. If blank, will refer to environment.
-browser:
diff --git a/subdir_files/.config/gh/hosts.yml b/subdir_files/.config/gh/hosts.yml
deleted file mode 100644 (file)
index cf2f603..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-github.com:
-    git_protocol: ssh
-    users:
-        ian-kelling:
-    user: ian-kelling
similarity index 78%
rename from subdir_files/.config/mpv/scripts/iank-like.lua
rename to subdir_files/.config/mpv/scripts/iank-like1.lua
index 2796de8dc5a5fd97e194c83ff8fdc393f299df9a..83d53317651db1c1b42e2b86b86c3b14ee466f55 100644 (file)
@@ -1,5 +1,5 @@
-local log_file = "/t/mpvlike.log"
-
+-- mark for folder 4
+local like1_file = "/t/mpvlike1.log"
 mp.add_key_binding("v", "write_filename", function()
     local filepath = mp.get_property("path")
     -- Convert to absolute path if it's not already
@@ -9,7 +9,7 @@ mp.add_key_binding("v", "write_filename", function()
             filepath = working_dir .. "/" .. filepath
         end
 
-        local file = io.open(log_file, "a") -- Open the file in append mode
+        local file = io.open(like1_file, "a") -- Open the file in append mode
         file:write(filepath .. "\n") -- Write the filename with a newline
         file:close()
     end
diff --git a/subdir_files/.config/mpv/scripts/iank-like2.lua b/subdir_files/.config/mpv/scripts/iank-like2.lua
new file mode 100644 (file)
index 0000000..ba1160c
--- /dev/null
@@ -0,0 +1,16 @@
+-- mark for folder 3
+local like2_file = "/t/mpvlike2.log"
+mp.add_key_binding("x", "write_filename", function()
+    local filepath = mp.get_property("path")
+    -- Convert to absolute path if it's not already
+    if filepath and not filepath:match("^/") and not filepath:match("^%a:") then
+        local working_dir = mp.get_property("working-directory")
+        if working_dir then
+            filepath = working_dir .. "/" .. filepath
+        end
+
+        local file = io.open(like2_file, "a") -- Open the file in append mode
+        file:write(filepath .. "\n") -- Write the filename with a newline
+        file:close()
+    end
+end)
diff --git a/subdir_files/.config/mpv/scripts/iank-like3.lua b/subdir_files/.config/mpv/scripts/iank-like3.lua
new file mode 100644 (file)
index 0000000..7008d37
--- /dev/null
@@ -0,0 +1,16 @@
+-- mark for deletion
+local like3_file = "/t/mpvlike3.log"
+mp.add_key_binding("d", "write_filename", function()
+    local filepath = mp.get_property("path")
+    -- Convert to absolute path if it's not already
+    if filepath and not filepath:match("^/") and not filepath:match("^%a:") then
+        local working_dir = mp.get_property("working-directory")
+        if working_dir then
+            filepath = working_dir .. "/" .. filepath
+        end
+
+        local file = io.open(like3_file, "a") -- Open the file in append mode
+        file:write(filepath .. "\n") -- Write the filename with a newline
+        file:close()
+    end
+end)
index 8908986bf78aff26d4345572ab7cee7c47aa75c2..3a3027cf83fd69fed4d2d66ac3874a11c3300f5a 100644 (file)
@@ -27,7 +27,7 @@ local settings = {
 
   -- extra functionality keys
   key_sortplaylist = "",
-  key_shuffleplaylist = "",
+  key_shuffleplaylist = "r",
   key_reverseplaylist = "",
   key_loadfiles = "",
   key_saveplaylist = "",