From b15c6b710f19b74398acd738efb6281183c88b8d Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sun, 24 Aug 2025 12:05:10 +0900 Subject: updates --- mac/.local/bin/gitupdate | 5 ++- mac/.local/bin/ifinstalled | 7 +++- mac/.local/bin/lfub | 2 +- mac/.local/bin/localshortcuts | 86 +++++++++++++++++++++++++++++++++++++++++++ mac/.local/bin/rgafiles | 6 +-- mac/.local/bin/shortcuts | 86 ------------------------------------------- mac/.local/bin/tmuxdbussync | 26 ++++++------- mac/.local/bin/torwrap | 2 +- mac/.local/bin/transadd | 5 ++- 9 files changed, 115 insertions(+), 110 deletions(-) create mode 100755 mac/.local/bin/localshortcuts delete mode 100755 mac/.local/bin/shortcuts (limited to 'mac/.local') diff --git a/mac/.local/bin/gitupdate b/mac/.local/bin/gitupdate index 4fed27e..a2c83b5 100755 --- a/mac/.local/bin/gitupdate +++ b/mac/.local/bin/gitupdate @@ -2,7 +2,10 @@ set -eu -pidof transmission-daemon >/dev/null && echo "Turn off transmission-daemon first!" && exit 1 +pgrep -x transmission-daemon >/dev/null 2>&1 && { + echo "Turn off transmission-daemon first!" + exit 1 +} # Check if inside a Git repository ! git rev-parse --is-inside-work-tree >/dev/null 2>&1 && echo "Not a git repository." && exit 1 diff --git a/mac/.local/bin/ifinstalled b/mac/.local/bin/ifinstalled index d0bd26b..b48dd63 100755 --- a/mac/.local/bin/ifinstalled +++ b/mac/.local/bin/ifinstalled @@ -6,7 +6,10 @@ # various other scripts for clarity's sake. for x in "$@"; do - if ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1; then - notify-send "📦 $x" "must be installed for this function." && exit 1 + if ! command -v "$x" >/dev/null 2>&1 && + ! brew list --formula "$x" >/dev/null 2>&1 && + ! brew list --cask "$x" >/dev/null 2>&1; then + osascript -e 'display notification "'"$x"' must be installed for this function." with title "📦 Dependency missing"' + exit 1 fi done diff --git a/mac/.local/bin/lfub b/mac/.local/bin/lfub index c999412..065f7c7 100755 --- a/mac/.local/bin/lfub +++ b/mac/.local/bin/lfub @@ -19,6 +19,6 @@ else mkfifo "$FIFO_UEBERZUGPP" ueberzugpp layer -s -p json <"$FIFO_UEBERZUGPP" & exec 3>"$FIFO_UEBERZUGPP" - trap cleanup HUP INT QUIT TERM PWR EXIT + trap cleanup HUP INT QUIT TERM EXIT lf "$@" 3>&- fi diff --git a/mac/.local/bin/localshortcuts b/mac/.local/bin/localshortcuts new file mode 100755 index 0000000..b9d5ba9 --- /dev/null +++ b/mac/.local/bin/localshortcuts @@ -0,0 +1,86 @@ +#!/bin/sh + +bmdirs="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/bm-dirs" +bmfiles="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/bm-files" + +# Output locations. Unactivated progs should go to /dev/null. +shell_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutrc" +shell_env_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" +zsh_named_dirs="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/zshnameddirrc" +lf_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/lf/shortcutrc" +vim_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/vim/shortcuts.vim" +nvim_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/nvim/shortcuts.lua" +ranger_shortcuts="/dev/null" +qute_shortcuts="/dev/null" +fish_shortcuts="/dev/null" +vifm_shortcuts="/dev/null" + +# Remove, prepare files +rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" "$nvim_shortcuts" 2>/dev/null +printf "# vim: filetype=sh\\n" >"$fish_shortcuts" +printf "# vim: filetype=sh\\nalias " >"$shell_shortcuts" +printf "# vim: filetype=sh\\n" >"$shell_env_shortcuts" +printf "\" vim: filetype=vim\\n" >"$vifm_shortcuts" + +# Format the `directories` file in the correct syntax and sent it to all three configs. +eval "echo \"$(cat "$bmdirs")\"" | + gawk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); + printf(\"%s=\42cd %s && ls -A\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; + printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ; + printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; + printf(\"abbr %s \42cd %s; and ls -A\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ; + printf(\"map g%s :cd %s\nmap t%s :cd %s\nmap M%s :cd %s:mo\nmap Y%s :cd %s:co \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ; + printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ; + printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ; + printf(\"map %s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; + printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" ; + printf(\"nmap %s :Explore %s\n\",\$1,\$2) >> \"$vim_shortcuts\" ; + printf(\"vim.keymap.set('c', ';%s', '%s', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\" ; + printf(\"vim.keymap.set('n', '%s', 'Explore %s', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\" ; + printf(\"vim.keymap.set('n', '%s', function() require('mini.files').open('%s') end, { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\"}" + +# Format the `files` file in the correct syntax and sent it to both configs. +eval "echo \"$(cat "$bmfiles")\"" | + gawk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); + printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; + printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ; + printf(\"v%s=\42\$EDITOR2 %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; + printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; + printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ; + printf(\"abbr v%s \42\$EDITOR2 %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ; + printf(\"map %s :e %s \n\",\$1,\$2) >> \"$vifm_shortcuts\" ; + printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ; + printf(\"map v%s shell \$EDITOR2 %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ; + printf(\"map %s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; + printf(\"map v%s \$\$EDITOR2 \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; + printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" ; + printf(\"nmap %s :e %s\n\",\$1,\$2) >> \"$vim_shortcuts\" ; + printf(\"vim.keymap.set('c', ';%s', '%s', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\" ; + printf(\"vim.keymap.set('n', '%s', 'e %s', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\"}" + +# # root +# root_shell_shortcuts="/root/.config/shell/rootshortcutrc" +# root_zsh_named_dirs="/root/.config/shell/rootzshnameddirrc" +# root_lf_shortcuts="/root/.config/lf/rootshortcutrc" +# root_vim_shortcuts="/root/.config/vim/rootshortcuts.vim" +# +# sudo rm -f "$root_zsh_named_dirs" "$root_lf_shortcuts" "$root_vim_shortcuts" 2>/dev/null +# printf "# vim: filetype=sh\\nalias " | sudo tee "$root_shell_shortcuts" 2>/dev/null +# sudo mkdir -p /root/.config/shell/ /root/.config/lf/ /root/.config/vim/ +# sudo touch "$root_shell_shortcuts" "$root_zsh_named_dirs" "$root_lf_shortcuts" "$root_vim_shortcuts" +# +# eval "echo \"$(cat "$bmdirs")\"" | +# sudo awk "!/^\s*#/ && !/^\s*\$/ && /cache|config($|\/bash|\/lf|\/shell|\/vim)|local\/(bin|share|state)$/ {gsub(\"\\\s*#.*$\",\"\"); gsub(\"home/$USER\", \"root\"); +# printf(\",%s=\42cd %s && ls -A\42 \\\\\n\",\$1,\$2) >> \"$root_shell_shortcuts\" ; +# printf(\"hash -d ,%s=%s \n\",\$1,\$2) >> \"$root_zsh_named_dirs\" ; +# printf(\"map ,%s cd \42%s\42 \n\",\$1,\$2) >> \"$root_lf_shortcuts\" ; +# printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\" ; +# printf(\"nmap %s :Explore %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\"}" +# +# eval "echo \"$(cat "$bmfiles")\"" | +# sudo awk "!/^\s*#/ && !/^\s*\$/ && /config\/(bash|lf|vim)\/.*rc |inputrc|\$EDITOR / {gsub(\"\\\s*#.*$\",\"\"); gsub(\"home/$USER\", \"root\"); +# printf(\",%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$root_shell_shortcuts\" ; +# printf(\"hash -d ,%s=%s \n\",\$1,\$2) >> \"$root_zsh_named_dirs\" ; +# printf(\"map ,%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$root_lf_shortcuts\" ; +# printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\" ; +# printf(\"nmap %s :e %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\"}" diff --git a/mac/.local/bin/rgafiles b/mac/.local/bin/rgafiles index e8b5e72..ea02fc9 100755 --- a/mac/.local/bin/rgafiles +++ b/mac/.local/bin/rgafiles @@ -29,10 +29,6 @@ search_term() { echo "Error: 'rga' is not installed." >&2 exit 1 fi - if ! command -v xclip >/dev/null 2>&1; then - echo "Error: 'xclip' is not installed." >&2 - exit 1 - fi # Construct the preview command preview_cmd=$(printf "rga %s --pretty --context 10 '%s' {}" "$case_flag" "$*") @@ -48,7 +44,7 @@ search_term() { fi # copy target to the clipboard - echo "$@" | xclip -selection clipboard 2>/dev/null + echo "$@" | pbcopy 2>/dev/null openfiles "$files" diff --git a/mac/.local/bin/shortcuts b/mac/.local/bin/shortcuts deleted file mode 100755 index 118becb..0000000 --- a/mac/.local/bin/shortcuts +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh - -bmdirs="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/bm-dirs" -bmfiles="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/bm-files" - -# Output locations. Unactivated progs should go to /dev/null. -shell_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutrc" -shell_env_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" -zsh_named_dirs="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/zshnameddirrc" -lf_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/lf/shortcutrc" -vim_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/vim/shortcuts.vim" -nvim_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/nvim/shortcuts.lua" -ranger_shortcuts="/dev/null" -qute_shortcuts="/dev/null" -fish_shortcuts="/dev/null" -vifm_shortcuts="/dev/null" - -# Remove, prepare files -rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" "$nvim_shortcuts" 2>/dev/null -printf "# vim: filetype=sh\\n" >"$fish_shortcuts" -printf "# vim: filetype=sh\\nalias " >"$shell_shortcuts" -printf "# vim: filetype=sh\\n" >"$shell_env_shortcuts" -printf "\" vim: filetype=vim\\n" >"$vifm_shortcuts" - -# Format the `directories` file in the correct syntax and sent it to all three configs. -eval "echo \"$(cat "$bmdirs")\"" | - awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); - printf(\"%s=\42cd %s && ls -A\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; - printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ; - printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; - printf(\"abbr %s \42cd %s; and ls -A\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ; - printf(\"map g%s :cd %s\nmap t%s :cd %s\nmap M%s :cd %s:mo\nmap Y%s :cd %s:co \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ; - printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ; - printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ; - printf(\"map %s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; - printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" ; - printf(\"nmap %s :Explore %s\n\",\$1,\$2) >> \"$vim_shortcuts\" ; - printf(\"vim.keymap.set('c', ';%s', '%s', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\" ; - printf(\"vim.keymap.set('n', '%s', 'Explore %s', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\" ; - printf(\"vim.keymap.set('n', '%s', function() require('mini.files').open('%s') end, { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\"}" - -# Format the `files` file in the correct syntax and sent it to both configs. -eval "echo \"$(cat "$bmfiles")\"" | - awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); - printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; - printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ; - printf(\"v%s=\42\$EDITOR2 %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; - printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; - printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ; - printf(\"abbr v%s \42\$EDITOR2 %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ; - printf(\"map %s :e %s \n\",\$1,\$2) >> \"$vifm_shortcuts\" ; - printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ; - printf(\"map v%s shell \$EDITOR2 %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ; - printf(\"map %s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; - printf(\"map v%s \$\$EDITOR2 \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; - printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" ; - printf(\"nmap %s :e %s\n\",\$1,\$2) >> \"$vim_shortcuts\" ; - printf(\"vim.keymap.set('c', ';%s', '%s', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\" ; - printf(\"vim.keymap.set('n', '%s', 'e %s', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\"}" - -# root -root_shell_shortcuts="/root/.config/shell/rootshortcutrc" -root_zsh_named_dirs="/root/.config/shell/rootzshnameddirrc" -root_lf_shortcuts="/root/.config/lf/rootshortcutrc" -root_vim_shortcuts="/root/.config/vim/rootshortcuts.vim" - -sudo rm -f "$root_zsh_named_dirs" "$root_lf_shortcuts" "$root_vim_shortcuts" 2>/dev/null -printf "# vim: filetype=sh\\nalias " | sudo tee "$root_shell_shortcuts" 2>/dev/null -sudo mkdir -p /root/.config/shell/ /root/.config/lf/ /root/.config/vim/ -sudo touch "$root_shell_shortcuts" "$root_zsh_named_dirs" "$root_lf_shortcuts" "$root_vim_shortcuts" - -eval "echo \"$(cat "$bmdirs")\"" | - sudo awk "!/^\s*#/ && !/^\s*\$/ && /cache|config($|\/bash|\/lf|\/shell|\/vim)|local\/(bin|share|state)$/ {gsub(\"\\\s*#.*$\",\"\"); gsub(\"home/$USER\", \"root\"); - printf(\",%s=\42cd %s && ls -A\42 \\\\\n\",\$1,\$2) >> \"$root_shell_shortcuts\" ; - printf(\"hash -d ,%s=%s \n\",\$1,\$2) >> \"$root_zsh_named_dirs\" ; - printf(\"map ,%s cd \42%s\42 \n\",\$1,\$2) >> \"$root_lf_shortcuts\" ; - printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\" ; - printf(\"nmap %s :Explore %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\"}" - -eval "echo \"$(cat "$bmfiles")\"" | - sudo awk "!/^\s*#/ && !/^\s*\$/ && /config\/(bash|lf|vim)\/.*rc |inputrc|\$EDITOR / {gsub(\"\\\s*#.*$\",\"\"); gsub(\"home/$USER\", \"root\"); - printf(\",%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$root_shell_shortcuts\" ; - printf(\"hash -d ,%s=%s \n\",\$1,\$2) >> \"$root_zsh_named_dirs\" ; - printf(\"map ,%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$root_lf_shortcuts\" ; - printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\" ; - printf(\"nmap %s :e %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\"}" diff --git a/mac/.local/bin/tmuxdbussync b/mac/.local/bin/tmuxdbussync index d6da872..b049fae 100755 --- a/mac/.local/bin/tmuxdbussync +++ b/mac/.local/bin/tmuxdbussync @@ -1,15 +1,15 @@ #!/bin/sh -fcitx5_pid=$(pgrep -f fcitx5 | head -n1) - -if [ -z "$fcitx5_pid" ]; then - echo "echo 'No terminal process found matching: fcitx5' >&2" - exit 1 -fi - -fcitx5_dbus=$(tr '\0' '\n' &2" +# exit 1 +# fi +# +# fcitx5_dbus=$(tr '\0' '\n' /dev/null && transmission-daemon && notify-send "Starting torrent daemon..." +! pgrep -x transmission-daemon >/dev/null 2>&1 && transmission-daemon && osascript -e 'display notification "Starting torrent daemon..." with title "transmission-daemon"' "${TERMINAL:-st}" -n stig -e stig pkill -RTMIN+22 "${STATUSBAR:-dwmblocks}" diff --git a/mac/.local/bin/transadd b/mac/.local/bin/transadd index ffd8ded..c6d2e94 100755 --- a/mac/.local/bin/transadd +++ b/mac/.local/bin/transadd @@ -4,7 +4,10 @@ # transmission-daemon sometimes fails to take remote requests in its first moments, hence the sleep. -pidof transmission-daemon >/dev/null || (transmission-daemon && notify-send "💡 Starting transmission daemon..." && sleep 3 && pkill -RTMIN+22 "${STATUSBAR:-dwmblocks}") +pgrep -x transmission-daemon >/dev/null 2>&1 || ( + transmission-daemon && + osascript -e 'display notification "💡 Starting transmission daemon..." with title "transmission-daemon"' +) directory="$HOME/Torrents" -- cgit v1.2.3