From 2a72d57d61a764fd7c92f69d77e482d92384476c Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sun, 15 Jun 2025 15:51:50 -0400 Subject: [PATCH] AutoYADM commit: 2025-06-15 15:51:50 --- .config/fish/functions/mksh.fish | 11 ++++++----- .config/niri/user-mode.sh | 2 -- 2 files changed, 6 insertions(+), 7 deletions(-) delete mode 100755 .config/niri/user-mode.sh diff --git a/.config/fish/functions/mksh.fish b/.config/fish/functions/mksh.fish index 69c42a64..fe1a808d 100644 --- a/.config/fish/functions/mksh.fish +++ b/.config/fish/functions/mksh.fish @@ -1,12 +1,13 @@ function mksh --description 'make executable shell script' argparse 'e/edit' -- $argv set name $argv[1] - echo $name.sh set file $name.sh - echo $file - printf '#!/bin/sh\n\n' >$file - chmod +x $file if set -q _flag_e - kak "$file" -e 'exec -with-hooks gjo' + set cmd (printf 'rename-buffer -file %s ; set buffer filetype sh ; hook -once -always buffer BufWritePost %s %s ; hook -once -always buffer NormalIdle .* %s' "$file" "$(string replace -a . \\. -- $file)" "%{ nop %sh { notify-send 'this runs' } }" "%{ exec -with-hooks gji }") + # set cmd (printf 'rename-buffer -file %s ; set buffer filetype sh ; hook -once -always buffer BufWritePost %s %s ; hook -once -always buffer NormalIdle .* %s' "$file" "$(string replace -a . \\. -- $file)" "%{ nop %sh { chmod +x $(path resolve $file) } }" "%{ exec -with-hooks gji }") + printf '#!/bin/sh\n\n' | kak -e "$cmd" + else + printf '#!/bin/sh\n\n' >$file + chmod +x $file end end diff --git a/.config/niri/user-mode.sh b/.config/niri/user-mode.sh deleted file mode 100755 index 13f47935..00000000 --- a/.config/niri/user-mode.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -