From 48d7236451fd873c5fe114d85dd30d0ac810b7ec Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 16:23:53 +0100 Subject: [PATCH 001/253] mv --- sh/.shellcheckrc => .shellcheckrc | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sh/.shellcheckrc => .shellcheckrc (100%) diff --git a/sh/.shellcheckrc b/.shellcheckrc similarity index 100% rename from sh/.shellcheckrc rename to .shellcheckrc From 482ba47dd9cf8b6660e8634f59251087e862513b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 16:39:55 +0100 Subject: [PATCH 002/253] file/write --- sh/util.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sh/util.sh b/sh/util.sh index 7d9cc3f..a7956ef 100644 --- a/sh/util.sh +++ b/sh/util.sh @@ -1,3 +1,11 @@ +rwx_file_write() { + local file="${1}" + local text="${2}" + if [ -n "${file}" ]; then + printf "%s" "${text}" > "${file}" + fi +} + rwx_list_block_devices() { lsblk \ --noempty \ From d549d03c992267dfd5fb72c678e3c02f5beb63f1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 16:41:48 +0100 Subject: [PATCH 003/253] shellcheck/write --- sh/lint/shellcheck.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sh/lint/shellcheck.sh b/sh/lint/shellcheck.sh index f31b2b4..b520fd9 100644 --- a/sh/lint/shellcheck.sh +++ b/sh/lint/shellcheck.sh @@ -18,3 +18,12 @@ rwx_shellcheck() { "${file}" rm "${file}" } + +rwx_shellcheck_write() { + rwx_file_write ".shellcheckrc" "\ +disable=3043 +enable=all +external-sources=true +shell=sh +" +} From 038853e4bb524d0a4ce8e85dcac3946f2242b594 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 17:47:06 +0100 Subject: [PATCH 004/253] shfmt --- sh/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/util.sh b/sh/util.sh index a7956ef..a81c808 100644 --- a/sh/util.sh +++ b/sh/util.sh @@ -2,7 +2,7 @@ rwx_file_write() { local file="${1}" local text="${2}" if [ -n "${file}" ]; then - printf "%s" "${text}" > "${file}" + printf "%s" "${text}" >"${file}" fi } From 81cb56bd119c0ec089b16526e1477fe4b795ae0c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 17:59:08 +0100 Subject: [PATCH 005/253] ref/head --- sh/alias/git.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sh/alias/git.sh b/sh/alias/git.sh index 6400092..37abaf7 100644 --- a/sh/alias/git.sh +++ b/sh/alias/git.sh @@ -533,3 +533,14 @@ a__git_tag_delete() { --delete \ "${@}" } + +# update head ref +gurh() { a__git_update_ref_head "${@}"; } +a__git_update_ref_head() { + if [ "${2}" ]; then + git \ + update-ref \ + "refs/heads/${1}" \ + "${2}" + fi +} From 01eb1bebd362e5356d37d5fbef93722e442357df Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 18:04:13 +0100 Subject: [PATCH 006/253] rwx/gau --- sh/gpg.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sh/gpg.sh b/sh/gpg.sh index a2b7f50..b5ce07b 100644 --- a/sh/gpg.sh +++ b/sh/gpg.sh @@ -1,3 +1,10 @@ +# bind gpg agent to current tty +rwx_gpg_agent_update() { + gpg-connect-agent \ + updatestartuptty \ + /bye +} + rwx_gpg_ssh_auth_sock() { local user_id user_id=$(id --user) From c69c10684e5ef31b0fb858e4ba225afe54c947bd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 18:06:02 +0100 Subject: [PATCH 007/253] gau/git,gpg --- sh/alias/git.sh | 11 ++++++----- sh/alias/gpg.sh | 4 +--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sh/alias/git.sh b/sh/alias/git.sh index 37abaf7..73afa5f 100644 --- a/sh/alias/git.sh +++ b/sh/alias/git.sh @@ -371,11 +371,12 @@ a__git_merge_tool() { # push to the remote repository gp() { a__git_push "${@}"; } a__git_push() { - git \ - push \ - --tags \ - --verbose \ - "${@}" + rwx_gpg_agent_update && + git \ + push \ + --tags \ + --verbose \ + "${@}" } # delete from the remote repository diff --git a/sh/alias/gpg.sh b/sh/alias/gpg.sh index 496b05e..eb19651 100644 --- a/sh/alias/gpg.sh +++ b/sh/alias/gpg.sh @@ -8,7 +8,5 @@ a__gpg_agent_kill() { # bind gpg agent to current tty gau() { a__gpg_agent_update "${@}"; } a__gpg_agent_update() { - gpg-connect-agent \ - updatestartuptty \ - /bye + rwx_gpg_agent_update } From 6ed3cb83a6c235291c840cd8a3a60f396af53765 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 18:07:54 +0100 Subject: [PATCH 008/253] gau/gf --- sh/alias/git.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sh/alias/git.sh b/sh/alias/git.sh index 73afa5f..a8ff88d 100644 --- a/sh/alias/git.sh +++ b/sh/alias/git.sh @@ -240,11 +240,12 @@ a__git_diff_word() { # fetch from the remote repository gf() { a__git_fetch "${@}"; } a__git_fetch() { - git \ - fetch \ - --tags \ - --verbose \ - "${@}" + rwx_gpg_agent_update && + git \ + fetch \ + --tags \ + --verbose \ + "${@}" } # fetch from remote repository and prune local orphan branches From 428ea3e9e5b920975656aebd5335654a77f6f2f6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 18:11:09 +0100 Subject: [PATCH 009/253] -n --- sh/alias/git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/alias/git.sh b/sh/alias/git.sh index a8ff88d..27b586e 100644 --- a/sh/alias/git.sh +++ b/sh/alias/git.sh @@ -539,7 +539,7 @@ a__git_tag_delete() { # update head ref gurh() { a__git_update_ref_head "${@}"; } a__git_update_ref_head() { - if [ "${2}" ]; then + if [ -n "${2}" ]; then git \ update-ref \ "refs/heads/${1}" \ From 9b0b4ecb8059dda3828296c12542f39a2b436909 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 18:35:33 +0100 Subject: [PATCH 010/253] setup/main --- sh/shell.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/shell.sh b/sh/shell.sh index 561fcdd..7889951 100644 --- a/sh/shell.sh +++ b/sh/shell.sh @@ -117,9 +117,10 @@ rwx_shell_prompt() { rwx_shell_setup() { # shell - echo "export ENV=\"${ENV}\"" >"/etc/profile.d/${RWX_SELF_NAME}.sh" + echo "export ENV=\"${RWX_MAIN_PATH}\"" \ + >"/etc/profile.d/${RWX_SELF_NAME}.sh" # bash local file="/etc/bash.bashrc" rm --force --recursive "${file}" - ln --symbolic "${ENV}" "${file}" + ln --symbolic "${RWX_MAIN_PATH}" "${file}" } From aec586aa2c9d5737c0603f435116bfb3cf02842d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 18:58:27 +0100 Subject: [PATCH 011/253] self/install --- sh/self.sh | 13 +++++++++++++ sh/shell.sh | 10 ---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/sh/self.sh b/sh/self.sh index 4220366..709feb7 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -14,3 +14,16 @@ rwx_self_help() { " a__… = aliases" \ " u__… = user" } + +rwx_self_install() { + local target="${1}" + local file + # sh + file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh" + rm --force --recursive "${file}" + echo "export ENV=\"${RWX_MAIN_PATH}\"" >"${file}" + # bash + file="/etc/bash.bashrc" + rm --force --recursive "${file}" + ln --symbolic "${RWX_MAIN_PATH}" "${file}" +} diff --git a/sh/shell.sh b/sh/shell.sh index 7889951..4f0db9b 100644 --- a/sh/shell.sh +++ b/sh/shell.sh @@ -114,13 +114,3 @@ rwx_shell_prompt() { # print printf "%b" "${view}" } - -rwx_shell_setup() { - # shell - echo "export ENV=\"${RWX_MAIN_PATH}\"" \ - >"/etc/profile.d/${RWX_SELF_NAME}.sh" - # bash - local file="/etc/bash.bashrc" - rm --force --recursive "${file}" - ln --symbolic "${RWX_MAIN_PATH}" "${file}" -} From a9c98b2853f09ceeedb9e8f232cf4839918def40 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 19:01:05 +0100 Subject: [PATCH 012/253] rwx/remove --- sh/util.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sh/util.sh b/sh/util.sh index a81c808..39e6fce 100644 --- a/sh/util.sh +++ b/sh/util.sh @@ -36,6 +36,13 @@ rwx_read_secret() { unset secret } +rwx_remove() { + rm \ + --force \ + --recursive \ + "${@}" +} + rwx_warn_wipe() { local tmp rwx_list_block_devices From f06d1e2bce5d31451bf37409226fe39168b81eb3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 19:04:23 +0100 Subject: [PATCH 013/253] rwx/link --- sh/util.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sh/util.sh b/sh/util.sh index 39e6fce..15925c6 100644 --- a/sh/util.sh +++ b/sh/util.sh @@ -6,6 +6,15 @@ rwx_file_write() { fi } +rwx_link() { + local link="${1}" + local target="${2}" + ln \ + --sybolic \ + "${target}" \ + "${link}" +} + rwx_list_block_devices() { lsblk \ --noempty \ From 52a43b0e6054faf5fde94e9f389f6c5d99518782 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 19:06:44 +0100 Subject: [PATCH 014/253] self/install --- sh/self.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/self.sh b/sh/self.sh index 709feb7..0e6621f 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -20,10 +20,10 @@ rwx_self_install() { local file # sh file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh" - rm --force --recursive "${file}" - echo "export ENV=\"${RWX_MAIN_PATH}\"" >"${file}" + rwx_remove "${file}" + rwx_file_write "${file}" "export ENV=\"${RWX_MAIN_PATH}\"" # bash file="/etc/bash.bashrc" - rm --force --recursive "${file}" - ln --symbolic "${RWX_MAIN_PATH}" "${file}" + rwx_remove "${file}" + rwx_link "${file}" "${RWX_MAIN_PATH}" } From d94880bb75ca38c849101f3c9c31b5d03bf1c376 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 19:40:52 +0100 Subject: [PATCH 015/253] main/shell --- sh/main.sh | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 2b3508c..d205d46 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -114,25 +114,33 @@ rwx_source() { # run initial steps rwx_main() { - # system root - if ! rwx_source "${RWX_ROOT_SYSTEM}"; then - __rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}" - return 1 - fi - # user root - rwx_source "${RWX_ROOT_USER}" - # run interactive extras - if rwx_shell_interactive; then - # check format - rwx_log - rwx_shfmt "${RWX_ROOT_SYSTEM}" - # check syntax - rwx_log - rwx_shellcheck "${RWX_ROOT_SYSTEM}" - # help - rwx_log - rwx_self_help - fi + case "${RWX_SHELL}" in + "sh" | \ + "bash") + # system root + if ! rwx_source "${RWX_ROOT_SYSTEM}"; then + __rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}" + return 1 + fi + # user root + rwx_source "${RWX_ROOT_USER}" + # run interactive extras + if rwx_shell_interactive; then + # check format + rwx_log + rwx_shfmt "${RWX_ROOT_SYSTEM}" + # check syntax + rwx_log + rwx_shellcheck "${RWX_ROOT_SYSTEM}" + # help + rwx_log + rwx_self_help + fi + ;; + *) + echo + ;; + esac } # run main function From ba7a51e1b1f77814e47fae703192404158db1440 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 19:49:14 +0100 Subject: [PATCH 016/253] main/cmd --- sh/main.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index d205d46..0c0be2c 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -138,10 +138,13 @@ rwx_main() { fi ;; *) - echo + local argument="${0}" + local name + name="$(basename "${argument}")" + "rwx_cmd_${name}" "${@}" ;; esac } # run main function -rwx_main +rwx_main "${@}" From 46e14ebf32a7bef8ccd195c610a26a59e09df107 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 19:50:30 +0100 Subject: [PATCH 017/253] +x --- sh/main.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 sh/main.sh diff --git a/sh/main.sh b/sh/main.sh old mode 100644 new mode 100755 From 2054f48931f3046bce6311f16e47ff2ffffccc13 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 19:51:06 +0100 Subject: [PATCH 018/253] main/shebang --- sh/main.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sh/main.sh b/sh/main.sh index 0c0be2c..d40e889 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -1,3 +1,5 @@ +#! /usr/bin/env sh + # ╭───────────╮ # │ constants │ # ╰───────────╯ From 30b002c31e2aeec407a951e14f825ad91a2b57d5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 19:53:12 +0100 Subject: [PATCH 019/253] git/rwx --- sh/alias/git.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/alias/git.sh b/sh/alias/git.sh index 27b586e..cadd10b 100644 --- a/sh/alias/git.sh +++ b/sh/alias/git.sh @@ -1,4 +1,4 @@ -SH_GIT_LOG_FORMAT="\ +RWX_GIT_LOG_FORMAT="\ %C(auto)%h%d S %C(red)%GS A %C(green)%an %ae @@ -294,7 +294,7 @@ a__git_log() { log \ --abbrev=8 \ --abbrev-commit \ - --format="${SH_GIT_LOG_FORMAT}" \ + --format="${RWX_GIT_LOG_FORMAT}" \ --graph \ "${@}" } From b67107c737fde62ada309412872de77ff8944cbb Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 20:03:28 +0100 Subject: [PATCH 020/253] self/user --- sh/main.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index d40e889..ec9bd1a 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -11,13 +11,16 @@ RWX_SELF_NAME="rwx" # │ variables │ # ╰───────────╯ -RWX_ROOT_USER="${HOME}/${RWX_SELF_NAME}" RWX_SHELL="$(cat "/proc/${$}/comm")" RWX_SYSTEM_ROOT="/usr/local/lib" RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}" RWX_ROOT_SYSTEM="${RWX_SYSTEM_ROOT}/${RWX_SELF_NAME}" +rwx_self_user() { + echo "${HOME}/${RWX_SELF_NAME}" +} + # ╭──────╮ # │ core │ # ╰──────╯ @@ -125,7 +128,7 @@ rwx_main() { return 1 fi # user root - rwx_source "${RWX_ROOT_USER}" + rwx_source "$(rwx_self_user)" # run interactive extras if rwx_shell_interactive; then # check format From 527b2d2a67b86703691c310b3256a4ccb3c7e3ba Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 20:15:05 +0100 Subject: [PATCH 021/253] rwx/shell --- sh/alias/shell.sh | 2 +- sh/main.sh | 7 +++++-- sh/shell.sh | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sh/alias/shell.sh b/sh/alias/shell.sh index d6f5801..4b0949b 100644 --- a/sh/alias/shell.sh +++ b/sh/alias/shell.sh @@ -17,7 +17,7 @@ x() { "${@}" } -[ "${RWX_SHELL}" = "bash" ] || return +[ "$(rwx_shell)" = "bash" ] || return # shellcheck disable=SC3033 ..() { diff --git a/sh/main.sh b/sh/main.sh index ec9bd1a..f0f84bc 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -11,7 +11,6 @@ RWX_SELF_NAME="rwx" # │ variables │ # ╰───────────╯ -RWX_SHELL="$(cat "/proc/${$}/comm")" RWX_SYSTEM_ROOT="/usr/local/lib" RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}" @@ -21,6 +20,10 @@ rwx_self_user() { echo "${HOME}/${RWX_SELF_NAME}" } +rwx_shell() { + cat "/proc/${$}/comm" +} + # ╭──────╮ # │ core │ # ╰──────╯ @@ -119,7 +122,7 @@ rwx_source() { # run initial steps rwx_main() { - case "${RWX_SHELL}" in + case "$(rwx_shell)" in "sh" | \ "bash") # system root diff --git a/sh/shell.sh b/sh/shell.sh index 4f0db9b..54284c6 100644 --- a/sh/shell.sh +++ b/sh/shell.sh @@ -1,6 +1,6 @@ _rwx_shell_color() { local code="${1}" - case "${RWX_SHELL}" in + case "$(rwx_shell)" in "bash") printf "\x01\e[0" if [ -n "${code}" ]; then @@ -33,7 +33,7 @@ rwx_shell_configure() { PS1="\$(rwx_shell_prompt \${?})" PS2="├ " # specific - case "${RWX_SHELL}" in + case "$(rwx_shell)" in "bash") # completion local root="/usr/share/bash-completion" From b85e5768a8e0ba80bf82f3f4a9712b93e5d2bc19 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 20:23:52 +0100 Subject: [PATCH 022/253] unindent --- sh/main.sh | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index f0f84bc..8970910 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -122,29 +122,29 @@ rwx_source() { # run initial steps rwx_main() { + # system root + if ! rwx_source "${RWX_ROOT_SYSTEM}"; then + __rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}" + return 1 + fi + # user root + rwx_source "$(rwx_self_user)" + # run interactive extras + if rwx_shell_interactive; then + # check format + rwx_log + rwx_shfmt "${RWX_ROOT_SYSTEM}" + # check syntax + rwx_log + rwx_shellcheck "${RWX_ROOT_SYSTEM}" + # help + rwx_log + rwx_self_help + fi case "$(rwx_shell)" in - "sh" | \ - "bash") - # system root - if ! rwx_source "${RWX_ROOT_SYSTEM}"; then - __rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}" - return 1 - fi - # user root - rwx_source "$(rwx_self_user)" - # run interactive extras - if rwx_shell_interactive; then - # check format - rwx_log - rwx_shfmt "${RWX_ROOT_SYSTEM}" - # check syntax - rwx_log - rwx_shellcheck "${RWX_ROOT_SYSTEM}" - # help - rwx_log - rwx_self_help - fi - ;; + "bash" | \ + "dash" | \ + "sh") ;; *) local argument="${0}" local name From 163ff926cdaaa1cd1a6f50d7f5abe18f8c0d78b1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 20:25:19 +0100 Subject: [PATCH 023/253] fmt --- sh/main.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 8970910..57d5299 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -129,22 +129,23 @@ rwx_main() { fi # user root rwx_source "$(rwx_self_user)" - # run interactive extras - if rwx_shell_interactive; then - # check format - rwx_log - rwx_shfmt "${RWX_ROOT_SYSTEM}" - # check syntax - rwx_log - rwx_shellcheck "${RWX_ROOT_SYSTEM}" - # help - rwx_log - rwx_self_help - fi case "$(rwx_shell)" in "bash" | \ - "dash" | \ - "sh") ;; + "dash" | \ + "sh") + # run interactive extras + if rwx_shell_interactive; then + # check format + rwx_log + rwx_shfmt "${RWX_ROOT_SYSTEM}" + # check syntax + rwx_log + rwx_shellcheck "${RWX_ROOT_SYSTEM}" + # help + rwx_log + rwx_self_help + fi + ;; *) local argument="${0}" local name From 1e1954ce9b0777cff690d59da2d45373e8f72eb8 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 21:03:57 +0100 Subject: [PATCH 024/253] prefix --- sh/main.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 57d5299..ae389aa 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -7,6 +7,8 @@ RWX_MAIN_NAME="main.sh" RWX_SELF_NAME="rwx" +RWX_PREFIX_COMMAND="${RWX_SELF_NAME}_cmd_" + # ╭───────────╮ # │ variables │ # ╰───────────╯ @@ -148,9 +150,10 @@ rwx_main() { ;; *) local argument="${0}" - local name + local function name name="$(basename "${argument}")" - "rwx_cmd_${name}" "${@}" + function="${RWX_PREFIX_COMMAND}${name}" + "${function}" "${@}" ;; esac } From bf10fd4a05f34dfb24875dd9563f8261f9108840 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 21:13:45 +0100 Subject: [PATCH 025/253] cs --- sh/cryptsetup.sh | 6 ++++++ sh/main.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 sh/cryptsetup.sh diff --git a/sh/cryptsetup.sh b/sh/cryptsetup.sh new file mode 100644 index 0000000..900083d --- /dev/null +++ b/sh/cryptsetup.sh @@ -0,0 +1,6 @@ +_rwx_cmd_cs() { rwx_crypt_setup "${@}"; } + +rwx_crypt_setup() { + local action="${1}" + echo "cs: ${action}" +} diff --git a/sh/main.sh b/sh/main.sh index ae389aa..d573b21 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -7,7 +7,7 @@ RWX_MAIN_NAME="main.sh" RWX_SELF_NAME="rwx" -RWX_PREFIX_COMMAND="${RWX_SELF_NAME}_cmd_" +RWX_PREFIX_COMMAND="_${RWX_SELF_NAME}_cmd_" # ╭───────────╮ # │ variables │ From ea8be45789fe901b52b75c94ae3f6b084b227c67 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 21:22:35 +0100 Subject: [PATCH 026/253] self/commands --- sh/self.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sh/self.sh b/sh/self.sh index 0e6621f..fe3a86c 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -1,4 +1,14 @@ -# get functions from file +# get commands from root +rwx_self_commands() { + grep \ + --directories "recurse" \ + --no-filename \ + "^${RWX_PREFIX_COMMAND}" "${RWX_ROOT_SYSTEM}" | + cut --delimiter "(" --fields 1 | + sed "s|^${RWX_PREFIX_COMMAND}||" +} + +# get functions from root rwx_self_functions() { grep \ --directories "recurse" \ From f588882b1fa3da28ecbd9b5d6b6bc84bf88c5469 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 21:28:42 +0100 Subject: [PATCH 027/253] lib --- sh/main.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index d573b21..1654ba2 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -13,10 +13,9 @@ RWX_PREFIX_COMMAND="_${RWX_SELF_NAME}_cmd_" # │ variables │ # ╰───────────╯ -RWX_SYSTEM_ROOT="/usr/local/lib" +RWX_ROOT_SYSTEM="/usr/local/lib/${RWX_SELF_NAME}" RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}" -RWX_ROOT_SYSTEM="${RWX_SYSTEM_ROOT}/${RWX_SELF_NAME}" rwx_self_user() { echo "${HOME}/${RWX_SELF_NAME}" From 0818e810386ab467e3f54d5770d77a9e35677c89 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 21:37:55 +0100 Subject: [PATCH 028/253] install/commands --- sh/self.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sh/self.sh b/sh/self.sh index fe3a86c..7d22136 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -27,7 +27,14 @@ rwx_self_help() { rwx_self_install() { local target="${1}" - local file + local command file + # commands + local root="${target}/usr/local/bin" + for command in $(rwx_self_commands); do + file="${root}/${command}" + rwx_remove "${file}" + rwx_link "${file}" "${RWX_MAIN_PATH}" + done # sh file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh" rwx_remove "${file}" From b61ec7044d797b6089d3040bcfcc3a735b321f3a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 21:39:41 +0100 Subject: [PATCH 029/253] fix --- sh/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/util.sh b/sh/util.sh index 15925c6..4dd81bf 100644 --- a/sh/util.sh +++ b/sh/util.sh @@ -10,7 +10,7 @@ rwx_link() { local link="${1}" local target="${2}" ln \ - --sybolic \ + --symbolic \ "${target}" \ "${link}" } From 52b6c06cb1e1137907c3d81214ce372c97c3e5f0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 21:48:04 +0100 Subject: [PATCH 030/253] self/command --- sh/main.sh | 4 ++-- sh/self.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 1654ba2..cd8c67a 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -7,7 +7,7 @@ RWX_MAIN_NAME="main.sh" RWX_SELF_NAME="rwx" -RWX_PREFIX_COMMAND="_${RWX_SELF_NAME}_cmd_" +RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_" # ╭───────────╮ # │ variables │ @@ -151,7 +151,7 @@ rwx_main() { local argument="${0}" local function name name="$(basename "${argument}")" - function="${RWX_PREFIX_COMMAND}${name}" + function="${RWX_SELF_COMMAND}${name}" "${function}" "${@}" ;; esac diff --git a/sh/self.sh b/sh/self.sh index 7d22136..dd43765 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -3,9 +3,9 @@ rwx_self_commands() { grep \ --directories "recurse" \ --no-filename \ - "^${RWX_PREFIX_COMMAND}" "${RWX_ROOT_SYSTEM}" | + "^${RWX_SELF_COMMAND}" "${RWX_ROOT_SYSTEM}" | cut --delimiter "(" --fields 1 | - sed "s|^${RWX_PREFIX_COMMAND}||" + sed "s|^${RWX_SELF_COMMAND}||" } # get functions from root From a8f4ad7097c0000975c29f50452a6590015a837f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 22:01:38 +0100 Subject: [PATCH 031/253] ${0} --- sh/main.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/main.sh b/sh/main.sh index cd8c67a..f3671d8 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -130,7 +130,8 @@ rwx_main() { fi # user root rwx_source "$(rwx_self_user)" - case "$(rwx_shell)" in + # + case "${0}" in "bash" | \ "dash" | \ "sh") From dc1fdbace711d6eeb50e7f5a84325ac7e3845975 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 22:06:18 +0100 Subject: [PATCH 032/253] =?UTF-8?q?=E2=88=92arg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/main.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index f3671d8..6c6001e 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -149,9 +149,8 @@ rwx_main() { fi ;; *) - local argument="${0}" local function name - name="$(basename "${argument}")" + name="$(basename "${0}")" function="${RWX_SELF_COMMAND}${name}" "${function}" "${@}" ;; From 05e5d00a952c3b23597b3103170f56413a4fca5b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 22:10:05 +0100 Subject: [PATCH 033/253] self/user --- sh/main.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 6c6001e..554a2ce 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -14,13 +14,10 @@ RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_" # ╰───────────╯ RWX_ROOT_SYSTEM="/usr/local/lib/${RWX_SELF_NAME}" +RWX_SELF_USER="${HOME}/${RWX_SELF_NAME}" RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}" -rwx_self_user() { - echo "${HOME}/${RWX_SELF_NAME}" -} - rwx_shell() { cat "/proc/${$}/comm" } @@ -129,7 +126,7 @@ rwx_main() { return 1 fi # user root - rwx_source "$(rwx_self_user)" + rwx_source "${RWX_SELF_USER}" # case "${0}" in "bash" | \ From 77a53428e123a9117d5b00b86070258c8da331ff Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 22:11:52 +0100 Subject: [PATCH 034/253] rwx/shell --- sh/alias/shell.sh | 2 +- sh/shell.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/alias/shell.sh b/sh/alias/shell.sh index 4b0949b..d6f5801 100644 --- a/sh/alias/shell.sh +++ b/sh/alias/shell.sh @@ -17,7 +17,7 @@ x() { "${@}" } -[ "$(rwx_shell)" = "bash" ] || return +[ "${RWX_SHELL}" = "bash" ] || return # shellcheck disable=SC3033 ..() { diff --git a/sh/shell.sh b/sh/shell.sh index 54284c6..4f0db9b 100644 --- a/sh/shell.sh +++ b/sh/shell.sh @@ -1,6 +1,6 @@ _rwx_shell_color() { local code="${1}" - case "$(rwx_shell)" in + case "${RWX_SHELL}" in "bash") printf "\x01\e[0" if [ -n "${code}" ]; then @@ -33,7 +33,7 @@ rwx_shell_configure() { PS1="\$(rwx_shell_prompt \${?})" PS2="├ " # specific - case "$(rwx_shell)" in + case "${RWX_SHELL}" in "bash") # completion local root="/usr/share/bash-completion" From 3b11f3b45920811ad4336926f89dcf71a0601623 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 22:13:16 +0100 Subject: [PATCH 035/253] rwx/shell --- sh/main.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 554a2ce..4d311bb 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -15,13 +15,10 @@ RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_" RWX_ROOT_SYSTEM="/usr/local/lib/${RWX_SELF_NAME}" RWX_SELF_USER="${HOME}/${RWX_SELF_NAME}" +RWX_SHELL="$(cat "/proc/${$}/comm")" RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}" -rwx_shell() { - cat "/proc/${$}/comm" -} - # ╭──────╮ # │ core │ # ╰──────╯ From 76176ae49f3786da458196dede1b9a58b954d5cd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 22:28:22 +0100 Subject: [PATCH 036/253] cmd/install --- sh/self.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sh/self.sh b/sh/self.sh index dd43765..cd07ad5 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -25,6 +25,7 @@ rwx_self_help() { " u__… = user" } +_rwx_cmd_rwx_install() { rwx_self_install "${@}"; } rwx_self_install() { local target="${1}" local command file From 8e2cd2a86751a6d85a715170fc67c820ed022a57 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 23:20:05 +0100 Subject: [PATCH 037/253] arg0 --- sh/main.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 4d311bb..a752396 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -125,7 +125,8 @@ rwx_main() { # user root rwx_source "${RWX_SELF_USER}" # - case "${0}" in + local argument="$(echo "${0}" | sed "s|^-||")" + case "${argument}" in "bash" | \ "dash" | \ "sh") @@ -144,7 +145,7 @@ rwx_main() { ;; *) local function name - name="$(basename "${0}")" + name="$(basename "${argument}")" function="${RWX_SELF_COMMAND}${name}" "${function}" "${@}" ;; From 9f705e6af84441df19e5240872d2a0e91c54a717 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 23:21:14 +0100 Subject: [PATCH 038/253] arg --- sh/main.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/main.sh b/sh/main.sh index a752396..2d729f3 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -125,7 +125,8 @@ rwx_main() { # user root rwx_source "${RWX_SELF_USER}" # - local argument="$(echo "${0}" | sed "s|^-||")" + local argument + argument="$(echo "${0}" | sed "s|^-||")" case "${argument}" in "bash" | \ "dash" | \ From ce872d4ecb48c80029b175d68ffd7991ed2f1187 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Dec 2024 23:40:54 +0100 Subject: [PATCH 039/253] file/append,empty --- sh/util.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sh/util.sh b/sh/util.sh index 4dd81bf..cbcd67a 100644 --- a/sh/util.sh +++ b/sh/util.sh @@ -1,3 +1,18 @@ +rwx_file_append() { + local file="${1}" + local text="${2}" + if [ -n "${file}" ]; then + printf "%s" "${text}" >>"${file}" + fi +} + +rwx_file_empty() { + local file="${1}" + if [ -n "${file}" ]; then + rwx_file_write "${file}" "" + fi +} + rwx_file_write() { local file="${1}" local text="${2}" From 7dbf58119172afeb8c60f0ffbb3f5995dd20a7c7 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 00:06:42 +0100 Subject: [PATCH 040/253] self/subset,write --- sh/self.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/sh/self.sh b/sh/self.sh index cd07ad5..fdce1af 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -45,3 +45,34 @@ rwx_self_install() { rwx_remove "${file}" rwx_link "${file}" "${RWX_MAIN_PATH}" } + +rwx_self_subset() { + local argument path + for argument in "${@}"; do + path="${RWX_ROOT_SYSTEM}/${argument}" + if [ -d "${path}" ]; then + rwx_find_shell "${path}" + elif [ -f "${path}" ]; then + echo "${argument}" + fi + done +} + +rwx_self_write() { + local target="${1}" + if [ -n "${target}" ]; then + shift + local file text + text="#! /usr/bin/env sh +" + rwx_ifs_set + for file in $(rwx_self_subset "${@}"); do + text="${text} +# ${file} + +$(cat "${RWX_ROOT_SYSTEM}/${file}")" + done + rwx_ifs_unset + rwx_file_write "${target}" "${text}" + fi +} From f3851dbc885960242dcd5b6ba09e1ec7d8936931 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 00:30:01 +0100 Subject: [PATCH 041/253] fixes --- sh/self.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sh/self.sh b/sh/self.sh index fdce1af..870f010 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -51,7 +51,10 @@ rwx_self_subset() { for argument in "${@}"; do path="${RWX_ROOT_SYSTEM}/${argument}" if [ -d "${path}" ]; then - rwx_find_shell "${path}" + local file + for file in $(rwx_find_shell "${path}"); do + echo "${argument}/${file}" + done elif [ -f "${path}" ]; then echo "${argument}" fi @@ -68,9 +71,8 @@ rwx_self_write() { rwx_ifs_set for file in $(rwx_self_subset "${@}"); do text="${text} -# ${file} - -$(cat "${RWX_ROOT_SYSTEM}/${file}")" +$(cat "${RWX_ROOT_SYSTEM}/${file}") +" done rwx_ifs_unset rwx_file_write "${target}" "${text}" From 0dfe86a9704e820b2e825adbfc6a86013bec1153 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 00:39:16 +0100 Subject: [PATCH 042/253] target/shfmt --- sh/lint/shfmt.sh | 4 ++-- sh/self.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/lint/shfmt.sh b/sh/lint/shfmt.sh index 097de86..4d6e894 100644 --- a/sh/lint/shfmt.sh +++ b/sh/lint/shfmt.sh @@ -1,4 +1,4 @@ rwx_shfmt() { - local root="${1}" - shfmt --diff "${root}" + local path="${1}" + shfmt --diff "${path}" } diff --git a/sh/self.sh b/sh/self.sh index 870f010..b09d46e 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -76,5 +76,6 @@ $(cat "${RWX_ROOT_SYSTEM}/${file}") done rwx_ifs_unset rwx_file_write "${target}" "${text}" + rwx_shfmt "${target}" fi } From 45d93964e5bef20f3ec0979903a4809769cbd68c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 00:42:35 +0100 Subject: [PATCH 043/253] remove --- sh/lint/shellcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/lint/shellcheck.sh b/sh/lint/shellcheck.sh index b520fd9..d5708ca 100644 --- a/sh/lint/shellcheck.sh +++ b/sh/lint/shellcheck.sh @@ -16,7 +16,7 @@ rwx_shellcheck() { --external-sources \ --shell "dash" \ "${file}" - rm "${file}" + rwx_remove "${file}" } rwx_shellcheck_write() { From aa2c6df97e0a23b9f94e916514c74a4c6af47d57 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 00:46:30 +0100 Subject: [PATCH 044/253] shellcheck/file --- sh/lint/shellcheck.sh | 7 ++++++- sh/self.sh | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sh/lint/shellcheck.sh b/sh/lint/shellcheck.sh index d5708ca..ac8c700 100644 --- a/sh/lint/shellcheck.sh +++ b/sh/lint/shellcheck.sh @@ -9,6 +9,12 @@ rwx_shellcheck() { echo ". \"${path}\"" >>"${file}" done rwx_ifs_unset + rwx_shellcheck_file "${file}" + rwx_remove "${file}" +} + +rwx_shellcheck_file() { + local file="${1}" shellcheck \ --check-sourced \ --enable "all" \ @@ -16,7 +22,6 @@ rwx_shellcheck() { --external-sources \ --shell "dash" \ "${file}" - rwx_remove "${file}" } rwx_shellcheck_write() { diff --git a/sh/self.sh b/sh/self.sh index b09d46e..41a2a0c 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -77,5 +77,6 @@ $(cat "${RWX_ROOT_SYSTEM}/${file}") rwx_ifs_unset rwx_file_write "${target}" "${text}" rwx_shfmt "${target}" + rwx_shellcheck_file "${target}" fi } From 240c0533ecc0ea013a49e1b671fd33ad5f9fedf9 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 01:18:40 +0100 Subject: [PATCH 045/253] mv --- sh/{ => log}/log.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sh/{ => log}/log.sh (100%) diff --git a/sh/log.sh b/sh/log/log.sh similarity index 100% rename from sh/log.sh rename to sh/log/log.sh From 8ad9ebc602b4d212071ea48d13d3eabf9d6c4cd5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 01:41:08 +0100 Subject: [PATCH 046/253] step/__ --- sh/log/step.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sh/log/step.sh diff --git a/sh/log/step.sh b/sh/log/step.sh new file mode 100644 index 0000000..30c64f4 --- /dev/null +++ b/sh/log/step.sh @@ -0,0 +1,11 @@ +# ╭───────────────╮ +# │ __ = internal │ +# ╰───────────────╯ + +# __RWX_BAR_TOP +# __RWX_BAR_MIDDLE +# __RWX_BAR_BOTTOM + +# __RWX_STEP_LEVEL +# __RWX_STEP_level_INDEX +# __RWX_STEP_level_LABEL From 93d1cef6e36dd598cf777cb9319be8801427ffb0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 01:44:01 +0100 Subject: [PATCH 047/253] step/box --- sh/log/step.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sh/log/step.sh b/sh/log/step.sh index 30c64f4..34a5c64 100644 --- a/sh/log/step.sh +++ b/sh/log/step.sh @@ -9,3 +9,17 @@ # __RWX_STEP_LEVEL # __RWX_STEP_level_INDEX # __RWX_STEP_level_LABEL + +# ╭─────────────╮ +# │ _ = private │ +# ╰─────────────╯ + +_RWX_BOX_DOWN_AND_HORIZONTAL="┬" +_RWX_BOX_DOWN_AND_LEFT="╮" +_RWX_BOX_DOWN_AND_RIGHT="╭" +_RWX_BOX_HORIZONTAL="─" +_RWX_BOX_LEFT="╴" +_RWX_BOX_UP_AND_HORIZONTAL="┴" +_RWX_BOX_UP_AND_LEFT="╯" +_RWX_BOX_UP_AND_RIGHT="╰" +_RWX_BOX_VERTICAL="│" From 3495d35051bfe0a77f341d69a5c1fb16f913d26f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 01:53:34 +0100 Subject: [PATCH 048/253] modules --- sh/main.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 2d729f3..d1b3a65 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -95,13 +95,12 @@ rwx_source() { local path="${1}" [ -d "${path}" ] || return 1 - local count module modules - modules="$(rwx_find_shell "${path}" "${RWX_MAIN_NAME}")" - rwx_ifs_set + local count module count=0 __rwx_log "" \ ". ${path}" - for module in ${modules}; do + rwx_ifs_set + for module in $(rwx_find_shell "${path}" "${RWX_MAIN_NAME}"); do count=$((count + 1)) __rwx_log "$(printf "%02d" "${count}") ${module%.sh}" module="${path}/${module}" From 1681e1567f0ed3076dae1816e23ab4de7c4c2549 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 03:05:07 +0100 Subject: [PATCH 049/253] =?UTF-8?q?=E2=86=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/main.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/main.sh b/sh/main.sh index d1b3a65..ceb6414 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -13,9 +13,10 @@ RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_" # │ variables │ # ╰───────────╯ +RWX_SHELL="$(cat "/proc/${$}/comm")" + RWX_ROOT_SYSTEM="/usr/local/lib/${RWX_SELF_NAME}" RWX_SELF_USER="${HOME}/${RWX_SELF_NAME}" -RWX_SHELL="$(cat "/proc/${$}/comm")" RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}" From e60e72d1da4514d7d47375c537da8629ca571159 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 03:22:30 +0100 Subject: [PATCH 050/253] main --- sh/main.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index ceb6414..3655ca7 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -1,17 +1,17 @@ #! /usr/bin/env sh -# ╭───────────╮ -# │ constants │ -# ╰───────────╯ +# ╭──────┬───────────╮ +# │ main │ constants │ +# ╰──────┴───────────╯ RWX_MAIN_NAME="main.sh" RWX_SELF_NAME="rwx" RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_" -# ╭───────────╮ -# │ variables │ -# ╰───────────╯ +# ╭──────┬───────────╮ +# │ main │ variables │ +# ╰──────┴───────────╯ RWX_SHELL="$(cat "/proc/${$}/comm")" @@ -20,9 +20,9 @@ RWX_SELF_USER="${HOME}/${RWX_SELF_NAME}" RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}" -# ╭──────╮ -# │ core │ -# ╰──────╯ +# ╭──────┬───────╮ +# │ main │ shell │ +# ╰──────┴───────╯ # test if active shell is in interactive mode rwx_shell_interactive() { @@ -33,7 +33,7 @@ rwx_shell_interactive() { } # ╭──────┬─────╮ -# │ core │ log │ +# │ main │ log │ # ╰──────┴─────╯ __rwx_log() { @@ -47,7 +47,7 @@ __rwx_log() { } # ╭──────┬──────╮ -# │ core │ find │ +# │ main │ find │ # ╰──────┴──────╯ # find directory’s files by extension @@ -74,7 +74,7 @@ rwx_find_shell() { } # ╭──────┬─────╮ -# │ core │ ifs │ +# │ main │ ifs │ # ╰──────┴─────╯ rwx_ifs_set() { @@ -89,7 +89,7 @@ rwx_ifs_unset() { } # ╭──────┬────────╮ -# │ core │ source │ +# │ main │ source │ # ╰──────┴────────╯ rwx_source() { @@ -111,9 +111,9 @@ rwx_source() { rwx_ifs_unset } -# ╭──────┬──────╮ -# │ core │ main │ -# ╰──────┴──────╯ +# ╭──────╮ +# │ main │ +# ╰──────╯ # run initial steps rwx_main() { From 68ec08871cb599899a3e6796adc5ba32c4da036d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 04:02:26 +0100 Subject: [PATCH 051/253] command/argument,name --- sh/main.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sh/main.sh b/sh/main.sh index 3655ca7..6b1605d 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -13,8 +13,15 @@ RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_" # │ main │ variables │ # ╰──────┴───────────╯ +RWX_COMMAND_ARGUMENT="${0}" RWX_SHELL="$(cat "/proc/${$}/comm")" +RWX_COMMAND_NAME="$(basename "${RWX_COMMAND_ARGUMENT}" | + sed "s|^-||")" +case "${RWX_COMMAND_NAME}" in +"bash" | "dash" | "sh") unset RWX_COMMAND_NAME ;; +*) ;; +esac RWX_ROOT_SYSTEM="/usr/local/lib/${RWX_SELF_NAME}" RWX_SELF_USER="${HOME}/${RWX_SELF_NAME}" From 1eb130320e77765a84c0abadcf0bebfadc30fed6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 15:07:55 +0100 Subject: [PATCH 052/253] context/command,shell --- sh/main.sh | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 6b1605d..eb938e8 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -131,13 +131,11 @@ rwx_main() { fi # user root rwx_source "${RWX_SELF_USER}" - # - local argument - argument="$(echo "${0}" | sed "s|^-||")" - case "${argument}" in - "bash" | \ - "dash" | \ - "sh") + # context / command + if [ -n "${RWX_COMMAND_NAME}" ]; then + "${RWX_SELF_COMMAND}${RWX_COMMAND_NAME}" "${@}" + # context / shell + else # run interactive extras if rwx_shell_interactive; then # check format @@ -150,14 +148,7 @@ rwx_main() { rwx_log rwx_self_help fi - ;; - *) - local function name - name="$(basename "${argument}")" - function="${RWX_SELF_COMMAND}${name}" - "${function}" "${@}" - ;; - esac + fi } # run main function From 01e6165788f2da37a744cd8c53e293728b2bfa1c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 2 Dec 2024 15:24:27 +0100 Subject: [PATCH 053/253] self/init --- sh/main.sh | 13 +------------ sh/self.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index eb938e8..802418f 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -136,18 +136,7 @@ rwx_main() { "${RWX_SELF_COMMAND}${RWX_COMMAND_NAME}" "${@}" # context / shell else - # run interactive extras - if rwx_shell_interactive; then - # check format - rwx_log - rwx_shfmt "${RWX_ROOT_SYSTEM}" - # check syntax - rwx_log - rwx_shellcheck "${RWX_ROOT_SYSTEM}" - # help - rwx_log - rwx_self_help - fi + rwx_self_init fi } diff --git a/sh/self.sh b/sh/self.sh index 41a2a0c..c6fad3b 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -1,3 +1,7 @@ +# ╭──────┬──────────╮ +# │ self │ commands │ +# ╰──────┴──────────╯ + # get commands from root rwx_self_commands() { grep \ @@ -8,6 +12,10 @@ rwx_self_commands() { sed "s|^${RWX_SELF_COMMAND}||" } +# ╭──────┬───────────╮ +# │ self │ functions │ +# ╰──────┴───────────╯ + # get functions from root rwx_self_functions() { grep \ @@ -17,6 +25,10 @@ rwx_self_functions() { cut --delimiter "(" --fields 1 } +# ╭──────┬──────╮ +# │ self │ help │ +# ╰──────┴──────╯ + # output help message rwx_self_help() { rwx_log \ @@ -25,6 +37,29 @@ rwx_self_help() { " u__… = user" } +# ╭──────┬──────╮ +# │ self │ init │ +# ╰──────┴──────╯ + +rwx_self_init() { + # run interactive extras + if rwx_shell_interactive; then + # check format + rwx_log + rwx_shfmt "${RWX_ROOT_SYSTEM}" + # check syntax + rwx_log + rwx_shellcheck "${RWX_ROOT_SYSTEM}" + # help + rwx_log + rwx_self_help + fi +} + +# ╭──────┬─────────╮ +# │ self │ install │ +# ╰──────┴─────────╯ + _rwx_cmd_rwx_install() { rwx_self_install "${@}"; } rwx_self_install() { local target="${1}" @@ -46,6 +81,10 @@ rwx_self_install() { rwx_link "${file}" "${RWX_MAIN_PATH}" } +# ╭──────┬────────╮ +# │ self │ subset │ +# ╰──────┴────────╯ + rwx_self_subset() { local argument path for argument in "${@}"; do @@ -61,6 +100,10 @@ rwx_self_subset() { done } +# ╭──────┬───────╮ +# │ self │ write │ +# ╰──────┴───────╯ + rwx_self_write() { local target="${1}" if [ -n "${target}" ]; then From f2ae14fe23dc02452383f36bf122620547f453dd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 8 Dec 2024 21:51:24 +0100 Subject: [PATCH 054/253] self/install/target --- sh/self.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/self.sh b/sh/self.sh index c6fad3b..62d405e 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -76,7 +76,7 @@ rwx_self_install() { rwx_remove "${file}" rwx_file_write "${file}" "export ENV=\"${RWX_MAIN_PATH}\"" # bash - file="/etc/bash.bashrc" + file="${target}/etc/bash.bashrc" rwx_remove "${file}" rwx_link "${file}" "${RWX_MAIN_PATH}" } From 6d33252ea40c63c157d88aef694ef1a561e94b21 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 8 Dec 2024 21:57:14 +0100 Subject: [PATCH 055/253] lf --- sh/self.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sh/self.sh b/sh/self.sh index 62d405e..1906699 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -74,7 +74,9 @@ rwx_self_install() { # sh file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh" rwx_remove "${file}" - rwx_file_write "${file}" "export ENV=\"${RWX_MAIN_PATH}\"" + rwx_file_write "${file}" "\ +export ENV=\"${RWX_MAIN_PATH}\" +" # bash file="${target}/etc/bash.bashrc" rwx_remove "${file}" From 2c3167178e0535c95b99bf9ec270bb8045d9d5fa Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 8 Dec 2024 22:37:36 +0100 Subject: [PATCH 056/253] self/install/code --- sh/self.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sh/self.sh b/sh/self.sh index 1906699..00f15e7 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -63,9 +63,14 @@ rwx_self_init() { _rwx_cmd_rwx_install() { rwx_self_install "${@}"; } rwx_self_install() { local target="${1}" - local command file + [ -n "${target}" ] || exit + local command file root + # code + root="${target}${RWX_ROOT_SYSTEM}" + rwx_remove "${root}" + cp --recursive "${RWX_ROOT_SYSTEM}" "${root}" # commands - local root="${target}/usr/local/bin" + root="${target}/usr/local/bin" for command in $(rwx_self_commands); do file="${root}/${command}" rwx_remove "${file}" From 4482928678a08c577a5f6dea21c57205794c9b45 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 22 Dec 2024 23:51:32 +0100 Subject: [PATCH 057/253] self/check --- sh/self.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sh/self.sh b/sh/self.sh index 00f15e7..639e87d 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -1,3 +1,17 @@ +# ╭──────┬───────╮ +# │ self │ check │ +# ╰──────┴───────╯ + +# check source code +rwx_self_check() { + # check format + rwx_log + rwx_shfmt "${RWX_ROOT_SYSTEM}" + # check syntax + rwx_log + rwx_shellcheck "${RWX_ROOT_SYSTEM}" +} + # ╭──────┬──────────╮ # │ self │ commands │ # ╰──────┴──────────╯ @@ -44,12 +58,6 @@ rwx_self_help() { rwx_self_init() { # run interactive extras if rwx_shell_interactive; then - # check format - rwx_log - rwx_shfmt "${RWX_ROOT_SYSTEM}" - # check syntax - rwx_log - rwx_shellcheck "${RWX_ROOT_SYSTEM}" # help rwx_log rwx_self_help From 4f085af44ecfb753a134e5abdff3127516c66e35 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 12 Jan 2025 16:26:56 +0100 Subject: [PATCH 058/253] ffmpeg/devices/reset --- sh/ffmpeg.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sh/ffmpeg.sh diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh new file mode 100644 index 0000000..c8471f6 --- /dev/null +++ b/sh/ffmpeg.sh @@ -0,0 +1,10 @@ +# ╭────────┬─────────┬───────╮ +# │ ffmpeg │ devices │ reset │ +# ╰────────┴─────────┴───────╯ + +_rwx_cmd_rwx_ffmpeg_devices_reset() { rwx_ffmpeg_devices_reset "${@}"; } +rwx_ffmpeg_devices_reset() { + local module="uvcvideo" + modprobe --remove "${module}" && + modprobe "${module}" +} From 3b2f1447f968930578f58f288be3520baba02881 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 12 Jan 2025 16:54:01 +0100 Subject: [PATCH 059/253] install/return --- sh/self.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/self.sh b/sh/self.sh index 639e87d..e91425b 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -71,7 +71,7 @@ rwx_self_init() { _rwx_cmd_rwx_install() { rwx_self_install "${@}"; } rwx_self_install() { local target="${1}" - [ -n "${target}" ] || exit + [ -n "${target}" ] || return local command file root # code root="${target}${RWX_ROOT_SYSTEM}" From da4ec335548604508b4bcc2dcc2cf7237d9801c1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 12 Jan 2025 17:04:28 +0100 Subject: [PATCH 060/253] install/code --- sh/self.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sh/self.sh b/sh/self.sh index e91425b..08ca24f 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -71,12 +71,13 @@ rwx_self_init() { _rwx_cmd_rwx_install() { rwx_self_install "${@}"; } rwx_self_install() { local target="${1}" - [ -n "${target}" ] || return local command file root # code - root="${target}${RWX_ROOT_SYSTEM}" - rwx_remove "${root}" - cp --recursive "${RWX_ROOT_SYSTEM}" "${root}" + if [ -n "${target}" ]; then + root="${target}${RWX_ROOT_SYSTEM}" + rwx_remove "${root}" + cp --recursive "${RWX_ROOT_SYSTEM}" "${root}" + fi # commands root="${target}/usr/local/bin" for command in $(rwx_self_commands); do From 3e0459b85cd8a15ae8ecdb017aa5169411f20720 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 12 Jan 2025 17:26:29 +0100 Subject: [PATCH 061/253] ffmpeg/formats --- sh/ffmpeg.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh index c8471f6..0fb29e1 100644 --- a/sh/ffmpeg.sh +++ b/sh/ffmpeg.sh @@ -8,3 +8,16 @@ rwx_ffmpeg_devices_reset() { modprobe --remove "${module}" && modprobe "${module}" } + +# ╭────────┬────────┬─────────╮ +# │ ffmpeg │ device │ formats │ +# ╰────────┴────────┴─────────╯ + +rwx_ffmpeg_device_formats() { + local device="${1}" + [ -n "${device}" ] || device="/dev/video0" + ffmpeg \ + -f "v4l2" \ + -list_formats "all" \ + -i "${device}" +} From 006abeb31ccd569df19654610b1b6601ea48e891 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 13 Jan 2025 00:14:47 +0100 Subject: [PATCH 062/253] ffmpeg/draft --- sh/ffmpeg.sh | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh index 0fb29e1..da6b5ee 100644 --- a/sh/ffmpeg.sh +++ b/sh/ffmpeg.sh @@ -21,3 +21,91 @@ rwx_ffmpeg_device_formats() { -list_formats "all" \ -i "${device}" } + +# ╭────────┬───────╮ +# │ ffmpeg │ input │ +# ╰────────┴───────╯ + +rwx_ffmpeg_input_file() { + local file="${1}" + local from="${2}" + local to="${3}" + [ -n "${file}" ] || return + set -- \ + -i "${file}" + if [ -n "${to}" ]; then + set -- "${@}" \ + -ss "${from}" \ + -to "${to}" + fi + local argument + for argument in "${@}"; do echo "${argument}"; done +} + +rwx_ffmpeg_input_nearstream_ccd10() { + local device="${1}" + [ -n "${device}" ] || device="/dev/video0" + set -- \ + -f "v4l2" \ + -video_size "1920x1080" \ + -framerate "60" \ + -input_format "yuyv422" \ + -i "${device}" + local argument + for argument in "${@}"; do echo "${argument}"; done +} + +# ╭────────┬────────╮ +# │ ffmpeg │ output │ +# ╰────────┴────────╯ + +rwx_ffmpeg_output_fast() { + local file="${1}" + [ -n "${file}" ] || return + set -- \ + -codec:v "libx264" \ + -preset "ultrafast" \ + -crf "0" \ + -y "${file}" + local argument + for argument in "${@}"; do echo "${argument}"; done +} + +rwx_ffmpeg_output_slow() { + local file="${1}" + local crf="${2}" + local codec="${3}" + [ -n "${file}" ] || return + [ -n "${codec}" ] || codec="libx264" + if [ -z "${crm}" ]; then + case "${codec}" in + "libx264") crf="23" ;; + "libx265") crf="28" ;; + *) ;; + esac + fi + set -- \ + -codec:v "${codec}" \ + -preset "veryslow" \ + -crf "${crf}" \ + -movflags "+faststart" \ + -pix_fmt "yuv420p" \ + -y "${file}" + local argument + for argument in "${@}"; do echo "${argument}"; done +} + +# ╭────────┬────────╮ +# │ ffmpeg │ record │ +# ╰────────┴────────╯ + +rwx_ffmpeg_record_ccd10() { + local file="${1}" + [ -n "${file}" ] || return + set -- \ + $(rwx_ffmpeg_input_nearstream_ccd10) \ + $(rwx_ffmpeg_output_fast "${file}") + local argument + echo "${@}" + ffmpeg "${@}" +} From 07fc4c6eb48f2b870c0ce2a4fe30bc16f977928a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 13 Jan 2025 04:32:30 +0100 Subject: [PATCH 063/253] gsettings/draft --- sh/gnome.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/sh/gnome.sh b/sh/gnome.sh index 11831fb..bbed07f 100644 --- a/sh/gnome.sh +++ b/sh/gnome.sh @@ -1,3 +1,34 @@ +rwx_gnome_set() { + local group="${1}" + local key="${2}" + local value="${3}" + [ -n "${value}" ] || return + gsettings set "${group}" "${key}" "${value}" +} + +rwx_gnome_set_background() { + local key="${1}" + local value="${2}" + [ -n "${value}" ] || return + rwx_gnome_set "org.gnome.desktop.background" "${key}" "${value}" +} + +rwx_gnome_background_black() { + rwx_gnome_set_background "color-shading-type" "solid" + rwx_gnome_set_background "primary-color" "#000000" +} + +rwx_gnome_background_white() { + rwx_gnome_set_background "color-shading-type" "solid" + rwx_gnome_set_background "primary-color" "#ffffff" +} + +rwx_gnome_background_win3() { + rwx_gnome_set_background "color-shading-type" "vertical" + rwx_gnome_set_background "primary-color" "#000000" + rwx_gnome_set_background "secondary-color" "#0000ff" +} + rwx_gnome_proxy() { local value case "${1}" in From 22fa109aac97962645177cac84f66cca26e95e0c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 13 Jan 2025 04:46:57 +0100 Subject: [PATCH 064/253] gnome/frames --- sh/gnome.sh | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/sh/gnome.sh b/sh/gnome.sh index bbed07f..b17a058 100644 --- a/sh/gnome.sh +++ b/sh/gnome.sh @@ -1,17 +1,6 @@ -rwx_gnome_set() { - local group="${1}" - local key="${2}" - local value="${3}" - [ -n "${value}" ] || return - gsettings set "${group}" "${key}" "${value}" -} - -rwx_gnome_set_background() { - local key="${1}" - local value="${2}" - [ -n "${value}" ] || return - rwx_gnome_set "org.gnome.desktop.background" "${key}" "${value}" -} +# ╭───────┬────────────╮ +# │ gnome │ background │ +# ╰───────┴────────────╯ rwx_gnome_background_black() { rwx_gnome_set_background "color-shading-type" "solid" @@ -29,6 +18,10 @@ rwx_gnome_background_win3() { rwx_gnome_set_background "secondary-color" "#0000ff" } +# ╭───────┬───────╮ +# │ gnome │ proxy │ +# ╰───────┴───────╯ + rwx_gnome_proxy() { local value case "${1}" in @@ -38,6 +31,29 @@ rwx_gnome_proxy() { gsettings set "org.gnome.system.proxy" "mode" "${value}" } +# ╭───────┬─────╮ +# │ gnome │ set │ +# ╰───────┴─────╯ + +rwx_gnome_set() { + local group="${1}" + local key="${2}" + local value="${3}" + [ -n "${value}" ] || return + gsettings set "${group}" "${key}" "${value}" +} + +rwx_gnome_set_background() { + local key="${1}" + local value="${2}" + [ -n "${value}" ] || return + rwx_gnome_set "org.gnome.desktop.background" "${key}" "${value}" +} + +# ╭───────┬────────────╮ +# │ gnome │ workspaces │ +# ╰───────┴────────────╯ + rwx_gnome_workspaces_primary() { local bool local group="org.gnome.mutter" From 149cc47894c06c2012961002f81efd021778eb9f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 13 Jan 2025 04:49:31 +0100 Subject: [PATCH 065/253] ffmpeg/wip --- sh/ffmpeg.sh | 80 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 14 deletions(-) diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh index da6b5ee..36ffc23 100644 --- a/sh/ffmpeg.sh +++ b/sh/ffmpeg.sh @@ -26,6 +26,18 @@ rwx_ffmpeg_device_formats() { # │ ffmpeg │ input │ # ╰────────┴───────╯ +rwx_ffmpeg_input_blue_yeti() { + local device="alsa_input.\ +usb-Generic_Blue_Microphones_2051BAB04XY8-00.analog-stereo" + set -- \ + -f "pulse" \ + -i "${device}" \ + -ac "2" \ + -ar "48000" + local argument + for argument in "${@}"; do echo "${argument}"; done +} + rwx_ffmpeg_input_file() { local file="${1}" local from="${2}" @@ -59,23 +71,43 @@ rwx_ffmpeg_input_nearstream_ccd10() { # │ ffmpeg │ output │ # ╰────────┴────────╯ -rwx_ffmpeg_output_fast() { +rwx_ffmpeg_output_audio_fast() { + set -- \ + -codec:a "flac" \ + -compression_level "0" + local argument + for argument in "${@}"; do echo "${argument}"; done +} + +rwx_ffmpeg_output_audio_slow() { + set -- \ + -codec:a "libopus" \ + -b:a "128k" + local argument + for argument in "${@}"; do echo "${argument}"; done +} + +rwx_ffmpeg_output_file() { local file="${1}" [ -n "${file}" ] || return set -- \ - -codec:v "libx264" \ - -preset "ultrafast" \ - -crf "0" \ -y "${file}" local argument for argument in "${@}"; do echo "${argument}"; done } -rwx_ffmpeg_output_slow() { - local file="${1}" - local crf="${2}" - local codec="${3}" - [ -n "${file}" ] || return +rwx_ffmpeg_output_video_fast() { + set -- \ + -codec:v "libx264" \ + -preset "ultrafast" \ + -crf "0" + local argument + for argument in "${@}"; do echo "${argument}"; done +} + +rwx_ffmpeg_output_video_slow() { + local crf="${1}" + local codec="${2}" [ -n "${codec}" ] || codec="libx264" if [ -z "${crm}" ]; then case "${codec}" in @@ -89,8 +121,7 @@ rwx_ffmpeg_output_slow() { -preset "veryslow" \ -crf "${crf}" \ -movflags "+faststart" \ - -pix_fmt "yuv420p" \ - -y "${file}" + -pix_fmt "yuv420p" local argument for argument in "${@}"; do echo "${argument}"; done } @@ -99,13 +130,34 @@ rwx_ffmpeg_output_slow() { # │ ffmpeg │ record │ # ╰────────┴────────╯ -rwx_ffmpeg_record_ccd10() { +rwx_ffmpeg_record_ccd10_yeti() { local file="${1}" [ -n "${file}" ] || return set -- \ $(rwx_ffmpeg_input_nearstream_ccd10) \ - $(rwx_ffmpeg_output_fast "${file}") - local argument + $(rwx_ffmpeg_input_blue_yeti) \ + $(rwx_ffmpeg_output_video_fast) \ + $(rwx_ffmpeg_output_audio_fast) \ + $(rwx_ffmpeg_output_file "${file}") + echo "${@}" + ffmpeg "${@}" +} + +# ╭────────┬────────╮ +# │ ffmpeg │ reduce │ +# ╰────────┴────────╯ + +rwx_ffmpeg_reduce() { + local input="${1}" + local output="${2}" + local from="${3}" + local to="${4}" + [ -n "${output}" ] || return + set -- \ + $(rwx_ffmpeg_input_file "${input}" "${from}" "${to}") \ + $(rwx_ffmpeg_output_video_slow) \ + $(rwx_ffmpeg_output_audio_slow) \ + $(rwx_ffmpeg_output_file "${output}") echo "${@}" ffmpeg "${@}" } From 53f8c5d91c01cfd843c4c0dc44a24f706e572283 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 13 Jan 2025 07:02:35 +0100 Subject: [PATCH 066/253] doc --- sh/self.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sh/self.sh b/sh/self.sh index 08ca24f..9a937a8 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -1,3 +1,24 @@ +# meta doc +rwx_doc() { + local name="${1}" + [ -n "${name}" ] || return + local doc line module + rwx_ifs_set + for module in $(rwx_find_shell "${RWX_ROOT_SYSTEM}"); do + while read -r line; do + case "${line}" in + "#"*) doc="${doc}${line}" ;; + "${name}() {") + echo "${doc}" + return + ;; + *) doc="" ;; + esac + done < "${RWX_ROOT_SYSTEM}/${module}" + done + rwx_ifs_unset +} + # ╭──────┬───────╮ # │ self │ check │ # ╰──────┴───────╯ From 6d9f366e8affb52e05b5b5a54aaf2eea407b56a8 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 13 Jan 2025 07:44:14 +0100 Subject: [PATCH 067/253] shfmt --- sh/ffmpeg.sh | 6 +++--- sh/self.sh | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh index 36ffc23..1032688 100644 --- a/sh/ffmpeg.sh +++ b/sh/ffmpeg.sh @@ -111,9 +111,9 @@ rwx_ffmpeg_output_video_slow() { [ -n "${codec}" ] || codec="libx264" if [ -z "${crm}" ]; then case "${codec}" in - "libx264") crf="23" ;; - "libx265") crf="28" ;; - *) ;; + "libx264") crf="23" ;; + "libx265") crf="28" ;; + *) ;; esac fi set -- \ diff --git a/sh/self.sh b/sh/self.sh index 9a937a8..732e9c2 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -7,14 +7,14 @@ rwx_doc() { for module in $(rwx_find_shell "${RWX_ROOT_SYSTEM}"); do while read -r line; do case "${line}" in - "#"*) doc="${doc}${line}" ;; - "${name}() {") - echo "${doc}" - return - ;; - *) doc="" ;; + "#"*) doc="${doc}${line}" ;; + "${name}() {") + echo "${doc}" + return + ;; + *) doc="" ;; esac - done < "${RWX_ROOT_SYSTEM}/${module}" + done <"${RWX_ROOT_SYSTEM}/${module}" done rwx_ifs_unset } From 9a1bb4f469458001807531ed532e86df24f42228 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 10:27:59 +0100 Subject: [PATCH 068/253] tmux/setup --- sh/tmux.conf | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sh/tmux.conf diff --git a/sh/tmux.conf b/sh/tmux.conf new file mode 100644 index 0000000..f76371a --- /dev/null +++ b/sh/tmux.conf @@ -0,0 +1,57 @@ +# ╭──────┬───────╮ +# │ tmux │ setup │ +# ╰──────┴───────╯ + +rwx_tmux_setup() { + rwx_file_write "${HOME}/.tmux.conf" "\ +bind-key r source-file ~/.tmux.conf \\; display-message '↑ .tmux.conf' + +set -g automatic-rename on +set -g automatic-rename-format '' +set -g mouse on +set -g renumber-windows on + +set -g set-titles on +set -g set-titles-string '#(pwd)' + +set -g status-bg black +set -g status-fg gray +set -g status-interval 1 +set -g status-left '' +set -g status-position top +set -g status-right '| #{session_name} | %Y/%m/%d %H:%M:%S' + +set -g window-status-activity-style bg=black,fg=red +set -g window-status-separator ' | ' + +set-option -g message-style bg=black,fg=red +set-option -g pane-active-border-style bg=black,fg=green +set-option -g pane-border-style bg=black,fg=gray + +set-option -g prefix C-b +set-option -g prefix2 F12 + +setw -g monitor-activity on +setw -g monitor-silence 0 + +set-window-option -g window-status-current-style bg=black,fg=green +set-window-option -g window-status-style bg=black,fg=gray + +bind -n F6 detach-client + +bind-key -n C-S-Left swap-window -t -1 +bind-key -n C-S-Right swap-window -t +1 + +bind -n F2 new-window +bind -n M-Left previous-window +bind -n M-Right next-window + +bind -n S-Down select-pane -D +bind -n S-Left select-pane -L +bind -n S-Right select-pane -R +bind -n S-Up select-pane -U + +bind-key h split-window -h +bind-key v split-window -v +" +} From dc514e82806dfa555b681bd0e325df40146912bc Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 10:30:48 +0100 Subject: [PATCH 069/253] first only --- sh/tmux.conf | 70 ++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/sh/tmux.conf b/sh/tmux.conf index f76371a..58fd9cb 100644 --- a/sh/tmux.conf +++ b/sh/tmux.conf @@ -6,52 +6,52 @@ rwx_tmux_setup() { rwx_file_write "${HOME}/.tmux.conf" "\ bind-key r source-file ~/.tmux.conf \\; display-message '↑ .tmux.conf' -set -g automatic-rename on -set -g automatic-rename-format '' -set -g mouse on -set -g renumber-windows on +#set -g automatic-rename on +#set -g automatic-rename-format '' +#set -g mouse on +#set -g renumber-windows on -set -g set-titles on -set -g set-titles-string '#(pwd)' +#set -g set-titles on +#set -g set-titles-string '#(pwd)' -set -g status-bg black -set -g status-fg gray -set -g status-interval 1 -set -g status-left '' -set -g status-position top -set -g status-right '| #{session_name} | %Y/%m/%d %H:%M:%S' +#set -g status-bg black +#set -g status-fg gray +#set -g status-interval 1 +#set -g status-left '' +#set -g status-position top +#set -g status-right '| #{session_name} | %Y/%m/%d %H:%M:%S' -set -g window-status-activity-style bg=black,fg=red -set -g window-status-separator ' | ' +#set -g window-status-activity-style bg=black,fg=red +#set -g window-status-separator ' | ' -set-option -g message-style bg=black,fg=red -set-option -g pane-active-border-style bg=black,fg=green -set-option -g pane-border-style bg=black,fg=gray +#set-option -g message-style bg=black,fg=red +#set-option -g pane-active-border-style bg=black,fg=green +#set-option -g pane-border-style bg=black,fg=gray -set-option -g prefix C-b -set-option -g prefix2 F12 +#set-option -g prefix C-b +#set-option -g prefix2 F12 -setw -g monitor-activity on -setw -g monitor-silence 0 +#setw -g monitor-activity on +#setw -g monitor-silence 0 -set-window-option -g window-status-current-style bg=black,fg=green -set-window-option -g window-status-style bg=black,fg=gray +#set-window-option -g window-status-current-style bg=black,fg=green +#set-window-option -g window-status-style bg=black,fg=gray -bind -n F6 detach-client +#bind -n F6 detach-client -bind-key -n C-S-Left swap-window -t -1 -bind-key -n C-S-Right swap-window -t +1 +#bind-key -n C-S-Left swap-window -t -1 +#bind-key -n C-S-Right swap-window -t +1 -bind -n F2 new-window -bind -n M-Left previous-window -bind -n M-Right next-window +#bind -n F2 new-window +#bind -n M-Left previous-window +#bind -n M-Right next-window -bind -n S-Down select-pane -D -bind -n S-Left select-pane -L -bind -n S-Right select-pane -R -bind -n S-Up select-pane -U +#bind -n S-Down select-pane -D +#bind -n S-Left select-pane -L +#bind -n S-Right select-pane -R +#bind -n S-Up select-pane -U -bind-key h split-window -h -bind-key v split-window -v +#bind-key h split-window -h +#bind-key v split-window -v " } From dd918743015fbe75f8d462a66c414d515f9927a2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 11:43:56 +0100 Subject: [PATCH 070/253] .sh --- sh/{tmux.conf => tmux.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sh/{tmux.conf => tmux.sh} (100%) diff --git a/sh/tmux.conf b/sh/tmux.sh similarity index 100% rename from sh/tmux.conf rename to sh/tmux.sh From 749bb2daf74afbe7ec2a71b6922db38aaf68c13e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 12:15:11 +0100 Subject: [PATCH 071/253] tmux/mouse,renumber --- sh/tmux.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 58fd9cb..eb1f689 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -4,12 +4,15 @@ rwx_tmux_setup() { rwx_file_write "${HOME}/.tmux.conf" "\ +# reload configuration bind-key r source-file ~/.tmux.conf \\; display-message '↑ .tmux.conf' #set -g automatic-rename on #set -g automatic-rename-format '' -#set -g mouse on -#set -g renumber-windows on +# enable mouse actions +set -g mouse on +# renumber windows after closing one +set -g renumber-windows on #set -g set-titles on #set -g set-titles-string '#(pwd)' From 2859d3d09c2824792fd9cc648edcbe6b6d54d451 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 12:17:51 +0100 Subject: [PATCH 072/253] tmux/detach --- sh/tmux.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index eb1f689..dd5150c 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -40,7 +40,8 @@ set -g renumber-windows on #set-window-option -g window-status-current-style bg=black,fg=green #set-window-option -g window-status-style bg=black,fg=gray -#bind -n F6 detach-client +# bind key to detach client +bind -n F6 detach-client #bind-key -n C-S-Left swap-window -t -1 #bind-key -n C-S-Right swap-window -t +1 From b39f04ac2f673ada2a568cf08ac2c7dff8093d0b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 12:21:37 +0100 Subject: [PATCH 073/253] tmux/prefix --- sh/tmux.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index dd5150c..ebea101 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -31,8 +31,9 @@ set -g renumber-windows on #set-option -g pane-active-border-style bg=black,fg=green #set-option -g pane-border-style bg=black,fg=gray -#set-option -g prefix C-b -#set-option -g prefix2 F12 +# prefix with ^B or F12 +set-option -g prefix C-b +set-option -g prefix2 F12 #setw -g monitor-activity on #setw -g monitor-silence 0 From 8b69b41d17e861395f8293f3d9007f92036b6db9 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 12:27:55 +0100 Subject: [PATCH 074/253] tmux/windows --- sh/tmux.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index ebea101..cc66afd 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -47,9 +47,11 @@ bind -n F6 detach-client #bind-key -n C-S-Left swap-window -t -1 #bind-key -n C-S-Right swap-window -t +1 -#bind -n F2 new-window -#bind -n M-Left previous-window -#bind -n M-Right next-window +# create new window with F2 +bind -n F2 new-window +# previous or next window with Alt & ← | → +bind -n M-Left previous-window +bind -n M-Right next-window #bind -n S-Down select-pane -D #bind -n S-Left select-pane -L From 89b4110c44acae286903391f15e2f9dc7a026fdf Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 12:35:21 +0100 Subject: [PATCH 075/253] tmux/status --- sh/tmux.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index cc66afd..220bdd8 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -17,12 +17,13 @@ set -g renumber-windows on #set -g set-titles on #set -g set-titles-string '#(pwd)' -#set -g status-bg black -#set -g status-fg gray -#set -g status-interval 1 -#set -g status-left '' -#set -g status-position top -#set -g status-right '| #{session_name} | %Y/%m/%d %H:%M:%S' +# status bar +set -g status-bg black +set -g status-fg gray +set -g status-interval 1 +set -g status-left '' +set -g status-position top +set -g status-right '| #{session_name} | %Y/%m/%d %H:%M:%S' #set -g window-status-activity-style bg=black,fg=red #set -g window-status-separator ' | ' From 101e11535b97aaaf75eeedb4c341c492ce2eb64e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 12:40:51 +0100 Subject: [PATCH 076/253] tmux/styles --- sh/tmux.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 220bdd8..82023dd 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -28,9 +28,11 @@ set -g status-right '| #{session_name} | %Y/%m/%d %H:%M:%S' #set -g window-status-activity-style bg=black,fg=red #set -g window-status-separator ' | ' -#set-option -g message-style bg=black,fg=red -#set-option -g pane-active-border-style bg=black,fg=green -#set-option -g pane-border-style bg=black,fg=gray +# style for messages +set-option -g message-style bg=red,fg=white +# style for pane borders +set-option -g pane-active-border-style bg=black,fg=green +set-option -g pane-border-style bg=black,fg=gray # prefix with ^B or F12 set-option -g prefix C-b From 930113879e02b82436c7b25bad380ac61721e190 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 13:50:06 +0100 Subject: [PATCH 077/253] tmux/monitoring,separator --- sh/tmux.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 82023dd..cb7321b 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -25,8 +25,8 @@ set -g status-left '' set -g status-position top set -g status-right '| #{session_name} | %Y/%m/%d %H:%M:%S' -#set -g window-status-activity-style bg=black,fg=red -#set -g window-status-separator ' | ' +# windows separator +set -g window-status-separator ' | ' # style for messages set-option -g message-style bg=red,fg=white @@ -38,8 +38,12 @@ set-option -g pane-border-style bg=black,fg=gray set-option -g prefix C-b set-option -g prefix2 F12 -#setw -g monitor-activity on -#setw -g monitor-silence 0 +# enable activity monitoring +setw -g monitor-activity on +# activity style +set -g window-status-activity-style bg=black,fg=red +# disable silence monitoring +setw -g monitor-silence 0 #set-window-option -g window-status-current-style bg=black,fg=green #set-window-option -g window-status-style bg=black,fg=gray From 329b1313c8aa1ef6197303ea846359fb5607ae9c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 13:53:35 +0100 Subject: [PATCH 078/253] split/h,v --- sh/tmux.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index cb7321b..fbccfa4 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -65,7 +65,9 @@ bind -n M-Right next-window #bind -n S-Right select-pane -R #bind -n S-Up select-pane -U -#bind-key h split-window -h -#bind-key v split-window -v +# horizontal split with H +bind-key h split-window -h +# vertical split with V +bind-key v split-window -v " } From ecc96e8dad42512e9969f2f709ac70c5cdcb70ba Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 14:19:50 +0100 Subject: [PATCH 079/253] tmux/windows --- sh/tmux.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index fbccfa4..30dbbe5 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -45,8 +45,9 @@ set -g window-status-activity-style bg=black,fg=red # disable silence monitoring setw -g monitor-silence 0 -#set-window-option -g window-status-current-style bg=black,fg=green -#set-window-option -g window-status-style bg=black,fg=gray +# windows style +set-window-option -g window-status-current-style bg=black,fg=green +set-window-option -g window-status-style bg=black,fg=gray # bind key to detach client bind -n F6 detach-client From aadbbee3ede2754df485ecba3a031184b846a3e0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 14:25:25 +0100 Subject: [PATCH 080/253] tmux/panes --- sh/tmux.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 30dbbe5..f38a0e8 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -61,10 +61,11 @@ bind -n F2 new-window bind -n M-Left previous-window bind -n M-Right next-window -#bind -n S-Down select-pane -D -#bind -n S-Left select-pane -L -#bind -n S-Right select-pane -R -#bind -n S-Up select-pane -U +# select panes with Ctrl & Shift & ←↑↓→ +bind -n C-S-Down select-pane -D +bind -n C-S-Left select-pane -L +bind -n C-S-Right select-pane -R +bind -n C-S-Up select-pane -U # horizontal split with H bind-key h split-window -h From edb937d01514d877117e65a0eee5218d3b4f5b14 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 14:33:35 +0100 Subject: [PATCH 081/253] tmux/title --- sh/tmux.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index f38a0e8..8970591 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -14,8 +14,10 @@ set -g mouse on # renumber windows after closing one set -g renumber-windows on -#set -g set-titles on -#set -g set-titles-string '#(pwd)' +# enable title +set -g set-titles on +# set title to working directory +set -g set-titles-string '#(pwd)' # status bar set -g status-bg black From 129430fe644dabc6a7d17233649abac44831e914 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 14:44:23 +0100 Subject: [PATCH 082/253] tmux/empty --- sh/tmux.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8970591..3665fce 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -7,8 +7,9 @@ rwx_tmux_setup() { # reload configuration bind-key r source-file ~/.tmux.conf \\; display-message '↑ .tmux.conf' -#set -g automatic-rename on -#set -g automatic-rename-format '' +# empty name for windows +set -g automatic-rename on +set -g automatic-rename-format '' # enable mouse actions set -g mouse on # renumber windows after closing one From c651ad0c78fbb2b7f7fe33ad55e91f93682507d8 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 15:22:47 +0100 Subject: [PATCH 083/253] - --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 3665fce..cfacbc0 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -26,7 +26,7 @@ set -g status-fg gray set -g status-interval 1 set -g status-left '' set -g status-position top -set -g status-right '| #{session_name} | %Y/%m/%d %H:%M:%S' +set -g status-right '| #{session_name} | %Y-%m-%d %H:%M:%S' # windows separator set -g window-status-separator ' | ' From 51d3a00b6ae550ddd7c5b7a7757603739b37702f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 15:37:37 +0100 Subject: [PATCH 084/253] tmux/sessions --- sh/tmux.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index cfacbc0..eed4da3 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -7,6 +7,10 @@ rwx_tmux_setup() { # reload configuration bind-key r source-file ~/.tmux.conf \\; display-message '↑ .tmux.conf' +# select sessions with Alt & ↑ | ↓ +bind -n M-Down switch-client -p +bind -n M-Up switch-client -n + # empty name for windows set -g automatic-rename on set -g automatic-rename-format '' From 3f001d88866734f8dcc92d4b7d5e65fa4afbfd05 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 15:39:07 +0100 Subject: [PATCH 085/253] swap --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index eed4da3..bb80678 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -8,8 +8,8 @@ rwx_tmux_setup() { bind-key r source-file ~/.tmux.conf \\; display-message '↑ .tmux.conf' # select sessions with Alt & ↑ | ↓ -bind -n M-Down switch-client -p -bind -n M-Up switch-client -n +bind -n M-Down switch-client -n +bind -n M-Up switch-client -p # empty name for windows set -g automatic-rename on From ac4c473ecda6e551aa450876380a62cd5134e304 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 19:51:17 +0100 Subject: [PATCH 086/253] tmux/swap --- sh/tmux.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index bb80678..8eb7761 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -59,8 +59,9 @@ set-window-option -g window-status-style bg=black,fg=gray # bind key to detach client bind -n F6 detach-client -#bind-key -n C-S-Left swap-window -t -1 -#bind-key -n C-S-Right swap-window -t +1 +# swap window with next or previous +bind-key C-S-Left swap-window -t -1 +bind-key C-S-Right swap-window -t +1 # create new window with F2 bind -n F2 new-window From e83384d5110693f6733f367bf190106f1b7fd251 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 17 Jan 2025 19:55:07 +0100 Subject: [PATCH 087/253] swap/alt --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8eb7761..0dee536 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -60,8 +60,8 @@ set-window-option -g window-status-style bg=black,fg=gray bind -n F6 detach-client # swap window with next or previous -bind-key C-S-Left swap-window -t -1 -bind-key C-S-Right swap-window -t +1 +bind-key M-Left swap-window -t -1 +bind-key M-Right swap-window -t +1 # create new window with F2 bind -n F2 new-window From 48a9f2c45840d968260eebc43d18a5837981d62b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 00:15:17 +0100 Subject: [PATCH 088/253] tmux/display,mouse --- sh/tmux.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0dee536..bb88334 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -4,8 +4,12 @@ rwx_tmux_setup() { rwx_file_write "${HOME}/.tmux.conf" "\ +# display duration +set -g display-time 1536 # reload configuration -bind-key r source-file ~/.tmux.conf \\; display-message '↑ .tmux.conf' +bind r source-file ~/.tmux.conf \\; display '↑ .tmux.conf' +# toggle mouse +bind t set -g mouse \\; display 'Mouse: #{mouse}' # select sessions with Alt & ↑ | ↓ bind -n M-Down switch-client -n From 08aed79ee6bf199d97b1f82c954033e76405fb46 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 00:19:15 +0100 Subject: [PATCH 089/253] tmux/file --- sh/tmux.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index bb88334..896f4bc 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -3,11 +3,13 @@ # ╰──────┴───────╯ rwx_tmux_setup() { - rwx_file_write "${HOME}/.tmux.conf" "\ + local file + file="${HOME}/.tmux.conf" + rwx_file_write "${file}" "\ # display duration set -g display-time 1536 # reload configuration -bind r source-file ~/.tmux.conf \\; display '↑ .tmux.conf' +bind r source-file ${file} \\; display 'Source: ${file}' # toggle mouse bind t set -g mouse \\; display 'Mouse: #{mouse}' From 2eb9e5388fa483cb5cf3268f6bec8454a35611e0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 00:21:06 +0100 Subject: [PATCH 090/253] tmux/bind --- sh/tmux.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 896f4bc..a12cbae 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -66,8 +66,8 @@ set-window-option -g window-status-style bg=black,fg=gray bind -n F6 detach-client # swap window with next or previous -bind-key M-Left swap-window -t -1 -bind-key M-Right swap-window -t +1 +bind M-Left swap-window -t -1 +bind M-Right swap-window -t +1 # create new window with F2 bind -n F2 new-window @@ -82,8 +82,8 @@ bind -n C-S-Right select-pane -R bind -n C-S-Up select-pane -U # horizontal split with H -bind-key h split-window -h +bind h split-window -h # vertical split with V -bind-key v split-window -v +bind v split-window -v " } From fa9405e29fbac2c0cc27221916be9dbcc7a1d360 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 00:37:58 +0100 Subject: [PATCH 091/253] tmux/long --- sh/tmux.sh | 64 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index a12cbae..e822004 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -7,39 +7,39 @@ rwx_tmux_setup() { file="${HOME}/.tmux.conf" rwx_file_write "${file}" "\ # display duration -set -g display-time 1536 +set-option -g display-time 1536 # reload configuration -bind r source-file ${file} \\; display 'Source: ${file}' +bind-key r source-file ${file} \\; display-message 'Source: ${file}' # toggle mouse -bind t set -g mouse \\; display 'Mouse: #{mouse}' +bind-key t set-option -g mouse \\; display-message 'Mouse: #{mouse}' # select sessions with Alt & ↑ | ↓ -bind -n M-Down switch-client -n -bind -n M-Up switch-client -p +bind-key -n M-Down switch-client -n +bind-key -n M-Up switch-client -p # empty name for windows -set -g automatic-rename on -set -g automatic-rename-format '' +set-option -g automatic-rename on +set-option -g automatic-rename-format '' # enable mouse actions -set -g mouse on +set-option -g mouse on # renumber windows after closing one -set -g renumber-windows on +set-option -g renumber-windows on # enable title -set -g set-titles on +set-option -g set-titles on # set title to working directory -set -g set-titles-string '#(pwd)' +set-option -g set-titles-string '#(pwd)' # status bar -set -g status-bg black -set -g status-fg gray -set -g status-interval 1 -set -g status-left '' -set -g status-position top -set -g status-right '| #{session_name} | %Y-%m-%d %H:%M:%S' +set-option -g status-bg black +set-option -g status-fg gray +set-option -g status-interval 1 +set-option -g status-left '' +set-option -g status-position top +set-option -g status-right '| #{session_name} | %Y-%m-%d %H:%M:%S' # windows separator -set -g window-status-separator ' | ' +set-option -g window-status-separator ' | ' # style for messages set-option -g message-style bg=red,fg=white @@ -52,38 +52,38 @@ set-option -g prefix C-b set-option -g prefix2 F12 # enable activity monitoring -setw -g monitor-activity on +set-window-option -g monitor-activity on # activity style set -g window-status-activity-style bg=black,fg=red # disable silence monitoring -setw -g monitor-silence 0 +set-window-option -g monitor-silence 0 # windows style set-window-option -g window-status-current-style bg=black,fg=green set-window-option -g window-status-style bg=black,fg=gray # bind key to detach client -bind -n F6 detach-client +bind-key -n F6 detach-client # swap window with next or previous -bind M-Left swap-window -t -1 -bind M-Right swap-window -t +1 +bind-key M-Left swap-window -t -1 +bind-key M-Right swap-window -t +1 # create new window with F2 -bind -n F2 new-window +bind-key -n F2 new-window # previous or next window with Alt & ← | → -bind -n M-Left previous-window -bind -n M-Right next-window +bind-key -n M-Left previous-window +bind-key -n M-Right next-window # select panes with Ctrl & Shift & ←↑↓→ -bind -n C-S-Down select-pane -D -bind -n C-S-Left select-pane -L -bind -n C-S-Right select-pane -R -bind -n C-S-Up select-pane -U +bind-key -n C-S-Down select-pane -D +bind-key -n C-S-Left select-pane -L +bind-key -n C-S-Right select-pane -R +bind-key -n C-S-Up select-pane -U # horizontal split with H -bind h split-window -h +bind-key h split-window -h # vertical split with V -bind v split-window -v +bind-key v split-window -v " } From 5f5e2b8a5b48b8b8a279bf7209931f338235d687 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 00:42:26 +0100 Subject: [PATCH 092/253] tmux/history --- sh/tmux.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index e822004..5d14b75 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -20,6 +20,8 @@ bind-key -n M-Up switch-client -p # empty name for windows set-option -g automatic-rename on set-option -g automatic-rename-format '' +# extend history limit +set-option -g history-limit 1048576 # enable mouse actions set-option -g mouse on # renumber windows after closing one From 335ae41004d5c93283a8cff26640a4b61d8579e8 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 14:39:03 +0100 Subject: [PATCH 093/253] tmux/index --- sh/tmux.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 5d14b75..1f21ae4 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -6,6 +6,8 @@ rwx_tmux_setup() { local file file="${HOME}/.tmux.conf" rwx_file_write "${file}" "\ +# first index number +set-option -g base-index 1 # display duration set-option -g display-time 1536 # reload configuration From 72ee0ad3d53759978a665a36e6192e0975019cb2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 15:23:38 +0100 Subject: [PATCH 094/253] tmux/justify --- sh/tmux.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 1f21ae4..0984dbb 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -38,9 +38,10 @@ set-option -g set-titles-string '#(pwd)' set-option -g status-bg black set-option -g status-fg gray set-option -g status-interval 1 -set-option -g status-left '' +set-option -g status-justify center +set-option -g status-left '#{session_name} ' set-option -g status-position top -set-option -g status-right '| #{session_name} | %Y-%m-%d %H:%M:%S' +set-option -g status-right ' %Y-%m-%d %H:%M:%S' # windows separator set-option -g window-status-separator ' | ' From 1b2cf00547298a8c3584b4dfed7d356c1278cb8a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 15:39:19 +0100 Subject: [PATCH 095/253] tmux/status --- sh/tmux.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0984dbb..2fb0d68 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -38,13 +38,13 @@ set-option -g set-titles-string '#(pwd)' set-option -g status-bg black set-option -g status-fg gray set-option -g status-interval 1 -set-option -g status-justify center -set-option -g status-left '#{session_name} ' +set-option -g status-justify left +set-option -g status-left '#{session_name} ' set-option -g status-position top -set-option -g status-right ' %Y-%m-%d %H:%M:%S' +set-option -g status-right ' %Y-%m-%d %H:%M:%S' # windows separator -set-option -g window-status-separator ' | ' +set-option -g window-status-separator ' ' # style for messages set-option -g message-style bg=red,fg=white From 8e13ac778fbf44a09336886a1b964127c5643f3e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 15:41:26 +0100 Subject: [PATCH 096/253] tmux/space --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 2fb0d68..90dfbc0 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -39,9 +39,9 @@ set-option -g status-bg black set-option -g status-fg gray set-option -g status-interval 1 set-option -g status-justify left -set-option -g status-left '#{session_name} ' +set-option -g status-left '#{session_name} ' set-option -g status-position top -set-option -g status-right ' %Y-%m-%d %H:%M:%S' +set-option -g status-right ' %Y-%m-%d %H:%M:%S' # windows separator set-option -g window-status-separator ' ' From 5f10f8617c2cfab141764fcb6fcd5285d2b0f4be Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 15:49:40 +0100 Subject: [PATCH 097/253] tmux/command --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 90dfbc0..61d2051 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -21,7 +21,7 @@ bind-key -n M-Up switch-client -p # empty name for windows set-option -g automatic-rename on -set-option -g automatic-rename-format '' +set-option -g automatic-rename-format '#{pane_current_command}' # extend history limit set-option -g history-limit 1048576 # enable mouse actions From 1094c40bc70a0c62534dce3dfde11ac025392764 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 16:01:37 +0100 Subject: [PATCH 098/253] tmux/colors --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 61d2051..7297f71 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -39,9 +39,9 @@ set-option -g status-bg black set-option -g status-fg gray set-option -g status-interval 1 set-option -g status-justify left -set-option -g status-left '#{session_name} ' +set-option -g status-left '#[fg=red]#{session_name} ' set-option -g status-position top -set-option -g status-right ' %Y-%m-%d %H:%M:%S' +set-option -g status-right ' #[fg=yellow]%Y-%m-%d %H:%M:%S' # windows separator set-option -g window-status-separator ' ' From 4008eea49646daa0eb52b7010492349299f01f75 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 16:05:52 +0100 Subject: [PATCH 099/253] tmux/path --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 7297f71..76a8d3a 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -32,14 +32,14 @@ set-option -g renumber-windows on # enable title set-option -g set-titles on # set title to working directory -set-option -g set-titles-string '#(pwd)' +set-option -g set-titles-string '#{pane_current_path}' # status bar set-option -g status-bg black set-option -g status-fg gray set-option -g status-interval 1 set-option -g status-justify left -set-option -g status-left '#[fg=red]#{session_name} ' +set-option -g status-left '#[fg=yellow]#{session_name} ' set-option -g status-position top set-option -g status-right ' #[fg=yellow]%Y-%m-%d %H:%M:%S' From c09919ed485b67baf47b86926f313556aa85ca93 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 16:49:05 +0100 Subject: [PATCH 100/253] tmux/command --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 76a8d3a..697a34c 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -32,7 +32,7 @@ set-option -g renumber-windows on # enable title set-option -g set-titles on # set title to working directory -set-option -g set-titles-string '#{pane_current_path}' +set-option -g set-titles-string '#{pane_current_command} @ #{pane_current_path}' # status bar set-option -g status-bg black From 0b67159bcabf220069753fdad86679e8ddadef53 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 17:00:59 +0100 Subject: [PATCH 101/253] tmux/lines --- sh/tmux.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 697a34c..21b84fc 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -28,6 +28,8 @@ set-option -g history-limit 1048576 set-option -g mouse on # renumber windows after closing one set-option -g renumber-windows on +# status lines +set-option -g status 2 # enable title set-option -g set-titles on From e93eea89069770019f24a632a696394c25085b0c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 17:04:45 +0100 Subject: [PATCH 102/253] tmux/panes --- sh/tmux.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 21b84fc..701715e 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -8,6 +8,7 @@ rwx_tmux_setup() { rwx_file_write "${file}" "\ # first index number set-option -g base-index 1 +set-option -g pane-base-index 1 # display duration set-option -g display-time 1536 # reload configuration From ccbb794b7bb759e858b7c3efc6c42d26ea10d65b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 17:33:45 +0100 Subject: [PATCH 103/253] tmux/windows --- sh/tmux.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 701715e..4a5888f 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -46,6 +46,9 @@ set-option -g status-left '#[fg=yellow]#{session_name} ' set-option -g status-position top set-option -g status-right ' #[fg=yellow]%Y-%m-%d %H:%M:%S' +set-option -g window-status-current-format '#{windows_index} #{window_name}' +set-option -g window-status-format '#{windows_index} #{window_name}' + # windows separator set-option -g window-status-separator ' ' From ad891b18199ecf5a3aeb5cbe6e9fc110bcb6862c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 17:35:14 +0100 Subject: [PATCH 104/253] tmux/3 --- sh/tmux.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 4a5888f..2d1800d 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -30,7 +30,7 @@ set-option -g mouse on # renumber windows after closing one set-option -g renumber-windows on # status lines -set-option -g status 2 +set-option -g status 3 # enable title set-option -g set-titles on @@ -40,6 +40,7 @@ set-option -g set-titles-string '#{pane_current_command} @ #{pane_current_path}' # status bar set-option -g status-bg black set-option -g status-fg gray +set-option -g status-format[2] '#{pane_current_path}' set-option -g status-interval 1 set-option -g status-justify left set-option -g status-left '#[fg=yellow]#{session_name} ' From 75ccb1ed3c40d46f2ffae89df1399d2284f1569c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 17:36:14 +0100 Subject: [PATCH 105/253] tmux/fix --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 2d1800d..bc74cd2 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -47,8 +47,8 @@ set-option -g status-left '#[fg=yellow]#{session_name} ' set-option -g status-position top set-option -g status-right ' #[fg=yellow]%Y-%m-%d %H:%M:%S' -set-option -g window-status-current-format '#{windows_index} #{window_name}' -set-option -g window-status-format '#{windows_index} #{window_name}' +set-option -g window-status-current-format '#{window_index} #{window_name}' +set-option -g window-status-format '#{window_index} #{window_name}' # windows separator set-option -g window-status-separator ' ' From b303ae8a3f0108e4b2076241526ebb1f0dcc1753 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 19:53:26 +0100 Subject: [PATCH 106/253] tmux/formats --- sh/tmux.sh | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index bc74cd2..0317acb 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -35,23 +35,15 @@ set-option -g status 3 # enable title set-option -g set-titles on # set title to working directory -set-option -g set-titles-string '#{pane_current_command} @ #{pane_current_path}' +#set-option -g set-titles-string '' # status bar set-option -g status-bg black set-option -g status-fg gray -set-option -g status-format[2] '#{pane_current_path}' +set-option -g status-format[1] '#[fg=yellow]#{session_name}#{W: #{?window_active,#[fg=green],#[fg=default]}#{window_index}#{?window_flags,#{window_flags}, } #{window_name}}#[align=right] #[fg=blue]#{pane_width}×#{pane_height}#{P: #{?pane_active,#[fg=green],#[fg=default]}#{pane_index}}' +set-option -g status-format[2] '#[fg=cyan]#{pane_current_path}#[align=right] #[fg=yellow]%Y-%m-%d %H:%M:%S' set-option -g status-interval 1 -set-option -g status-justify left -set-option -g status-left '#[fg=yellow]#{session_name} ' set-option -g status-position top -set-option -g status-right ' #[fg=yellow]%Y-%m-%d %H:%M:%S' - -set-option -g window-status-current-format '#{window_index} #{window_name}' -set-option -g window-status-format '#{window_index} #{window_name}' - -# windows separator -set-option -g window-status-separator ' ' # style for messages set-option -g message-style bg=red,fg=white @@ -70,10 +62,6 @@ set -g window-status-activity-style bg=black,fg=red # disable silence monitoring set-window-option -g monitor-silence 0 -# windows style -set-window-option -g window-status-current-style bg=black,fg=green -set-window-option -g window-status-style bg=black,fg=gray - # bind key to detach client bind-key -n F6 detach-client From 0c64af1eaba43b126e7a3e79bca6066b55a59c72 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 20:11:16 +0100 Subject: [PATCH 107/253] tmux/2 --- sh/tmux.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0317acb..0dce103 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -40,8 +40,14 @@ set-option -g set-titles on # status bar set-option -g status-bg black set-option -g status-fg gray -set-option -g status-format[1] '#[fg=yellow]#{session_name}#{W: #{?window_active,#[fg=green],#[fg=default]}#{window_index}#{?window_flags,#{window_flags}, } #{window_name}}#[align=right] #[fg=blue]#{pane_width}×#{pane_height}#{P: #{?pane_active,#[fg=green],#[fg=default]}#{pane_index}}' -set-option -g status-format[2] '#[fg=cyan]#{pane_current_path}#[align=right] #[fg=yellow]%Y-%m-%d %H:%M:%S' +set-option -g status-format[1] '\ +#[fg=yellow]#{session_name}#{W: #{?window_active,#[fg=green],#[fg=default]}#{window_index}#{?window_flags,#{window_flags}, } #{window_name}}#[align=right] #[fg=blue]#{pane_width}×#{pane_height}#{P: #{?pane_active,#[fg=green],#[fg=default]}#{pane_index}}\ +' +set-option -g status-format[2] '\ +#[fg=cyan]#{pane_current_path}\ +#[align=right]\ + #[fg=yellow]%Y-%m-%d %H:%M:%S\ +' set-option -g status-interval 1 set-option -g status-position top From f0f0bb5bc916931ef698be4414f8e0e5fe3566c1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 20:15:55 +0100 Subject: [PATCH 108/253] tmux/1 --- sh/tmux.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0dce103..c1bd3b1 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -41,12 +41,24 @@ set-option -g set-titles on set-option -g status-bg black set-option -g status-fg gray set-option -g status-format[1] '\ -#[fg=yellow]#{session_name}#{W: #{?window_active,#[fg=green],#[fg=default]}#{window_index}#{?window_flags,#{window_flags}, } #{window_name}}#[align=right] #[fg=blue]#{pane_width}×#{pane_height}#{P: #{?pane_active,#[fg=green],#[fg=default]}#{pane_index}}\ +#[fg=yellow]#{session_name}\ +#{W: \ +#{?window_active,#[fg=green],#[fg=default]}\ +#{window_index}\ +#{?window_flags,#{window_flags}, } \ +#{window_name}\ +}\ +#[align=right] \ +#[fg=blue]#{pane_width}×#{pane_height}\ +#{P: \ +#{?pane_active,#[fg=green],#[fg=default]}\ +#{pane_index}\ +}\ ' set-option -g status-format[2] '\ #[fg=cyan]#{pane_current_path}\ -#[align=right]\ - #[fg=yellow]%Y-%m-%d %H:%M:%S\ +#[align=right] \ +#[fg=yellow]%Y-%m-%d %H:%M:%S\ ' set-option -g status-interval 1 set-option -g status-position top From 59322ac4493eeae1205d69b13b2f018d43fc60be Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 20:20:21 +0100 Subject: [PATCH 109/253] tmux/activity --- sh/tmux.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index c1bd3b1..fb1068c 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -43,7 +43,8 @@ set-option -g status-fg gray set-option -g status-format[1] '\ #[fg=yellow]#{session_name}\ #{W: \ -#{?window_active,#[fg=green],#[fg=default]}\ +#{?window_active,#[fg=green],\ +#{?window_activity_flag,#[fg=red],#[fg=default]}}\ #{window_index}\ #{?window_flags,#{window_flags}, } \ #{window_name}\ From 874b11884ff50730fb7b7ac8e2ef0bd945f31509 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 20:22:29 +0100 Subject: [PATCH 110/253] tmux/flags --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index fb1068c..502ed63 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -45,9 +45,9 @@ set-option -g status-format[1] '\ #{W: \ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ -#{window_index}\ -#{?window_flags,#{window_flags}, } \ +#{window_index} \ #{window_name}\ +#{?window_flags,#{window_flags},}\ }\ #[align=right] \ #[fg=blue]#{pane_width}×#{pane_height}\ From 717ec7b41dd5199e58266edb3d137cf9b2ec24a0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 20:23:31 +0100 Subject: [PATCH 111/253] tmux/fix --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 502ed63..1cee763 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -47,7 +47,7 @@ set-option -g status-format[1] '\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ #{window_index} \ #{window_name}\ -#{?window_flags,#{window_flags},}\ +#{?window_flags, #{window_flags},}\ }\ #[align=right] \ #[fg=blue]#{pane_width}×#{pane_height}\ From ea18907da110e9308caec8c6ec09c48390514cc3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 21:04:26 +0100 Subject: [PATCH 112/253] tmux/title --- sh/tmux.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 1cee763..6c7a1e3 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -35,7 +35,12 @@ set-option -g status 3 # enable title set-option -g set-titles on # set title to working directory -#set-option -g set-titles-string '' +set-option -g set-titles-string '\ +tmux / \ +#{session_name} / \ +#{window_index} #{window_name} / \ +#{pane_index} #{pane_width}×#{pane_height}\ +' # status bar set-option -g status-bg black From ba74eaf3337886808be9811b15ed2be2f27c5ca1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 21:10:57 +0100 Subject: [PATCH 113/253] tmux/path --- sh/tmux.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 6c7a1e3..570f41e 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -45,7 +45,7 @@ tmux / \ # status bar set-option -g status-bg black set-option -g status-fg gray -set-option -g status-format[1] '\ +set-option -g status-format[0] '\ #[fg=yellow]#{session_name}\ #{W: \ #{?window_active,#[fg=green],\ @@ -61,11 +61,13 @@ set-option -g status-format[1] '\ #{pane_index}\ }\ ' -set-option -g status-format[2] '\ -#[fg=cyan]#{pane_current_path}\ +set-option -g status-format[1] '\ #[align=right] \ #[fg=yellow]%Y-%m-%d %H:%M:%S\ ' +set-option -g status-format[2] '\ +#[fg=cyan]#{pane_current_path}\ +' set-option -g status-interval 1 set-option -g status-position top From 73e94d28acd998a307c5b955fe7709adf31dca4d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 21:18:16 +0100 Subject: [PATCH 114/253] tmux/date --- sh/tmux.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 570f41e..89c7d5c 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -55,15 +55,16 @@ set-option -g status-format[0] '\ #{?window_flags, #{window_flags},}\ }\ #[align=right] \ +#[fg=yellow]%Y-%m-%d\ +' +set-option -g status-format[1] '\ #[fg=blue]#{pane_width}×#{pane_height}\ #{P: \ #{?pane_active,#[fg=green],#[fg=default]}\ #{pane_index}\ }\ -' -set-option -g status-format[1] '\ #[align=right] \ -#[fg=yellow]%Y-%m-%d %H:%M:%S\ +#[fg=yellow]%H:%M:%S\ ' set-option -g status-format[2] '\ #[fg=cyan]#{pane_current_path}\ From 083b68ab2519601c7fe02f893e48d2bfd9020db2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 21:26:17 +0100 Subject: [PATCH 115/253] tmux/align --- sh/tmux.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 89c7d5c..43c0aa6 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -46,23 +46,27 @@ tmux / \ set-option -g status-bg black set-option -g status-fg gray set-option -g status-format[0] '\ -#[fg=yellow]#{session_name}\ -#{W: \ +#{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ #{window_index} \ #{window_name}\ #{?window_flags, #{window_flags},}\ + \ }\ +#[align=center]\ +#[fg=yellow]#{session_name}\ #[align=right] \ #[fg=yellow]%Y-%m-%d\ ' set-option -g status-format[1] '\ -#[fg=blue]#{pane_width}×#{pane_height}\ -#{P: \ +#{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ #{pane_index}\ + \ }\ +#[align=center]\ +#[fg=blue]#{pane_width}×#{pane_height}\ #[align=right] \ #[fg=yellow]%H:%M:%S\ ' From 3a036fd7542cb179474c1d502d17cacc8ab3d963 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 21:51:27 +0100 Subject: [PATCH 116/253] tmux/blue --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 43c0aa6..9c7f042 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -55,7 +55,7 @@ set-option -g status-format[0] '\ \ }\ #[align=center]\ -#[fg=yellow]#{session_name}\ +#[fg=blue]#{session_name}\ #[align=right] \ #[fg=yellow]%Y-%m-%d\ ' From aec17709947dcc61c3ee57ca4decaa17286702f3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 21:52:29 +0100 Subject: [PATCH 117/253] tmux/centre --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 9c7f042..9f026de 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -54,7 +54,7 @@ set-option -g status-format[0] '\ #{?window_flags, #{window_flags},}\ \ }\ -#[align=center]\ +#[align=centre]\ #[fg=blue]#{session_name}\ #[align=right] \ #[fg=yellow]%Y-%m-%d\ @@ -65,7 +65,7 @@ set-option -g status-format[1] '\ #{pane_index}\ \ }\ -#[align=center]\ +#[align=centre]\ #[fg=blue]#{pane_width}×#{pane_height}\ #[align=right] \ #[fg=yellow]%H:%M:%S\ From 6adea4a46da679d2ccc5e0cb2ab361bae5edff00 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 22:00:11 +0100 Subject: [PATCH 118/253] =?UTF-8?q?tmux/=E2=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 9f026de..25deab9 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -88,8 +88,6 @@ set-option -g prefix2 F12 # enable activity monitoring set-window-option -g monitor-activity on -# activity style -set -g window-status-activity-style bg=black,fg=red # disable silence monitoring set-window-option -g monitor-silence 0 From e9e12b6b64c9f15fd2b0eb2aa8711e1e17fc5545 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 22:27:50 +0100 Subject: [PATCH 119/253] tmux/wip --- sh/tmux.sh | 111 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 82 insertions(+), 29 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 25deab9..a95def1 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -6,34 +6,45 @@ rwx_tmux_setup() { local file file="${HOME}/.tmux.conf" rwx_file_write "${file}" "\ -# first index number -set-option -g base-index 1 -set-option -g pane-base-index 1 -# display duration -set-option -g display-time 1536 -# reload configuration -bind-key r source-file ${file} \\; display-message 'Source: ${file}' -# toggle mouse -bind-key t set-option -g mouse \\; display-message 'Mouse: #{mouse}' - -# select sessions with Alt & ↑ | ↓ -bind-key -n M-Down switch-client -n -bind-key -n M-Up switch-client -p +# ╭────────╮ +# │ option │ +# ╰────────╯ # empty name for windows -set-option -g automatic-rename on set-option -g automatic-rename-format '#{pane_current_command}' +set-option -g automatic-rename on + +# first index number +set-option -g base-index 1 + +# display duration +set-option -g display-time 1536 + # extend history limit set-option -g history-limit 1048576 + +# style for messages +set-option -g message-style bg=red,fg=white + +# activity monitoring +set-window-option -g monitor-activity on + +# silence monitoring +set-window-option -g monitor-silence 0 + # enable mouse actions set-option -g mouse on + +# prefix with ^B or F12 +set-option -g prefix C-b +set-option -g prefix2 F12 + # renumber windows after closing one set-option -g renumber-windows on -# status lines -set-option -g status 3 # enable title set-option -g set-titles on + # set title to working directory set-option -g set-titles-string '\ tmux / \ @@ -42,9 +53,37 @@ tmux / \ #{pane_index} #{pane_width}×#{pane_height}\ ' -# status bar +# status lines +set-option -g status 3 + +# ╭────────┬──────╮ +# │ option │ pane │ +# ╰────────┴──────╯ + +# first index number +set-option -g pane-base-index 1 + +# ╭────────┬──────┬────────╮ +# │ option │ pane │ border │ +# ╰────────┴──────┴────────╯ + +# active style +set-option -g pane-active-border-style bg=black,fg=green + +# regular style +set-option -g pane-border-style bg=black,fg=gray + +# ╭────────┬────────╮ +# │ option │ status │ +# ╰────────┴────────╯ + +# background color set-option -g status-bg black + +# foreground color set-option -g status-fg gray + +# first line set-option -g status-format[0] '\ #{W:\ #{?window_active,#[fg=green],\ @@ -59,6 +98,8 @@ set-option -g status-format[0] '\ #[align=right] \ #[fg=yellow]%Y-%m-%d\ ' + +# second line set-option -g status-format[1] '\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ @@ -70,26 +111,38 @@ set-option -g status-format[1] '\ #[align=right] \ #[fg=yellow]%H:%M:%S\ ' + +# third line set-option -g status-format[2] '\ #[fg=cyan]#{pane_current_path}\ ' + +# refresh period set-option -g status-interval 1 + +# bar location set-option -g status-position top -# style for messages -set-option -g message-style bg=red,fg=white -# style for pane borders -set-option -g pane-active-border-style bg=black,fg=green -set-option -g pane-border-style bg=black,fg=gray +# ╭─────╮ +# │ key │ +# ╰─────╯ -# prefix with ^B or F12 -set-option -g prefix C-b -set-option -g prefix2 F12 +# select sessions with Alt & ↑ | ↓ +bind-key -n M-Down switch-client -n +bind-key -n M-Up switch-client -p -# enable activity monitoring -set-window-option -g monitor-activity on -# disable silence monitoring -set-window-option -g monitor-silence 0 +# ╭─────┬────────╮ +# │ key │ prefix │ +# ╰─────┴────────╯ + +# reload configuration +bind-key r source-file ${file} \\; display-message 'source-file ${file}' + +# toggle mouse +bind-key t set-option -g mouse \\; display-message 'mouse = #{mouse}' + +# ╭─╮ +# ╰─╯ # bind key to detach client bind-key -n F6 detach-client From 6f396db4542e212f82804369fef5b5a9602113d1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 22:38:40 +0100 Subject: [PATCH 120/253] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index a95def1..4088bbf 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -127,45 +127,42 @@ set-option -g status-position top # │ key │ # ╰─────╯ -# select sessions with Alt & ↑ | ↓ +# detach client +bind-key -n F6 detach-client + +# new window +bind-key -n F2 new-window + +# select pane +bind-key -n C-S-Down select-pane -D +bind-key -n C-S-Left select-pane -L +bind-key -n C-S-Right select-pane -R +bind-key -n C-S-Up select-pane -U + +# switch session bind-key -n M-Down switch-client -n bind-key -n M-Up switch-client -p +# switch window +bind-key -n M-Left previous-window +bind-key -n M-Right next-window + # ╭─────┬────────╮ # │ key │ prefix │ # ╰─────┴────────╯ +# split window +bind-key h split-window -h +bind-key v split-window -v + # reload configuration bind-key r source-file ${file} \\; display-message 'source-file ${file}' # toggle mouse bind-key t set-option -g mouse \\; display-message 'mouse = #{mouse}' -# ╭─╮ -# ╰─╯ - -# bind key to detach client -bind-key -n F6 detach-client - -# swap window with next or previous +# swap window bind-key M-Left swap-window -t -1 bind-key M-Right swap-window -t +1 - -# create new window with F2 -bind-key -n F2 new-window -# previous or next window with Alt & ← | → -bind-key -n M-Left previous-window -bind-key -n M-Right next-window - -# select panes with Ctrl & Shift & ←↑↓→ -bind-key -n C-S-Down select-pane -D -bind-key -n C-S-Left select-pane -L -bind-key -n C-S-Right select-pane -R -bind-key -n C-S-Up select-pane -U - -# horizontal split with H -bind-key h split-window -h -# vertical split with V -bind-key v split-window -v " } From dfae2ba121bd87907fe936f832c9f3a99f5bf1c3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:03:43 +0100 Subject: [PATCH 121/253] tmux/title --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 4088bbf..cdba642 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -47,10 +47,10 @@ set-option -g set-titles on # set title to working directory set-option -g set-titles-string '\ -tmux / \ #{session_name} / \ #{window_index} #{window_name} / \ -#{pane_index} #{pane_width}×#{pane_height}\ +#{pane_index} #{pane_current_command}\ + (#{pane_width}×#{pane_height})\ ' # status lines From 7f6a29e8eb8be2d8a7cfc6606c0e37405ff2658b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:05:52 +0100 Subject: [PATCH 122/253] tmux/space --- sh/tmux.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index cdba642..fbce852 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -47,10 +47,12 @@ set-option -g set-titles on # set title to working directory set-option -g set-titles-string '\ -#{session_name} / \ -#{window_index} #{window_name} / \ +#{session_name}\ + / \ +#{window_index} #{window_name}\ + / \ #{pane_index} #{pane_current_command}\ - (#{pane_width}×#{pane_height})\ + (#{pane_width}×#{pane_height})\ ' # status lines From f7a02f2974c34206f9982b67f4b5f7fb6c5c1b6f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:10:25 +0100 Subject: [PATCH 123/253] =?UTF-8?q?tmux=E2=88=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index fbce852..eb7dbb7 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -49,9 +49,9 @@ set-option -g set-titles on set-option -g set-titles-string '\ #{session_name}\ / \ -#{window_index} #{window_name}\ +#{window_index}∕#{session_windows} #{window_name}\ / \ -#{pane_index} #{pane_current_command}\ +#{pane_index}∕#{window_panes} #{pane_current_command}\ (#{pane_width}×#{pane_height})\ ' From 709563005a02834c0b54f815734473dbeb07ae97 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:13:03 +0100 Subject: [PATCH 124/253] =?UTF-8?q?tmux/=E2=8B=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index eb7dbb7..fdc3429 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -48,11 +48,12 @@ set-option -g set-titles on # set title to working directory set-option -g set-titles-string '\ #{session_name}\ - / \ + ⋅ \ #{window_index}∕#{session_windows} #{window_name}\ - / \ + ⋅ \ #{pane_index}∕#{window_panes} #{pane_current_command}\ - (#{pane_width}×#{pane_height})\ + ⋅ \ +#{pane_width}×#{pane_height}\ ' # status lines From e24c782e83c69b10ca3c5385a3c0cc9fce70af86 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:13:48 +0100 Subject: [PATCH 125/253] tmux/- --- sh/tmux.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index fdc3429..6840a89 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -48,11 +48,11 @@ set-option -g set-titles on # set title to working directory set-option -g set-titles-string '\ #{session_name}\ - ⋅ \ + - \ #{window_index}∕#{session_windows} #{window_name}\ - ⋅ \ + - \ #{pane_index}∕#{window_panes} #{pane_current_command}\ - ⋅ \ + - \ #{pane_width}×#{pane_height}\ ' From 6c17ad800123487965ecf7323915eded2ddf0022 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:20:56 +0100 Subject: [PATCH 126/253] =?UTF-8?q?tmux/=C3=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 6840a89..900d0a4 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -48,11 +48,11 @@ set-option -g set-titles on # set title to working directory set-option -g set-titles-string '\ #{session_name}\ - - \ + - \ #{window_index}∕#{session_windows} #{window_name}\ - - \ + - \ #{pane_index}∕#{window_panes} #{pane_current_command}\ - - \ + - \ #{pane_width}×#{pane_height}\ ' @@ -107,10 +107,10 @@ set-option -g status-format[1] '\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ #{pane_index}\ + \ +#[fg=blue]#{pane_width}×#{pane_height}\ \ }\ -#[align=centre]\ -#[fg=blue]#{pane_width}×#{pane_height}\ #[align=right] \ #[fg=yellow]%H:%M:%S\ ' From 3eb82bd515d0bde4113a9722d02eb84b215f6ea7 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:23:56 +0100 Subject: [PATCH 127/253] tmux/window --- sh/tmux.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 900d0a4..97450e7 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -111,6 +111,8 @@ set-option -g status-format[1] '\ #[fg=blue]#{pane_width}×#{pane_height}\ \ }\ +#[align=centre] \ +#[fg=blue]#{window_width}×#{window_height}\ #[align=right] \ #[fg=yellow]%H:%M:%S\ ' From b4f6f80ae40f638bc66ad7ede7d5d421149916d1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:27:15 +0100 Subject: [PATCH 128/253] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 97450e7..57f9f1c 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -99,7 +99,7 @@ set-option -g status-format[0] '\ #[align=centre]\ #[fg=blue]#{session_name}\ #[align=right] \ -#[fg=yellow]%Y-%m-%d\ +#[fg=yellow]%H:%M:%S\ ' # second line @@ -114,7 +114,7 @@ set-option -g status-format[1] '\ #[align=centre] \ #[fg=blue]#{window_width}×#{window_height}\ #[align=right] \ -#[fg=yellow]%H:%M:%S\ +#[fg=yellow]%Y-%m-%d\ ' # third line From c8507eb5203a1d590be3d7e61ddcd6e78c42b1f4 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:30:41 +0100 Subject: [PATCH 129/253] =?UTF-8?q?tmux/=E2=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 57f9f1c..0468c6a 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -52,8 +52,6 @@ set-option -g set-titles-string '\ #{window_index}∕#{session_windows} #{window_name}\ - \ #{pane_index}∕#{window_panes} #{pane_current_command}\ - - \ -#{pane_width}×#{pane_height}\ ' # status lines From f0de127e467895cac50ec184406b4ce6b79a7a8b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:39:55 +0100 Subject: [PATCH 130/253] tmux/lines --- sh/tmux.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0468c6a..79ee315 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -84,8 +84,13 @@ set-option -g status-bg black # foreground color set-option -g status-fg gray -# first line +# line 1 set-option -g status-format[0] '\ +#[fg=cyan]#{pane_current_path}\ +' + +# line 2 +set-option -g status-format[1] '\ #{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ @@ -95,13 +100,13 @@ set-option -g status-format[0] '\ \ }\ #[align=centre]\ -#[fg=blue]#{session_name}\ +#[fg=default]#{session_name}\ #[align=right] \ #[fg=yellow]%H:%M:%S\ ' -# second line -set-option -g status-format[1] '\ +# line 3 +set-option -g status-format[2] '\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ #{pane_index}\ @@ -115,11 +120,6 @@ set-option -g status-format[1] '\ #[fg=yellow]%Y-%m-%d\ ' -# third line -set-option -g status-format[2] '\ -#[fg=cyan]#{pane_current_path}\ -' - # refresh period set-option -g status-interval 1 From 09f4ffe21bbb20f1536b943908ed1be703726403 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 18 Jan 2025 23:59:56 +0100 Subject: [PATCH 131/253] tmux/4 --- sh/tmux.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 79ee315..2d0b951 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -54,9 +54,6 @@ set-option -g set-titles-string '\ #{pane_index}∕#{window_panes} #{pane_current_command}\ ' -# status lines -set-option -g status 3 - # ╭────────┬──────╮ # │ option │ pane │ # ╰────────┴──────╯ @@ -78,6 +75,9 @@ set-option -g pane-border-style bg=black,fg=gray # │ option │ status │ # ╰────────┴────────╯ +# status lines +set-option -g status 4 + # background color set-option -g status-bg black @@ -87,6 +87,8 @@ set-option -g status-fg gray # line 1 set-option -g status-format[0] '\ #[fg=cyan]#{pane_current_path}\ +#[align=right] \ +#[fg=default]#{session_name}\ ' # line 2 @@ -99,8 +101,6 @@ set-option -g status-format[1] '\ #{?window_flags, #{window_flags},}\ \ }\ -#[align=centre]\ -#[fg=default]#{session_name}\ #[align=right] \ #[fg=yellow]%H:%M:%S\ ' @@ -109,15 +109,26 @@ set-option -g status-format[1] '\ set-option -g status-format[2] '\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ +#{pane_index}\ + \ +#{pane_current_command}\ + \ +}\ +#[align=right] \ +#[fg=yellow]%Y-%m-%d\ +' + +# line 4 +set-option -g status-format[3] '\ +#{P:\ +#{?pane_active,#[fg=green],#[fg=default]}\ #{pane_index}\ \ #[fg=blue]#{pane_width}×#{pane_height}\ \ }\ -#[align=centre] \ -#[fg=blue]#{window_width}×#{window_height}\ #[align=right] \ -#[fg=yellow]%Y-%m-%d\ +#[fg=blue]#{window_width}×#{window_height}\ ' # refresh period From f4bafb9a9c62d7a5307858f84ddc858cb62014cc Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 00:23:07 +0100 Subject: [PATCH 132/253] tmux/bottom --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 2d0b951..5579967 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -135,7 +135,7 @@ set-option -g status-format[3] '\ set-option -g status-interval 1 # bar location -set-option -g status-position top +set-option -g status-position bottom # ╭─────╮ # │ key │ From 8d6d3356a55132ddaa3da953d9174fba5a7eab27 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 00:24:49 +0100 Subject: [PATCH 133/253] tmux/green --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 5579967..6f4f37f 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -88,7 +88,7 @@ set-option -g status-fg gray set-option -g status-format[0] '\ #[fg=cyan]#{pane_current_path}\ #[align=right] \ -#[fg=default]#{session_name}\ +#[fg=green]#{session_name}\ ' # line 2 From a93940fa31d9520083d3fc7302795658528223ca Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 00:50:00 +0100 Subject: [PATCH 134/253] tmux/3,4 --- sh/tmux.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 6f4f37f..200bd99 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -76,7 +76,7 @@ set-option -g pane-border-style bg=black,fg=gray # ╰────────┴────────╯ # status lines -set-option -g status 4 +set-option -g status 3 # background color set-option -g status-bg black @@ -153,6 +153,10 @@ bind-key -n C-S-Left select-pane -L bind-key -n C-S-Right select-pane -R bind-key -n C-S-Up select-pane -U +# status lines +bind-key -n C-Down set-option -g status 3 +bind-key -n C-Up set-option -g status 4 + # switch session bind-key -n M-Down switch-client -n bind-key -n M-Up switch-client -p From cca3019283d319b89423b9d2d486e8ec9ae7f62d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 01:07:34 +0100 Subject: [PATCH 135/253] tmux/lines --- sh/tmux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 200bd99..c82de0c 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -154,7 +154,9 @@ bind-key -n C-S-Right select-pane -R bind-key -n C-S-Up select-pane -U # status lines -bind-key -n C-Down set-option -g status 3 +bind-key -n C-Left set-option -g status on +bind-key -n C-Down set-option -g status 2 +bind-key -n C-Right set-option -g status 3 bind-key -n C-Up set-option -g status 4 # switch session From b85142783b3bc3b60572b9c96b5d0bae3d1393bb Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 01:16:16 +0100 Subject: [PATCH 136/253] tmux/lineshift --- sh/tmux.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index c82de0c..8a5f525 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -154,10 +154,10 @@ bind-key -n C-S-Right select-pane -R bind-key -n C-S-Up select-pane -U # status lines -bind-key -n C-Left set-option -g status on -bind-key -n C-Down set-option -g status 2 -bind-key -n C-Right set-option -g status 3 -bind-key -n C-Up set-option -g status 4 +bind-key -n M-S-Left set-option -g status on +bind-key -n M-S-Down set-option -g status 2 +bind-key -n M-S-Right set-option -g status 3 +bind-key -n M-S-Up set-option -g status 4 # switch session bind-key -n M-Down switch-client -n From afdb8184b7172b81a338da12b58e8734646d7dbb Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 02:21:05 +0100 Subject: [PATCH 137/253] tmux/f --- sh/tmux.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8a5f525..128783d 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -154,10 +154,10 @@ bind-key -n C-S-Right select-pane -R bind-key -n C-S-Up select-pane -U # status lines -bind-key -n M-S-Left set-option -g status on -bind-key -n M-S-Down set-option -g status 2 -bind-key -n M-S-Right set-option -g status 3 -bind-key -n M-S-Up set-option -g status 4 +bind-key -n C-F1 set-option -g status on +bind-key -n C-F2 set-option -g status 2 +bind-key -n C-F3 set-option -g status 3 +bind-key -n C-F4 set-option -g status 4 # switch session bind-key -n M-Down switch-client -n From a3289780bd51c7e62f9e7f5ffa0c1310fb6108db Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 03:15:13 +0100 Subject: [PATCH 138/253] tmux/bg --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 128783d..c8dd065 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -66,10 +66,10 @@ set-option -g pane-base-index 1 # ╰────────┴──────┴────────╯ # active style -set-option -g pane-active-border-style bg=black,fg=green +set-option -g pane-active-border-style fg=green # regular style -set-option -g pane-border-style bg=black,fg=gray +set-option -g pane-border-style fg=gray # ╭────────┬────────╮ # │ option │ status │ From e94efa4f3b732c84265c1a04e4841469668ba8cb Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 13:32:45 +0100 Subject: [PATCH 139/253] tmux/5 --- sh/tmux.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index c8dd065..84435fd 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -131,6 +131,10 @@ set-option -g status-format[3] '\ #[fg=blue]#{window_width}×#{window_height}\ ' +# line 5 +set-option -g status-format[4] '\ +' + # refresh period set-option -g status-interval 1 @@ -158,6 +162,7 @@ bind-key -n C-F1 set-option -g status on bind-key -n C-F2 set-option -g status 2 bind-key -n C-F3 set-option -g status 3 bind-key -n C-F4 set-option -g status 4 +bind-key -n C-F5 set-option -g status 5 # switch session bind-key -n M-Down switch-client -n From e7cd60b298d6a7013cd19d65b4377a2a6ce5fc1e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 13:33:56 +0100 Subject: [PATCH 140/253] tmux/0 --- sh/tmux.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 84435fd..0ed02c7 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -158,6 +158,7 @@ bind-key -n C-S-Right select-pane -R bind-key -n C-S-Up select-pane -U # status lines +bind-key -n C-F10 set-option -g status off bind-key -n C-F1 set-option -g status on bind-key -n C-F2 set-option -g status 2 bind-key -n C-F3 set-option -g status 3 From 7555ee6ad625b171770b326cb6c9515c7a048d4b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 13:46:29 +0100 Subject: [PATCH 141/253] tmux/command --- sh/tmux.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0ed02c7..75b1587 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -88,7 +88,8 @@ set-option -g status-fg gray set-option -g status-format[0] '\ #[fg=cyan]#{pane_current_path}\ #[align=right] \ -#[fg=green]#{session_name}\ +#[fg=default]#{pane_current_command} \ +#[fg=yellow]%H:%M:%S\ ' # line 2 @@ -102,7 +103,7 @@ set-option -g status-format[1] '\ \ }\ #[align=right] \ -#[fg=yellow]%H:%M:%S\ +#[fg=green]#{session_name}\ ' # line 3 From 4b18b0fb9b8463b703da1b09e1e66c154bbdbded Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 14:46:46 +0100 Subject: [PATCH 142/253] tmux/panes --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 75b1587..ed9ab0a 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -97,7 +97,7 @@ set-option -g status-format[1] '\ #{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ -#{window_index} \ +#{window_index}:#{window_panes} \ #{window_name}\ #{?window_flags, #{window_flags},}\ \ From 3de606106903877393b955d834f080212d353bcd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 15:12:47 +0100 Subject: [PATCH 143/253] tmux/flags --- sh/tmux.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index ed9ab0a..3fed16a 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -97,9 +97,8 @@ set-option -g status-format[1] '\ #{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ -#{window_index}:#{window_panes} \ +#{window_index}-#{window_panes} \ #{window_name}\ -#{?window_flags, #{window_flags},}\ \ }\ #[align=right] \ From a98d5d07ef77aee07ea98cbc787391d553070047 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 15:20:07 +0100 Subject: [PATCH 144/253] tmux/sessions --- sh/tmux.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 3fed16a..e675b8d 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -102,7 +102,8 @@ set-option -g status-format[1] '\ \ }\ #[align=right] \ -#[fg=green]#{session_name}\ +#[fg=green]#{session_name} \ +#[fg=default]#(tmux list-sessions | wc --lines)\ ' # line 3 From d0ffe4dc475d37f22394c927f900f758e5afa2d4 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 16:52:02 +0100 Subject: [PATCH 145/253] tmux/host --- sh/tmux.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index e675b8d..931bb85 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -134,6 +134,8 @@ set-option -g status-format[3] '\ # line 5 set-option -g status-format[4] '\ +#[align=centre]\ +#{host}\ ' # refresh period From ace049b56ff0021cfdfd47457ad302264bdcd1db Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 16:55:58 +0100 Subject: [PATCH 146/253] tmux/frame --- sh/tmux.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 931bb85..4ae8b35 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -86,14 +86,17 @@ set-option -g status-fg gray # line 1 set-option -g status-format[0] '\ +╭\ #[fg=cyan]#{pane_current_path}\ #[align=right] \ #[fg=default]#{pane_current_command} \ #[fg=yellow]%H:%M:%S\ +╮\ ' # line 2 set-option -g status-format[1] '\ +│\ #{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ @@ -104,10 +107,12 @@ set-option -g status-format[1] '\ #[align=right] \ #[fg=green]#{session_name} \ #[fg=default]#(tmux list-sessions | wc --lines)\ +│\ ' # line 3 set-option -g status-format[2] '\ +│\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ #{pane_index}\ @@ -117,10 +122,12 @@ set-option -g status-format[2] '\ }\ #[align=right] \ #[fg=yellow]%Y-%m-%d\ +│\ ' # line 4 set-option -g status-format[3] '\ +│\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ #{pane_index}\ @@ -130,12 +137,16 @@ set-option -g status-format[3] '\ }\ #[align=right] \ #[fg=blue]#{window_width}×#{window_height}\ +│\ ' # line 5 set-option -g status-format[4] '\ +│\ #[align=centre]\ #{host}\ +#[align=right]\ +│\ ' # refresh period From 1dadea118c72e9bc9eae0534a0cfeaa92fa96bd6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 17:02:06 +0100 Subject: [PATCH 147/253] tmux/default --- sh/tmux.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 4ae8b35..d858b47 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -86,17 +86,17 @@ set-option -g status-fg gray # line 1 set-option -g status-format[0] '\ -╭\ +#[fg=default]╭\ #[fg=cyan]#{pane_current_path}\ #[align=right] \ #[fg=default]#{pane_current_command} \ #[fg=yellow]%H:%M:%S\ -╮\ +#[fg=default]╮\ ' # line 2 set-option -g status-format[1] '\ -│\ +#[fg=default]│\ #{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ @@ -107,12 +107,12 @@ set-option -g status-format[1] '\ #[align=right] \ #[fg=green]#{session_name} \ #[fg=default]#(tmux list-sessions | wc --lines)\ -│\ +#[fg=default]│\ ' # line 3 set-option -g status-format[2] '\ -│\ +#[fg=default]│\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ #{pane_index}\ @@ -122,12 +122,12 @@ set-option -g status-format[2] '\ }\ #[align=right] \ #[fg=yellow]%Y-%m-%d\ -│\ +#[fg=default]│\ ' # line 4 set-option -g status-format[3] '\ -│\ +#[fg=default]│\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ #{pane_index}\ @@ -137,16 +137,16 @@ set-option -g status-format[3] '\ }\ #[align=right] \ #[fg=blue]#{window_width}×#{window_height}\ -│\ +#[fg=default]│\ ' # line 5 set-option -g status-format[4] '\ -│\ +#[fg=default]│\ #[align=centre]\ #{host}\ #[align=right]\ -│\ +#[fg=default]│\ ' # refresh period From 94ab314119dd56b03acf147d1e90eeade25acf35 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 17:20:05 +0100 Subject: [PATCH 148/253] tmux/right --- sh/tmux.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index d858b47..787dbb6 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -86,12 +86,12 @@ set-option -g status-fg gray # line 1 set-option -g status-format[0] '\ -#[fg=default]╭\ +#[fg=default]╭╴\ #[fg=cyan]#{pane_current_path}\ #[align=right] \ #[fg=default]#{pane_current_command} \ #[fg=yellow]%H:%M:%S\ -#[fg=default]╮\ +#[fg=default]╶╮\ ' # line 2 @@ -104,10 +104,10 @@ set-option -g status-format[1] '\ #{window_name}\ \ }\ -#[align=right] \ -#[fg=green]#{session_name} \ -#[fg=default]#(tmux list-sessions | wc --lines)\ -#[fg=default]│\ +#[align=right]\ + #[fg=green]#{session_name}\ + #[fg=default]#(tmux list-sessions | wc --lines)\ + #[fg=default]│\ ' # line 3 @@ -120,9 +120,9 @@ set-option -g status-format[2] '\ #{pane_current_command}\ \ }\ -#[align=right] \ -#[fg=yellow]%Y-%m-%d\ -#[fg=default]│\ +#[align=right]\ + #[fg=yellow]%Y-%m-%d\ + #[fg=default]│\ ' # line 4 @@ -135,9 +135,9 @@ set-option -g status-format[3] '\ #[fg=blue]#{pane_width}×#{pane_height}\ \ }\ -#[align=right] \ -#[fg=blue]#{window_width}×#{window_height}\ -#[fg=default]│\ +#[align=right]\ + #[fg=blue]#{window_width}×#{window_height}\ + #[fg=default]│\ ' # line 5 @@ -146,7 +146,7 @@ set-option -g status-format[4] '\ #[align=centre]\ #{host}\ #[align=right]\ -#[fg=default]│\ + #[fg=default]│\ ' # refresh period From 5772a22808c2a4bc6e4793d3abf35058c133054e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 17:39:54 +0100 Subject: [PATCH 149/253] tmux/right --- sh/tmux.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 787dbb6..3a62a48 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -88,9 +88,9 @@ set-option -g status-fg gray set-option -g status-format[0] '\ #[fg=default]╭╴\ #[fg=cyan]#{pane_current_path}\ -#[align=right] \ -#[fg=default]#{pane_current_command} \ -#[fg=yellow]%H:%M:%S\ +#[align=right]\ + #[fg=default]#{pane_current_command}\ + #[fg=yellow]%H:%M:%S\ #[fg=default]╶╮\ ' From 2057407cfc28061591c30245b924b4ca1ab13289 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 17:52:59 +0100 Subject: [PATCH 150/253] tmux/user --- sh/tmux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 3a62a48..381a983 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -144,7 +144,9 @@ set-option -g status-format[3] '\ set-option -g status-format[4] '\ #[fg=default]│\ #[align=centre]\ -#{host}\ +#[fg=default]#{user}\ + #[fg=blue]@\ + #[fg=yellow]#{host}\ #[align=right]\ #[fg=default]│\ ' From 3a50aafa49767c05545515e954f25e6ce9fc6370 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 18:01:19 +0100 Subject: [PATCH 151/253] tmux/space --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 381a983..b2cc4cd 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -87,7 +87,7 @@ set-option -g status-fg gray # line 1 set-option -g status-format[0] '\ #[fg=default]╭╴\ -#[fg=cyan]#{pane_current_path}\ +#[fg=cyan]#{pane_current_path} \ #[align=right]\ #[fg=default]#{pane_current_command}\ #[fg=yellow]%H:%M:%S\ From c2445359212f3cf6695ed9af0fe07bd7eadc5511 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 18:37:09 +0100 Subject: [PATCH 152/253] tmux/spaces --- sh/tmux.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index b2cc4cd..8d77f3b 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -100,9 +100,11 @@ set-option -g status-format[1] '\ #{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ -#{window_index}-#{window_panes} \ + \ +#{window_index}-#{window_panes}\ + \ #{window_name}\ - \ + \ }\ #[align=right]\ #[fg=green]#{session_name}\ @@ -115,10 +117,11 @@ set-option -g status-format[2] '\ #[fg=default]│\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ + \ #{pane_index}\ \ #{pane_current_command}\ - \ + \ }\ #[align=right]\ #[fg=yellow]%Y-%m-%d\ @@ -130,10 +133,11 @@ set-option -g status-format[3] '\ #[fg=default]│\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ + \ #{pane_index}\ \ #[fg=blue]#{pane_width}×#{pane_height}\ - \ + \ }\ #[align=right]\ #[fg=blue]#{window_width}×#{window_height}\ From 758be9009e78858de609e4c882d9e25ff7b10703 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 18:46:49 +0100 Subject: [PATCH 153/253] tmux/2 --- sh/tmux.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8d77f3b..1f1e391 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -87,7 +87,8 @@ set-option -g status-fg gray # line 1 set-option -g status-format[0] '\ #[fg=default]╭╴\ -#[fg=cyan]#{pane_current_path} \ +#[fg=cyan]#{pane_current_path}\ + \ #[align=right]\ #[fg=default]#{pane_current_command}\ #[fg=yellow]%H:%M:%S\ @@ -106,6 +107,7 @@ set-option -g status-format[1] '\ #{window_name}\ \ }\ + \ #[align=right]\ #[fg=green]#{session_name}\ #[fg=default]#(tmux list-sessions | wc --lines)\ @@ -123,6 +125,7 @@ set-option -g status-format[2] '\ #{pane_current_command}\ \ }\ + \ #[align=right]\ #[fg=yellow]%Y-%m-%d\ #[fg=default]│\ @@ -139,6 +142,7 @@ set-option -g status-format[3] '\ #[fg=blue]#{pane_width}×#{pane_height}\ \ }\ + \ #[align=right]\ #[fg=blue]#{window_width}×#{window_height}\ #[fg=default]│\ From e99d519e8d3e9bdb482cd20a7d9154912c2b5826 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 19:13:46 +0100 Subject: [PATCH 154/253] tmux/spaces --- sh/tmux.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 1f1e391..3bfa8b6 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -91,6 +91,7 @@ set-option -g status-format[0] '\ \ #[align=right]\ #[fg=default]#{pane_current_command}\ + \ #[fg=yellow]%H:%M:%S\ #[fg=default]╶╮\ ' @@ -110,6 +111,7 @@ set-option -g status-format[1] '\ \ #[align=right]\ #[fg=green]#{session_name}\ + \ #[fg=default]#(tmux list-sessions | wc --lines)\ #[fg=default]│\ ' @@ -152,9 +154,9 @@ set-option -g status-format[3] '\ set-option -g status-format[4] '\ #[fg=default]│\ #[align=centre]\ -#[fg=default]#{user}\ - #[fg=blue]@\ - #[fg=yellow]#{host}\ +# [fg=default]#{user} \ +#[fg=blue]@\ + #[fg=yellow]#{host} \ #[align=right]\ #[fg=default]│\ ' From c3df0b05e946fd6b92a2f93773fa7e8b616e9e4b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 19:15:42 +0100 Subject: [PATCH 155/253] tmux/fix --- sh/tmux.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 3bfa8b6..a136f67 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -154,9 +154,11 @@ set-option -g status-format[3] '\ set-option -g status-format[4] '\ #[fg=default]│\ #[align=centre]\ -# [fg=default]#{user} \ + #[fg=default]#{user}\ + \ #[fg=blue]@\ - #[fg=yellow]#{host} \ + #[fg=yellow]#{host}\ + \ #[align=right]\ #[fg=default]│\ ' From 9e3f73f24f65eeed574db4e10b934933c404bb53 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 19:34:27 +0100 Subject: [PATCH 156/253] tmux/5 --- sh/tmux.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index a136f67..f5668f9 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -76,7 +76,7 @@ set-option -g pane-border-style fg=gray # ╰────────┴────────╯ # status lines -set-option -g status 3 +set-option -g status 5 # background color set-option -g status-bg black @@ -136,6 +136,19 @@ set-option -g status-format[2] '\ # line 4 set-option -g status-format[3] '\ #[fg=default]│\ +#[align=centre]\ + #[fg=default]#{user}\ + \ +#[fg=blue]@\ + #[fg=yellow]#{host}\ + \ +#[align=right]\ + #[fg=default]│\ +' + +# line 5 +set-option -g status-format[4] '\ +#[fg=default]│\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ \ @@ -150,19 +163,6 @@ set-option -g status-format[3] '\ #[fg=default]│\ ' -# line 5 -set-option -g status-format[4] '\ -#[fg=default]│\ -#[align=centre]\ - #[fg=default]#{user}\ - \ -#[fg=blue]@\ - #[fg=yellow]#{host}\ - \ -#[align=right]\ - #[fg=default]│\ -' - # refresh period set-option -g status-interval 1 From 2f93d1b7779994cb76307743421e0e3dd25bc3ad Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 19:36:44 +0100 Subject: [PATCH 157/253] tmux/borders --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index f5668f9..91b1f2c 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -69,7 +69,7 @@ set-option -g pane-base-index 1 set-option -g pane-active-border-style fg=green # regular style -set-option -g pane-border-style fg=gray +set-option -g pane-border-style fg=blue # ╭────────┬────────╮ # │ option │ status │ From 67803f31b8a85f268b08f87e58b48a8cb79db8d5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 19:40:45 +0100 Subject: [PATCH 158/253] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 91b1f2c..1f8c5d4 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -99,6 +99,23 @@ set-option -g status-format[0] '\ # line 2 set-option -g status-format[1] '\ #[fg=default]│\ +#{P:\ +#{?pane_active,#[fg=green],#[fg=default]}\ + \ +#{pane_index}\ + \ +#{pane_current_command}\ + \ +}\ + \ +#[align=right]\ + #[fg=yellow]%Y-%m-%d\ + #[fg=default]│\ +' + +# line 3 +set-option -g status-format[2] '\ +#[fg=default]│\ #{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ @@ -116,23 +133,6 @@ set-option -g status-format[1] '\ #[fg=default]│\ ' -# line 3 -set-option -g status-format[2] '\ -#[fg=default]│\ -#{P:\ -#{?pane_active,#[fg=green],#[fg=default]}\ - \ -#{pane_index}\ - \ -#{pane_current_command}\ - \ -}\ - \ -#[align=right]\ - #[fg=yellow]%Y-%m-%d\ - #[fg=default]│\ -' - # line 4 set-option -g status-format[3] '\ #[fg=default]│\ From bc8e3b19740090dd05233a65216838496e6655b0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 19:50:58 +0100 Subject: [PATCH 159/253] tmux/split --- sh/tmux.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 1f8c5d4..c6a7388 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -90,9 +90,7 @@ set-option -g status-format[0] '\ #[fg=cyan]#{pane_current_path}\ \ #[align=right]\ - #[fg=default]#{pane_current_command}\ - \ - #[fg=yellow]%H:%M:%S\ +#[fg=default]#{pane_current_command}\ #[fg=default]╶╮\ ' @@ -109,8 +107,8 @@ set-option -g status-format[1] '\ }\ \ #[align=right]\ - #[fg=yellow]%Y-%m-%d\ - #[fg=default]│\ +#[fg=yellow] %Y-%m-%d %H:%M:%S \ +#[fg=default]│\ ' # line 3 @@ -127,10 +125,9 @@ set-option -g status-format[2] '\ }\ \ #[align=right]\ - #[fg=green]#{session_name}\ - \ - #[fg=default]#(tmux list-sessions | wc --lines)\ - #[fg=default]│\ +#[fg=green] #{session_name} \ +#[fg=default] #(tmux list-sessions | wc --lines) \ +#[fg=default]│\ ' # line 4 @@ -143,7 +140,7 @@ set-option -g status-format[3] '\ #[fg=yellow]#{host}\ \ #[align=right]\ - #[fg=default]│\ +#[fg=default]│\ ' # line 5 @@ -159,8 +156,8 @@ set-option -g status-format[4] '\ }\ \ #[align=right]\ - #[fg=blue]#{window_width}×#{window_height}\ - #[fg=default]│\ +#[fg=blue] #{window_width}×#{window_height} \ +#[fg=default]│\ ' # refresh period From 72fdd9cfeeaf47cf1aedd09a3be9017ea07e5e08 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 20:20:44 +0100 Subject: [PATCH 160/253] tmux/user --- sh/tmux.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index c6a7388..8c81cfe 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -134,11 +134,9 @@ set-option -g status-format[2] '\ set-option -g status-format[3] '\ #[fg=default]│\ #[align=centre]\ - #[fg=default]#{user}\ - \ +#[fg=green] #{user} \ #[fg=blue]@\ - #[fg=yellow]#{host}\ - \ +#[fg=yellow] #{host} \ #[align=right]\ #[fg=default]│\ ' From 79151b9d9a1b4c6b644c75887d7f5c5ab8376535 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 20:31:02 +0100 Subject: [PATCH 161/253] =?UTF-8?q?tmux/=E2=96=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8c81cfe..8d6935e 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -118,7 +118,7 @@ set-option -g status-format[2] '\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ \ -#{window_index}-#{window_panes}\ +#{window_index}▸#{window_panes}\ \ #{window_name}\ \ From 5ead655410a9bcc40c64f981521f35dee8282a50 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 20:46:07 +0100 Subject: [PATCH 162/253] tmux/window --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8d6935e..c4ab925 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -100,7 +100,7 @@ set-option -g status-format[1] '\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ \ -#{pane_index}\ +#{window_index}.#{pane_index}\ \ #{pane_current_command}\ \ @@ -118,7 +118,7 @@ set-option -g status-format[2] '\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ \ -#{window_index}▸#{window_panes}\ +#{window_index}\ \ #{window_name}\ \ From 032ba1976cc23717a2320d9fe84fe3288f2e31c5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 21:08:18 +0100 Subject: [PATCH 163/253] tmux/window --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index c4ab925..1100060 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -147,7 +147,7 @@ set-option -g status-format[4] '\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ \ -#{pane_index}\ +#{window_index}.#{pane_index}\ \ #[fg=blue]#{pane_width}×#{pane_height}\ \ From 6d06e5f9748440e043565ce52e8f87aecec8cf04 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 21:33:13 +0100 Subject: [PATCH 164/253] tmux/shrink --- sh/tmux.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 1100060..c1bdaea 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -90,7 +90,6 @@ set-option -g status-format[0] '\ #[fg=cyan]#{pane_current_path}\ \ #[align=right]\ -#[fg=default]#{pane_current_command}\ #[fg=default]╶╮\ ' From 4bf4c5d9d4a0294ade59ca46cf0e4e40a83d2558 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 21:47:56 +0100 Subject: [PATCH 165/253] tmux/grounds --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index c1bdaea..7c8d2bb 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -79,10 +79,10 @@ set-option -g pane-border-style fg=blue set-option -g status 5 # background color -set-option -g status-bg black +set-option -g status-bg '#101010' # foreground color -set-option -g status-fg gray +set-option -g status-fg white # line 1 set-option -g status-format[0] '\ From f08bbdb671b3637b9d70f741f67cd9f149917bf5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 22:35:11 +0100 Subject: [PATCH 166/253] tmux/2 --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 7c8d2bb..7a0a8ab 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -86,11 +86,11 @@ set-option -g status-fg white # line 1 set-option -g status-format[0] '\ -#[fg=default]╭╴\ +#[fg=default]╭\ #[fg=cyan]#{pane_current_path}\ \ #[align=right]\ -#[fg=default]╶╮\ +#[fg=default]╮\ ' # line 2 From c943d591328db3d9a4f140049e719f970a4e1247 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 22:38:40 +0100 Subject: [PATCH 167/253] prompt/round --- sh/shell.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/shell.sh b/sh/shell.sh index 4f0db9b..7e56658 100644 --- a/sh/shell.sh +++ b/sh/shell.sh @@ -71,7 +71,7 @@ rwx_shell_prompt() { id="$(id --user)" local path="${PWD}" local user="${USER}" - local view="└ " + local view="╰ " # code if [ "${code}" -ne 0 ]; then view="${view}${RWX_COLOR_GREEN}" @@ -96,7 +96,7 @@ rwx_shell_prompt() { # new view="${view}\\n" # frame - view="${view}${RWX_COLOR_DEFAULT}┌ " + view="${view}${RWX_COLOR_DEFAULT}╭ " # user if [ "${id}" -eq 0 ]; then view="${view}${RWX_COLOR_GREEN}" From 4a33cd0ac8da260497252a539c74f3e67bc3612b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 22:39:42 +0100 Subject: [PATCH 168/253] prompt/path --- sh/shell.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/shell.sh b/sh/shell.sh index 7e56658..32f3f98 100644 --- a/sh/shell.sh +++ b/sh/shell.sh @@ -92,7 +92,7 @@ rwx_shell_prompt() { # new view="${view}\\n" # path - view="${view}${RWX_COLOR_CYAN}${path}" + view="${view} ${RWX_COLOR_CYAN}${path}" # new view="${view}\\n" # frame From fbe59cd37670c21cfad329a2351f555ad4359d84 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 22:48:40 +0100 Subject: [PATCH 169/253] tmux/time --- sh/tmux.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 7a0a8ab..ca2145b 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -90,6 +90,7 @@ set-option -g status-format[0] '\ #[fg=cyan]#{pane_current_path}\ \ #[align=right]\ +#[fg=yellow]%H:%M:%S\ #[fg=default]╮\ ' @@ -106,7 +107,7 @@ set-option -g status-format[1] '\ }\ \ #[align=right]\ -#[fg=yellow] %Y-%m-%d %H:%M:%S \ +#[fg=yellow] %Y-%m-%d \ #[fg=default]│\ ' From 1b9f943ce75a131bfd0d453009e5340ef3d69042 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 22:51:29 +0100 Subject: [PATCH 170/253] tmux/shrink --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index ca2145b..eec29ea 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -100,7 +100,7 @@ set-option -g status-format[1] '\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ \ -#{window_index}.#{pane_index}\ +#{pane_index}\ \ #{pane_current_command}\ \ @@ -147,7 +147,7 @@ set-option -g status-format[4] '\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ \ -#{window_index}.#{pane_index}\ +#{pane_index}\ \ #[fg=blue]#{pane_width}×#{pane_height}\ \ From 8402241834a9f8a78deea0348dfdf916ccd542f5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 22:58:47 +0100 Subject: [PATCH 171/253] tmux/over --- sh/tmux.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index eec29ea..e5d34c1 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -91,7 +91,6 @@ set-option -g status-format[0] '\ \ #[align=right]\ #[fg=yellow]%H:%M:%S\ -#[fg=default]╮\ ' # line 2 From 1aa0e8f805db4503189932a433ac55239dc4ba86 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 23:13:12 +0100 Subject: [PATCH 172/253] tmux/date --- sh/tmux.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index e5d34c1..05dcfee 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -90,7 +90,7 @@ set-option -g status-format[0] '\ #[fg=cyan]#{pane_current_path}\ \ #[align=right]\ -#[fg=yellow]%H:%M:%S\ +#[fg=yellow]╭──%H:%M:%S\ ' # line 2 @@ -106,8 +106,7 @@ set-option -g status-format[1] '\ }\ \ #[align=right]\ -#[fg=yellow] %Y-%m-%d \ -#[fg=default]│\ +#[fg=yellow]╰%Y-%m-%d\ ' # line 3 From 848500fd1b6f432c6d84e80d510bdd880aae5908 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 23:18:25 +0100 Subject: [PATCH 173/253] tmux/cut --- sh/tmux.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 05dcfee..5f8cc27 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -90,7 +90,7 @@ set-option -g status-format[0] '\ #[fg=cyan]#{pane_current_path}\ \ #[align=right]\ -#[fg=yellow]╭──%H:%M:%S\ +#[fg=yellow]%H:%M:%S\ ' # line 2 @@ -106,7 +106,7 @@ set-option -g status-format[1] '\ }\ \ #[align=right]\ -#[fg=yellow]╰%Y-%m-%d\ +#[fg=yellow]%Y-%m-%d\ ' # line 3 @@ -125,23 +125,19 @@ set-option -g status-format[2] '\ #[align=right]\ #[fg=green] #{session_name} \ #[fg=default] #(tmux list-sessions | wc --lines) \ -#[fg=default]│\ ' # line 4 set-option -g status-format[3] '\ -#[fg=default]│\ #[align=centre]\ #[fg=green] #{user} \ #[fg=blue]@\ #[fg=yellow] #{host} \ -#[align=right]\ #[fg=default]│\ ' # line 5 set-option -g status-format[4] '\ -#[fg=default]│\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ \ @@ -153,7 +149,6 @@ set-option -g status-format[4] '\ \ #[align=right]\ #[fg=blue] #{window_width}×#{window_height} \ -#[fg=default]│\ ' # refresh period From ffb8616718c8ea20144367f4c656ed86c3ceedc4 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 23:20:01 +0100 Subject: [PATCH 174/253] tmux/cut --- sh/shell.sh | 2 +- sh/tmux.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sh/shell.sh b/sh/shell.sh index 32f3f98..7e56658 100644 --- a/sh/shell.sh +++ b/sh/shell.sh @@ -92,7 +92,7 @@ rwx_shell_prompt() { # new view="${view}\\n" # path - view="${view} ${RWX_COLOR_CYAN}${path}" + view="${view}${RWX_COLOR_CYAN}${path}" # new view="${view}\\n" # frame diff --git a/sh/tmux.sh b/sh/tmux.sh index 5f8cc27..291ddf3 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -86,7 +86,6 @@ set-option -g status-fg white # line 1 set-option -g status-format[0] '\ -#[fg=default]╭\ #[fg=cyan]#{pane_current_path}\ \ #[align=right]\ @@ -95,7 +94,6 @@ set-option -g status-format[0] '\ # line 2 set-option -g status-format[1] '\ -#[fg=default]│\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ \ @@ -111,7 +109,6 @@ set-option -g status-format[1] '\ # line 3 set-option -g status-format[2] '\ -#[fg=default]│\ #{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ @@ -133,7 +130,6 @@ set-option -g status-format[3] '\ #[fg=green] #{user} \ #[fg=blue]@\ #[fg=yellow] #{host} \ -#[fg=default]│\ ' # line 5 From fceb980388b99cc92b4feb72dbae23e45d496705 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 19 Jan 2025 23:58:12 +0100 Subject: [PATCH 175/253] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 291ddf3..bcc8a0a 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -94,21 +94,6 @@ set-option -g status-format[0] '\ # line 2 set-option -g status-format[1] '\ -#{P:\ -#{?pane_active,#[fg=green],#[fg=default]}\ - \ -#{pane_index}\ - \ -#{pane_current_command}\ - \ -}\ - \ -#[align=right]\ -#[fg=yellow]%Y-%m-%d\ -' - -# line 3 -set-option -g status-format[2] '\ #{W:\ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=default]}}\ @@ -124,6 +109,21 @@ set-option -g status-format[2] '\ #[fg=default] #(tmux list-sessions | wc --lines) \ ' +# line 3 +set-option -g status-format[2] '\ +#{P:\ +#{?pane_active,#[fg=green],#[fg=default]}\ + \ +#{pane_index}\ + \ +#{pane_current_command}\ + \ +}\ + \ +#[align=right]\ +#[fg=yellow]%Y-%m-%d\ +' + # line 4 set-option -g status-format[3] '\ #[align=centre]\ From f342081d83cd6075a2fb6b38935488c787bb779c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 00:03:45 +0100 Subject: [PATCH 176/253] tmux/fixes --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index bcc8a0a..b7dae98 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -106,7 +106,7 @@ set-option -g status-format[1] '\ \ #[align=right]\ #[fg=green] #{session_name} \ -#[fg=default] #(tmux list-sessions | wc --lines) \ +#[fg=blue] #(tmux list-sessions | wc --lines)\ ' # line 3 @@ -144,7 +144,7 @@ set-option -g status-format[4] '\ }\ \ #[align=right]\ -#[fg=blue] #{window_width}×#{window_height} \ +#[fg=blue] #{window_width}×#{window_height}\ ' # refresh period From c3a168894ace70fce4096d90551ad16b491eed64 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 00:04:36 +0100 Subject: [PATCH 177/253] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index b7dae98..e6177f4 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -126,14 +126,6 @@ set-option -g status-format[2] '\ # line 4 set-option -g status-format[3] '\ -#[align=centre]\ -#[fg=green] #{user} \ -#[fg=blue]@\ -#[fg=yellow] #{host} \ -' - -# line 5 -set-option -g status-format[4] '\ #{P:\ #{?pane_active,#[fg=green],#[fg=default]}\ \ @@ -147,6 +139,14 @@ set-option -g status-format[4] '\ #[fg=blue] #{window_width}×#{window_height}\ ' +# line 5 +set-option -g status-format[4] '\ +#[align=centre]\ +#[fg=green] #{user} \ +#[fg=blue]@\ +#[fg=yellow] #{host} \ +' + # refresh period set-option -g status-interval 1 From 08dc6fe80b7a568c2c2ba34d018f5d763cadd353 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 00:10:19 +0100 Subject: [PATCH 178/253] tmux/fixes --- sh/tmux.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index e6177f4..b32a040 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -136,15 +136,14 @@ set-option -g status-format[3] '\ }\ \ #[align=right]\ -#[fg=blue] #{window_width}×#{window_height}\ +#[fg=blue] #{window_width} × #{window_height} \ ' # line 5 set-option -g status-format[4] '\ -#[align=centre]\ -#[fg=green] #{user} \ -#[fg=blue]@\ -#[fg=yellow] #{host} \ +#[fg=green]#{user}\ +#[align=right]\ +#[fg=yellow]#{host}\ ' # refresh period From b97c43a33d46f50e03879510d5b6639b2ac7d7e5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 00:14:14 +0100 Subject: [PATCH 179/253] tmux/fixes --- sh/tmux.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index b32a040..b8c6bd9 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -87,7 +87,7 @@ set-option -g status-fg white # line 1 set-option -g status-format[0] '\ #[fg=cyan]#{pane_current_path}\ - \ + \ #[align=right]\ #[fg=yellow]%H:%M:%S\ ' @@ -103,7 +103,6 @@ set-option -g status-format[1] '\ #{window_name}\ \ }\ - \ #[align=right]\ #[fg=green] #{session_name} \ #[fg=blue] #(tmux list-sessions | wc --lines)\ @@ -119,7 +118,6 @@ set-option -g status-format[2] '\ #{pane_current_command}\ \ }\ - \ #[align=right]\ #[fg=yellow]%Y-%m-%d\ ' @@ -134,9 +132,8 @@ set-option -g status-format[3] '\ #[fg=blue]#{pane_width}×#{pane_height}\ \ }\ - \ #[align=right]\ -#[fg=blue] #{window_width} × #{window_height} \ +#[fg=blue] #{window_width} × #{window_height}\ ' # line 5 From ea166159a10160f1a23616f60b285ea13722e3e5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 00:23:18 +0100 Subject: [PATCH 180/253] tmux/fixes --- sh/tmux.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index b8c6bd9..5272202 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -95,11 +95,11 @@ set-option -g status-format[0] '\ # line 2 set-option -g status-format[1] '\ #{W:\ + \ +#[fg=yellow]#{window_index}\ + \ #{?window_active,#[fg=green],\ -#{?window_activity_flag,#[fg=red],#[fg=default]}}\ - \ -#{window_index}\ - \ +#{?window_activity_flag,#[fg=red],#[fg=blue]}}\ #{window_name}\ \ }\ @@ -111,10 +111,10 @@ set-option -g status-format[1] '\ # line 3 set-option -g status-format[2] '\ #{P:\ -#{?pane_active,#[fg=green],#[fg=default]}\ \ -#{pane_index}\ +#[fg=yellow]#{pane_index}\ \ +#{?pane_active,#[fg=green],#[fg=blue]}\ #{pane_current_command}\ \ }\ @@ -125,15 +125,15 @@ set-option -g status-format[2] '\ # line 4 set-option -g status-format[3] '\ #{P:\ -#{?pane_active,#[fg=green],#[fg=default]}\ \ -#{pane_index}\ +#[fg=yellow]#{pane_index}\ \ -#[fg=blue]#{pane_width}×#{pane_height}\ +#{?pane_active,#[fg=green],#[fg=blue]}\ +#{pane_width}×#{pane_height}\ \ }\ #[align=right]\ -#[fg=blue] #{window_width} × #{window_height}\ +#[fg=blue] #{window_width}×#{window_height}\ ' # line 5 From a416f6d958205ffa1cbbe6426f42ff025935e405 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 11:39:43 +0100 Subject: [PATCH 181/253] tmux/sessions --- sh/tmux.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 5272202..f02be4c 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -138,8 +138,17 @@ set-option -g status-format[3] '\ # line 5 set-option -g status-format[4] '\ -#[fg=green]#{user}\ +#{S:\ + \ +#[fg=yellow]#{s/\\\$//:session_id}\ + \ +#{?session_attached,#[fg=green],#[fg=blue]}\ +#{session_name}\ + \ +}\ #[align=right]\ +#[fg=green]#{user}\ +#[fg=default] @ \ #[fg=yellow]#{host}\ ' From 731f2088a89ad4944742447af02312fc691f0e07 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 11:44:52 +0100 Subject: [PATCH 182/253] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 56 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index f02be4c..efd4131 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -110,34 +110,6 @@ set-option -g status-format[1] '\ # line 3 set-option -g status-format[2] '\ -#{P:\ - \ -#[fg=yellow]#{pane_index}\ - \ -#{?pane_active,#[fg=green],#[fg=blue]}\ -#{pane_current_command}\ - \ -}\ -#[align=right]\ -#[fg=yellow]%Y-%m-%d\ -' - -# line 4 -set-option -g status-format[3] '\ -#{P:\ - \ -#[fg=yellow]#{pane_index}\ - \ -#{?pane_active,#[fg=green],#[fg=blue]}\ -#{pane_width}×#{pane_height}\ - \ -}\ -#[align=right]\ -#[fg=blue] #{window_width}×#{window_height}\ -' - -# line 5 -set-option -g status-format[4] '\ #{S:\ \ #[fg=yellow]#{s/\\\$//:session_id}\ @@ -152,6 +124,34 @@ set-option -g status-format[4] '\ #[fg=yellow]#{host}\ ' +# line 4 +set-option -g status-format[3] '\ +#{P:\ + \ +#[fg=yellow]#{pane_index}\ + \ +#{?pane_active,#[fg=green],#[fg=blue]}\ +#{pane_current_command}\ + \ +}\ +#[align=right]\ +#[fg=yellow]%Y-%m-%d\ +' + +# line 5 +set-option -g status-format[4] '\ +#{P:\ + \ +#[fg=yellow]#{pane_index}\ + \ +#{?pane_active,#[fg=green],#[fg=blue]}\ +#{pane_width}×#{pane_height}\ + \ +}\ +#[align=right]\ +#[fg=blue] #{window_width}×#{window_height}\ +' + # refresh period set-option -g status-interval 1 From 154558a411a613023584ff909de327324f3e93b9 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 11:52:50 +0100 Subject: [PATCH 183/253] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index efd4131..eeec743 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -119,9 +119,7 @@ set-option -g status-format[2] '\ \ }\ #[align=right]\ -#[fg=green]#{user}\ -#[fg=default] @ \ -#[fg=yellow]#{host}\ +#[fg=yellow]%Y-%m-%d\ ' # line 4 @@ -135,7 +133,9 @@ set-option -g status-format[3] '\ \ }\ #[align=right]\ -#[fg=yellow]%Y-%m-%d\ +#[fg=green]#{user}\ +#[fg=default] @ \ +#[fg=yellow]#{host}\ ' # line 5 From 9d5dbbb8bc55948f8442f238f1df9e2a17f5bd18 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 11:57:54 +0100 Subject: [PATCH 184/253] tmux/uid --- sh/tmux.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index eeec743..0fb83fb 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -133,9 +133,9 @@ set-option -g status-format[3] '\ \ }\ #[align=right]\ -#[fg=green]#{user}\ -#[fg=default] @ \ -#[fg=yellow]#{host}\ +#{?uid,#[fg=green],#[fg=red]}\ +#{user} \ +#[fg=yellow] #{host}\ ' # line 5 From d789a16ef3a7f3793d28845dcd6dcfa0c0ab083e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 12:09:42 +0100 Subject: [PATCH 185/253] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0fb83fb..9698cf4 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -104,8 +104,7 @@ set-option -g status-format[1] '\ \ }\ #[align=right]\ -#[fg=green] #{session_name} \ -#[fg=blue] #(tmux list-sessions | wc --lines)\ +#[fg=yellow]%Y-%m-%d\ ' # line 3 @@ -119,7 +118,7 @@ set-option -g status-format[2] '\ \ }\ #[align=right]\ -#[fg=yellow]%Y-%m-%d\ +#[fg=green]#{session_name}\ ' # line 4 From d3c967c65792f396425f7c21f99555a6ba746bcd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 12:11:45 +0100 Subject: [PATCH 186/253] tmux/shrink --- sh/tmux.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 9698cf4..f3957d8 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -132,9 +132,7 @@ set-option -g status-format[3] '\ \ }\ #[align=right]\ -#{?uid,#[fg=green],#[fg=red]}\ -#{user} \ -#[fg=yellow] #{host}\ +#[fg=yellow]#{host_short}\ ' # line 5 From 90f61d1cd2ee46d79b9e1c9d6dbebb0b8feb6153 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 12:17:42 +0100 Subject: [PATCH 187/253] tmux/many --- sh/tmux.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index f3957d8..084cc90 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -113,7 +113,8 @@ set-option -g status-format[2] '\ \ #[fg=yellow]#{s/\\\$//:session_id}\ \ -#{?session_attached,#[fg=green],#[fg=blue]}\ +#{?session_many_attached,#[fg=red],\ +#{?session_attached,#[fg=green],#[fg=blue]}}\ #{session_name}\ \ }\ From d7491af2b609c93fa1bd67671c9250690a37f171 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 12:30:11 +0100 Subject: [PATCH 188/253] tmux/session --- sh/tmux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 084cc90..e933acb 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -114,11 +114,13 @@ set-option -g status-format[2] '\ #[fg=yellow]#{s/\\\$//:session_id}\ \ #{?session_many_attached,#[fg=red],\ -#{?session_attached,#[fg=green],#[fg=blue]}}\ +#{?session_attached,#[fg=cyan],#[fg=blue]}}\ #{session_name}\ \ }\ #[align=right]\ +#[fg=yellow]#{s/\\\$//:session_id}\ + \ #[fg=green]#{session_name}\ ' From 7cc6025fa75b5c9c19d4805c8dd7a4162b2e8180 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 13:41:16 +0100 Subject: [PATCH 189/253] tmux/bg --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index e933acb..53d0e56 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -79,7 +79,7 @@ set-option -g pane-border-style fg=blue set-option -g status 5 # background color -set-option -g status-bg '#101010' +set-option -g status-bg '#0C0C0C' # foreground color set-option -g status-fg white From e55847358d3940d799af03233040b2fc4229ef97 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 13:57:49 +0100 Subject: [PATCH 190/253] tmux/fixes --- sh/tmux.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 53d0e56..93b97df 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -109,19 +109,16 @@ set-option -g status-format[1] '\ # line 3 set-option -g status-format[2] '\ +#[fg=green] #{session_name} \ #{S:\ \ -#[fg=yellow]#{s/\\\$//:session_id}\ - \ #{?session_many_attached,#[fg=red],\ #{?session_attached,#[fg=cyan],#[fg=blue]}}\ #{session_name}\ \ }\ #[align=right]\ -#[fg=yellow]#{s/\\\$//:session_id}\ - \ -#[fg=green]#{session_name}\ +#[fg=yellow]#{host}\ ' # line 4 @@ -135,7 +132,8 @@ set-option -g status-format[3] '\ \ }\ #[align=right]\ -#[fg=yellow]#{host_short}\ +#{?uid,#[fg=green],#[fg=red]}\ +#{user}\ ' # line 5 From df3f5a6a28ab3640b811a6ba9d86147b94e794be Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 14:12:31 +0100 Subject: [PATCH 191/253] =?UTF-8?q?tmux/=E2=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 93b97df..ace8842 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -95,13 +95,12 @@ set-option -g status-format[0] '\ # line 2 set-option -g status-format[1] '\ #{W:\ - \ #[fg=yellow]#{window_index}\ \ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=blue]}}\ #{window_name}\ - \ + \ }\ #[align=right]\ #[fg=yellow]%Y-%m-%d\ @@ -109,14 +108,13 @@ set-option -g status-format[1] '\ # line 3 set-option -g status-format[2] '\ -#[fg=green] #{session_name} \ #{S:\ - \ #{?session_many_attached,#[fg=red],\ #{?session_attached,#[fg=cyan],#[fg=blue]}}\ #{session_name}\ - \ + \ }\ +#[fg=green]→ #{session_name}\ #[align=right]\ #[fg=yellow]#{host}\ ' @@ -124,12 +122,11 @@ set-option -g status-format[2] '\ # line 4 set-option -g status-format[3] '\ #{P:\ - \ #[fg=yellow]#{pane_index}\ \ #{?pane_active,#[fg=green],#[fg=blue]}\ #{pane_current_command}\ - \ + \ }\ #[align=right]\ #{?uid,#[fg=green],#[fg=red]}\ @@ -139,12 +136,11 @@ set-option -g status-format[3] '\ # line 5 set-option -g status-format[4] '\ #{P:\ - \ #[fg=yellow]#{pane_index}\ \ #{?pane_active,#[fg=green],#[fg=blue]}\ #{pane_width}×#{pane_height}\ - \ + \ }\ #[align=right]\ #[fg=blue] #{window_width}×#{window_height}\ From ada0aac3d76f0eb274bcdb751b7fe3b5986d6729 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 14:15:25 +0100 Subject: [PATCH 192/253] tmux/space --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index ace8842..4b14d0f 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -114,7 +114,7 @@ set-option -g status-format[2] '\ #{session_name}\ \ }\ -#[fg=green]→ #{session_name}\ +#[fg=green]→ #{session_name}\ #[align=right]\ #[fg=yellow]#{host}\ ' From c0dbae1fdc38525b5742efe1c7d8f9f39f6086b4 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 14:25:15 +0100 Subject: [PATCH 193/253] tmux/space --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 4b14d0f..720d573 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -114,7 +114,7 @@ set-option -g status-format[2] '\ #{session_name}\ \ }\ -#[fg=green]→ #{session_name}\ +#[fg=green]→ #{session_name} \ #[align=right]\ #[fg=yellow]#{host}\ ' From 61ab59e270d9b8bcb2424f227ad7fb4909f6f7fa Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 14:26:41 +0100 Subject: [PATCH 194/253] =?UTF-8?q?tmux/=E2=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 720d573..9dadf4a 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -114,7 +114,7 @@ set-option -g status-format[2] '\ #{session_name}\ \ }\ -#[fg=green]→ #{session_name} \ +#[fg=green]→ #{session_name} \ #[align=right]\ #[fg=yellow]#{host}\ ' From 7dced222cf3723a28b2a528eef672d51918518f3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 14:33:45 +0100 Subject: [PATCH 195/253] tmux/sessions --- sh/tmux.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 9dadf4a..0732915 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -108,13 +108,15 @@ set-option -g status-format[1] '\ # line 3 set-option -g status-format[2] '\ +#[fg=yellow]#(tmux list-sessions | wc --lines)\ #{S:\ + \ #{?session_many_attached,#[fg=red],\ #{?session_attached,#[fg=cyan],#[fg=blue]}}\ #{session_name}\ - \ + \ }\ -#[fg=green]→ #{session_name} \ +#[fg=green] → #{session_name} \ #[align=right]\ #[fg=yellow]#{host}\ ' From a4ca1beb40a45a9923fca25bce8d4c250b1e4456 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 14:35:18 +0100 Subject: [PATCH 196/253] tmux/space --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 0732915..b0f1aed 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -108,7 +108,7 @@ set-option -g status-format[1] '\ # line 3 set-option -g status-format[2] '\ -#[fg=yellow]#(tmux list-sessions | wc --lines)\ +#[fg=yellow]#(tmux list-sessions | wc --lines) \ #{S:\ \ #{?session_many_attached,#[fg=red],\ From 3606ce807fb5159418ce6651624bbd5fffa3ac32 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 14:40:02 +0100 Subject: [PATCH 197/253] =?UTF-8?q?tmux/=C3=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index b0f1aed..5aa54d8 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -145,7 +145,7 @@ set-option -g status-format[4] '\ \ }\ #[align=right]\ -#[fg=blue] #{window_width}×#{window_height}\ +#[fg=green]#{window_width}×#{window_height}\ ' # refresh period From b359b4e5ff3cbafc6bdbbd00353ddf55525c538c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 14:45:17 +0100 Subject: [PATCH 198/253] =?UTF-8?q?tmux/=E2=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 5aa54d8..26fc6d5 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -116,7 +116,7 @@ set-option -g status-format[2] '\ #{session_name}\ \ }\ -#[fg=green] → #{session_name} \ +#[fg=green] #{session_name} \ #[align=right]\ #[fg=yellow]#{host}\ ' From 74b7009ce86503353ecb11ea3866eec9d6d3c410 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 14:47:05 +0100 Subject: [PATCH 199/253] tmux/magenta --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 26fc6d5..2b10aa7 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -112,7 +112,7 @@ set-option -g status-format[2] '\ #{S:\ \ #{?session_many_attached,#[fg=red],\ -#{?session_attached,#[fg=cyan],#[fg=blue]}}\ +#{?session_attached,#[fg=magenta],#[fg=blue]}}\ #{session_name}\ \ }\ From a347eb7b77d1e7673b02e4c39f373c31c78bdaab Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 20 Jan 2025 15:07:00 +0100 Subject: [PATCH 200/253] tmux/3 --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 2b10aa7..9049e7f 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -76,7 +76,7 @@ set-option -g pane-border-style fg=blue # ╰────────┴────────╯ # status lines -set-option -g status 5 +set-option -g status 3 # background color set-option -g status-bg '#0C0C0C' From 84ece74f4363c0e5fe5b0961d474fa074343d891 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 22 Jan 2025 14:07:37 +0100 Subject: [PATCH 201/253] =?UTF-8?q?tmux/=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/tmux.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 9049e7f..fc782ef 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -86,14 +86,6 @@ set-option -g status-fg white # line 1 set-option -g status-format[0] '\ -#[fg=cyan]#{pane_current_path}\ - \ -#[align=right]\ -#[fg=yellow]%H:%M:%S\ -' - -# line 2 -set-option -g status-format[1] '\ #{W:\ #[fg=yellow]#{window_index}\ \ @@ -103,11 +95,11 @@ set-option -g status-format[1] '\ \ }\ #[align=right]\ -#[fg=yellow]%Y-%m-%d\ +#[fg=yellow]%H:%M:%S\ ' -# line 3 -set-option -g status-format[2] '\ +# line 2 +set-option -g status-format[1] '\ #[fg=yellow]#(tmux list-sessions | wc --lines) \ #{S:\ \ @@ -118,6 +110,13 @@ set-option -g status-format[2] '\ }\ #[fg=green] #{session_name} \ #[align=right]\ +#[fg=yellow]%Y-%m-%d\ +' + +# line 3 +set-option -g status-format[2] '\ +#[fg=cyan]#{pane_current_path}\ +#[align=right]\ #[fg=yellow]#{host}\ ' From 92478cfaf3a4300e0c99d06709871d122290a663 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 22 Jan 2025 16:24:48 +0100 Subject: [PATCH 202/253] tmux/1,2 --- sh/tmux.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index fc782ef..6725a96 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -79,7 +79,7 @@ set-option -g pane-border-style fg=blue set-option -g status 3 # background color -set-option -g status-bg '#0C0C0C' +set-option -g status-bg '#101010' # foreground color set-option -g status-fg white @@ -87,12 +87,14 @@ set-option -g status-fg white # line 1 set-option -g status-format[0] '\ #{W:\ +#[bg=##202020] #[bg=##303030] \ #[fg=yellow]#{window_index}\ \ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=blue]}}\ #{window_name}\ - \ +#[bg=##303030] #[bg=##202020] \ +#[bg=default] \ }\ #[align=right]\ #[fg=yellow]%H:%M:%S\ @@ -100,15 +102,15 @@ set-option -g status-format[0] '\ # line 2 set-option -g status-format[1] '\ -#[fg=yellow]#(tmux list-sessions | wc --lines) \ #{S:\ - \ +#[bg=##202020] #[bg=##303030] \ #{?session_many_attached,#[fg=red],\ #{?session_attached,#[fg=magenta],#[fg=blue]}}\ #{session_name}\ - \ +#[bg=##303030] #[bg=##202020] \ +#[bg=default] \ }\ -#[fg=green] #{session_name} \ +#[fg=green] #{session_name} \ #[align=right]\ #[fg=yellow]%Y-%m-%d\ ' From 0140f4e75687df026ff6335171337bfe1a638e5f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 22 Jan 2025 16:33:40 +0100 Subject: [PATCH 203/253] tmux/others --- sh/tmux.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 6725a96..5b60f41 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -97,6 +97,7 @@ set-option -g status-format[0] '\ #[bg=default] \ }\ #[align=right]\ +#[bg=##202020] #[bg=##303030] \ #[fg=yellow]%H:%M:%S\ ' @@ -110,8 +111,9 @@ set-option -g status-format[1] '\ #[bg=##303030] #[bg=##202020] \ #[bg=default] \ }\ -#[fg=green] #{session_name} \ +#[fg=green]→ #{session_name} \ #[align=right]\ +#[bg=##202020] #[bg=##303030] \ #[fg=yellow]%Y-%m-%d\ ' @@ -119,19 +121,23 @@ set-option -g status-format[1] '\ set-option -g status-format[2] '\ #[fg=cyan]#{pane_current_path}\ #[align=right]\ +#[bg=##202020] #[bg=##303030] \ #[fg=yellow]#{host}\ ' # line 4 set-option -g status-format[3] '\ #{P:\ +#[bg=##202020] #[bg=##303030] \ #[fg=yellow]#{pane_index}\ \ #{?pane_active,#[fg=green],#[fg=blue]}\ #{pane_current_command}\ - \ +#[bg=##303030] #[bg=##202020] \ +#[bg=default] \ }\ #[align=right]\ +#[bg=##202020] #[bg=##303030] \ #{?uid,#[fg=green],#[fg=red]}\ #{user}\ ' @@ -139,13 +145,16 @@ set-option -g status-format[3] '\ # line 5 set-option -g status-format[4] '\ #{P:\ +#[bg=##202020] #[bg=##303030] \ #[fg=yellow]#{pane_index}\ \ #{?pane_active,#[fg=green],#[fg=blue]}\ #{pane_width}×#{pane_height}\ - \ +#[bg=##303030] #[bg=##202020] \ +#[bg=default] \ }\ #[align=right]\ +#[bg=##202020] #[bg=##303030] \ #[fg=green]#{window_width}×#{window_height}\ ' From c26d5b8bcb1bda077a7afb37fc0cb5cf26e199af Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 22 Jan 2025 16:34:23 +0100 Subject: [PATCH 204/253] tmux/d --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 5b60f41..552ee99 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -79,7 +79,7 @@ set-option -g pane-border-style fg=blue set-option -g status 3 # background color -set-option -g status-bg '#101010' +set-option -g status-bg '#0D0D0D' # foreground color set-option -g status-fg white From 5bc65bbab11c9bf76ff9ea020b1afe727b4d6020 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 22 Jan 2025 16:42:20 +0100 Subject: [PATCH 205/253] tmux/end --- sh/tmux.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 552ee99..fd4de91 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -99,6 +99,7 @@ set-option -g status-format[0] '\ #[align=right]\ #[bg=##202020] #[bg=##303030] \ #[fg=yellow]%H:%M:%S\ +#[bg=##303030] #[bg=##202020] \ ' # line 2 @@ -115,6 +116,7 @@ set-option -g status-format[1] '\ #[align=right]\ #[bg=##202020] #[bg=##303030] \ #[fg=yellow]%Y-%m-%d\ +#[bg=##303030] #[bg=##202020] \ ' # line 3 @@ -123,6 +125,7 @@ set-option -g status-format[2] '\ #[align=right]\ #[bg=##202020] #[bg=##303030] \ #[fg=yellow]#{host}\ +#[bg=##303030] #[bg=##202020] \ ' # line 4 @@ -140,6 +143,7 @@ set-option -g status-format[3] '\ #[bg=##202020] #[bg=##303030] \ #{?uid,#[fg=green],#[fg=red]}\ #{user}\ +#[bg=##303030] #[bg=##202020] \ ' # line 5 @@ -156,6 +160,7 @@ set-option -g status-format[4] '\ #[align=right]\ #[bg=##202020] #[bg=##303030] \ #[fg=green]#{window_width}×#{window_height}\ +#[bg=##303030] #[bg=##202020] \ ' # refresh period From 6bd27737ac7b695ff8896d9ff26f9159cf81b421 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 22 Jan 2025 16:48:35 +0100 Subject: [PATCH 206/253] tmux/arrow --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index fd4de91..8ec4c13 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -112,7 +112,7 @@ set-option -g status-format[1] '\ #[bg=##303030] #[bg=##202020] \ #[bg=default] \ }\ -#[fg=green]→ #{session_name} \ +#[fg=yellow]→ #[fg=green]#{session_name} \ #[align=right]\ #[bg=##202020] #[bg=##303030] \ #[fg=yellow]%Y-%m-%d\ From 2227b2cb3e0ea5198e2e9f7e50c5c83f3a5200f3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 23 Jan 2025 11:54:39 +0100 Subject: [PATCH 207/253] tmux/recap --- sh/tmux.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8ec4c13..8700be4 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -218,5 +218,33 @@ bind-key t set-option -g mouse \\; display-message 'mouse = #{mouse}' # swap window bind-key M-Left swap-window -t -1 bind-key M-Right swap-window -t +1 + +# ╭──────────────────────────┬───────┬───────────╮ +# │ detach-client │ │ F6 │ +# │ new-window │ │ F2 │ +# │ next-window │ │ M-Right │ +# │ prefix │ C-b │ F12 │ +# │ previous-window │ │ M-Left │ +# │ select-pane -D │ │ C-S-Down │ +# │ select-pane -L │ │ C-S-Left │ +# │ select-pane -R │ │ C-S-Right │ +# │ select-pane -U │ │ C-S-Up │ +# │ set-option -g status off │ │ C-F10 │ +# │ set-option -g status on │ │ C-F1 │ +# │ set-option -g status 2 │ │ C-F2 │ +# │ set-option -g status 3 │ │ C-F3 │ +# │ set-option -g status 4 │ │ C-F4 │ +# │ set-option -g status 5 │ │ C-F5 │ +# │ switch-client -n │ │ M-Down │ +# │ switch-client -p │ │ M-Up │ +# ├─────────────────────┬────┴────┬──┴──────┬────╯ +# │ detach │ d │ │ +# │ set-option -g mouse │ │ t │ +# │ source-file │ │ r │ +# │ split-window -h │ % │ h │ +# │ split-window -v │ " │ v │ +# │ swap-window -t -1 │ │ M-Left │ +# │ swap-window -t +1 │ │ M-Right │ +# ╰─────────────────────┴─────────┴─────────╯ " } From 7ab5f521c85c508940246d32dd568ee360cf5b1f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 23 Jan 2025 12:41:51 +0100 Subject: [PATCH 208/253] tmux/prompts --- sh/tmux.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 8700be4..975e358 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -237,14 +237,16 @@ bind-key M-Right swap-window -t +1 # │ set-option -g status 5 │ │ C-F5 │ # │ switch-client -n │ │ M-Down │ # │ switch-client -p │ │ M-Up │ -# ├─────────────────────┬────┴────┬──┴──────┬────╯ -# │ detach │ d │ │ -# │ set-option -g mouse │ │ t │ -# │ source-file │ │ r │ -# │ split-window -h │ % │ h │ -# │ split-window -v │ " │ v │ -# │ swap-window -t -1 │ │ M-Left │ -# │ swap-window -t +1 │ │ M-Right │ -# ╰─────────────────────┴─────────┴─────────╯ +# ├──────────────────────────┴───────┴─┬───┬─────┴───╮ +# │ command-prompt 'rename-session %%' │ │ │ +# │ command-prompt 'rename-window %%' │ │ │ +# │ detach │ d │ │ +# │ set-option -g mouse │ │ t │ +# │ source-file │ │ r │ +# │ split-window -h │ % │ h │ +# │ split-window -v │ " │ v │ +# │ swap-window -t -1 │ │ M-Left │ +# │ swap-window -t +1 │ │ M-Right │ +# ╰────────────────────────────────────┴───┴─────────╯ " } From 7414ba7b7ef1e8993ad76b20f029134fb85d8402 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 23 Jan 2025 13:53:10 +0100 Subject: [PATCH 209/253] tmux/align --- sh/tmux.sh | 59 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 975e358..3c84185 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -219,34 +219,35 @@ bind-key t set-option -g mouse \\; display-message 'mouse = #{mouse}' bind-key M-Left swap-window -t -1 bind-key M-Right swap-window -t +1 -# ╭──────────────────────────┬───────┬───────────╮ -# │ detach-client │ │ F6 │ -# │ new-window │ │ F2 │ -# │ next-window │ │ M-Right │ -# │ prefix │ C-b │ F12 │ -# │ previous-window │ │ M-Left │ -# │ select-pane -D │ │ C-S-Down │ -# │ select-pane -L │ │ C-S-Left │ -# │ select-pane -R │ │ C-S-Right │ -# │ select-pane -U │ │ C-S-Up │ -# │ set-option -g status off │ │ C-F10 │ -# │ set-option -g status on │ │ C-F1 │ -# │ set-option -g status 2 │ │ C-F2 │ -# │ set-option -g status 3 │ │ C-F3 │ -# │ set-option -g status 4 │ │ C-F4 │ -# │ set-option -g status 5 │ │ C-F5 │ -# │ switch-client -n │ │ M-Down │ -# │ switch-client -p │ │ M-Up │ -# ├──────────────────────────┴───────┴─┬───┬─────┴───╮ -# │ command-prompt 'rename-session %%' │ │ │ -# │ command-prompt 'rename-window %%' │ │ │ -# │ detach │ d │ │ -# │ set-option -g mouse │ │ t │ -# │ source-file │ │ r │ -# │ split-window -h │ % │ h │ -# │ split-window -v │ " │ v │ -# │ swap-window -t -1 │ │ M-Left │ -# │ swap-window -t +1 │ │ M-Right │ -# ╰────────────────────────────────────┴───┴─────────╯ +# ╭───────────╮ +# │ default │ +# ╭───────────┬─────────┼─────┬─────┤ +# │ -n │ F12 │ -n │ C-b │ +# ╭────────────────────────────────────┼───────────┼─────────┼─────┼─────┤ +# │ command-prompt 'rename-session %%' │ │ C-s │ │ │ +# │ command-prompt 'rename-window %%' │ │ C-w │ │ │ +# │ detach-client │ F6 │ │ │ d │ +# │ new-window │ F2 │ │ │ │ +# │ next-window │ M-Right │ │ │ │ +# │ previous-window │ M-Left │ │ │ │ +# │ select-pane -D │ C-S-Down │ │ │ │ +# │ select-pane -L │ C-S-Left │ │ │ │ +# │ select-pane -R │ C-S-Right │ │ │ │ +# │ select-pane -U │ C-S-Up │ │ │ │ +# │ set-option -g mouse │ │ t │ │ │ +# │ set-option -g status off │ C-F10 │ │ │ │ +# │ set-option -g status on │ C-F1 │ │ │ │ +# │ set-option -g status 2 │ C-F2 │ │ │ │ +# │ set-option -g status 3 │ C-F3 │ │ │ │ +# │ set-option -g status 4 │ C-F4 │ │ │ │ +# │ set-option -g status 5 │ C-F5 │ │ │ │ +# │ source-file │ │ r │ │ │ +# │ split-window -h │ │ h │ │ % │ +# │ split-window -v │ │ v │ │ " │ +# │ swap-window -t -1 │ │ M-Left │ │ │ +# │ swap-window -t +1 │ │ M-Right │ │ │ +# │ switch-client -n │ M-Down │ │ │ │ +# │ switch-client -p │ M-Up │ │ │ │ +# ╰────────────────────────────────────┴───────────┴─────────┴─────┴─────╯ " } From 14e1c8d5e6d65631cb693348ce8239bc216b9ea2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 23 Jan 2025 13:55:25 +0100 Subject: [PATCH 210/253] tmux/fix --- sh/tmux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index 3c84185..00fe2e2 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -226,7 +226,7 @@ bind-key M-Right swap-window -t +1 # ╭────────────────────────────────────┼───────────┼─────────┼─────┼─────┤ # │ command-prompt 'rename-session %%' │ │ C-s │ │ │ # │ command-prompt 'rename-window %%' │ │ C-w │ │ │ -# │ detach-client │ F6 │ │ │ d │ +# │ detach-client │ F6 │ │ │ d │ # │ new-window │ F2 │ │ │ │ # │ next-window │ M-Right │ │ │ │ # │ previous-window │ M-Left │ │ │ │ @@ -243,7 +243,7 @@ bind-key M-Right swap-window -t +1 # │ set-option -g status 5 │ C-F5 │ │ │ │ # │ source-file │ │ r │ │ │ # │ split-window -h │ │ h │ │ % │ -# │ split-window -v │ │ v │ │ " │ +# │ split-window -v │ │ v │ │ \" │ # │ swap-window -t -1 │ │ M-Left │ │ │ # │ swap-window -t +1 │ │ M-Right │ │ │ # │ switch-client -n │ M-Down │ │ │ │ From 37c4f1b0c224ac72781075e818f6a6cd9f4c8769 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 23 Jan 2025 14:05:41 +0100 Subject: [PATCH 211/253] tmux/session --- sh/tmux.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 00fe2e2..d8ad473 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -227,6 +227,7 @@ bind-key M-Right swap-window -t +1 # │ command-prompt 'rename-session %%' │ │ C-s │ │ │ # │ command-prompt 'rename-window %%' │ │ C-w │ │ │ # │ detach-client │ F6 │ │ │ d │ +# │ new-session │ │ │ │ │ # │ new-window │ F2 │ │ │ │ # │ next-window │ M-Right │ │ │ │ # │ previous-window │ M-Left │ │ │ │ From 1dc78a4842e45033bf3eb680c14d75dda284afbf Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 23 Jan 2025 14:11:23 +0100 Subject: [PATCH 212/253] tmux/prompts --- sh/tmux.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index d8ad473..a92e3d2 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -205,6 +205,10 @@ bind-key -n M-Right next-window # │ key │ prefix │ # ╰─────┴────────╯ +# rename +bind-key C-s command-prompt 'rename-session %%' +bind-key C-w command-prompt 'rename-window %%' + # split window bind-key h split-window -h bind-key v split-window -v @@ -226,7 +230,7 @@ bind-key M-Right swap-window -t +1 # ╭────────────────────────────────────┼───────────┼─────────┼─────┼─────┤ # │ command-prompt 'rename-session %%' │ │ C-s │ │ │ # │ command-prompt 'rename-window %%' │ │ C-w │ │ │ -# │ detach-client │ F6 │ │ │ d │ +# │ detach-client │ │ │ │ d │ # │ new-session │ │ │ │ │ # │ new-window │ F2 │ │ │ │ # │ next-window │ M-Right │ │ │ │ From 6d78413418ba675aed38f037a6e259611fe8648f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 23 Jan 2025 14:41:58 +0100 Subject: [PATCH 213/253] tmux/shrink --- sh/tmux.sh | 74 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index a92e3d2..a99a738 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -206,53 +206,55 @@ bind-key -n M-Right next-window # ╰─────┴────────╯ # rename -bind-key C-s command-prompt 'rename-session %%' -bind-key C-w command-prompt 'rename-window %%' +bind-key C-s command-prompt { rename-session '%%' } +bind-key C-w command-prompt { rename-window '%%' } # split window bind-key h split-window -h bind-key v split-window -v -# reload configuration -bind-key r source-file ${file} \\; display-message 'source-file ${file}' - # toggle mouse bind-key t set-option -g mouse \\; display-message 'mouse = #{mouse}' +# reload configuration +bind-key r source-file ${file} \\; display-message 'source-file ${file}' + # swap window bind-key M-Left swap-window -t -1 bind-key M-Right swap-window -t +1 -# ╭───────────╮ -# │ default │ -# ╭───────────┬─────────┼─────┬─────┤ -# │ -n │ F12 │ -n │ C-b │ -# ╭────────────────────────────────────┼───────────┼─────────┼─────┼─────┤ -# │ command-prompt 'rename-session %%' │ │ C-s │ │ │ -# │ command-prompt 'rename-window %%' │ │ C-w │ │ │ -# │ detach-client │ │ │ │ d │ -# │ new-session │ │ │ │ │ -# │ new-window │ F2 │ │ │ │ -# │ next-window │ M-Right │ │ │ │ -# │ previous-window │ M-Left │ │ │ │ -# │ select-pane -D │ C-S-Down │ │ │ │ -# │ select-pane -L │ C-S-Left │ │ │ │ -# │ select-pane -R │ C-S-Right │ │ │ │ -# │ select-pane -U │ C-S-Up │ │ │ │ -# │ set-option -g mouse │ │ t │ │ │ -# │ set-option -g status off │ C-F10 │ │ │ │ -# │ set-option -g status on │ C-F1 │ │ │ │ -# │ set-option -g status 2 │ C-F2 │ │ │ │ -# │ set-option -g status 3 │ C-F3 │ │ │ │ -# │ set-option -g status 4 │ C-F4 │ │ │ │ -# │ set-option -g status 5 │ C-F5 │ │ │ │ -# │ source-file │ │ r │ │ │ -# │ split-window -h │ │ h │ │ % │ -# │ split-window -v │ │ v │ │ \" │ -# │ swap-window -t -1 │ │ M-Left │ │ │ -# │ swap-window -t +1 │ │ M-Right │ │ │ -# │ switch-client -n │ M-Down │ │ │ │ -# │ switch-client -p │ M-Up │ │ │ │ -# ╰────────────────────────────────────┴───────────┴─────────┴─────┴─────╯ +# ╭─────────────╮ +# │ default │ +# ╭───────────┬─────────┼─────┬───────┤ +# │ -n │ F12 │ -n │ C-b │ +# ╭───────────────────┼───────────┼─────────┼─────┼───────┤ +# │ command-prompt │ │ │ │ : │ +# │ copy-mode │ │ │ │ PPage │ +# │ detach-client │ │ │ │ d │ +# │ new-session │ │ │ │ │ +# │ new-window │ F2 │ │ │ c │ +# │ next-window │ M-Right │ │ │ n │ +# │ previous-window │ M-Left │ │ │ p │ +# │ rename-session │ │ C-s │ │ │ +# │ rename-window │ │ C-w │ │ │ +# │ select-pane -D │ C-S-Down │ │ │ │ +# │ select-pane -L │ C-S-Left │ │ │ │ +# │ select-pane -R │ C-S-Right │ │ │ │ +# │ select-pane -U │ C-S-Up │ │ │ │ +# │ set -g mouse │ │ t │ │ │ +# │ set -g status off │ C-F10 │ │ │ │ +# │ set -g status on │ C-F1 │ │ │ │ +# │ set -g status 2 │ C-F2 │ │ │ │ +# │ set -g status 3 │ C-F3 │ │ │ │ +# │ set -g status 4 │ C-F4 │ │ │ │ +# │ set -g status 5 │ C-F5 │ │ │ │ +# │ source-file │ │ r │ │ │ +# │ split-window -h │ │ h │ │ % │ +# │ split-window -v │ │ v │ │ \" │ +# │ swap-window -t -1 │ │ M-Left │ │ │ +# │ swap-window -t +1 │ │ M-Right │ │ │ +# │ switch-client -n │ M-Down │ │ │ │ +# │ switch-client -p │ M-Up │ │ │ │ +# ╰───────────────────┴───────────┴─────────┴─────┴───────╯ " } From 302890f00db71497f1f265bd15adf8cc3ff210a0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 25 Jan 2025 12:24:31 +0100 Subject: [PATCH 214/253] tmux/prefix --- sh/tmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index a99a738..7d18222 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -99,7 +99,7 @@ set-option -g status-format[0] '\ #[align=right]\ #[bg=##202020] #[bg=##303030] \ #[fg=yellow]%H:%M:%S\ -#[bg=##303030] #[bg=##202020] \ +#[bg=##303030] #{?client_prefix,#[bg=green],#[bg=##202020]} \ ' # line 2 From 0151ba035bb8b691a8f09c0a6d25475ae4ae8b7a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 25 Jan 2025 12:30:19 +0100 Subject: [PATCH 215/253] tmux/zoom --- sh/tmux.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sh/tmux.sh b/sh/tmux.sh index 7d18222..e769ee2 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -237,6 +237,7 @@ bind-key M-Right swap-window -t +1 # │ previous-window │ M-Left │ │ │ p │ # │ rename-session │ │ C-s │ │ │ # │ rename-window │ │ C-w │ │ │ +# │ resize-pane -Z │ │ │ │ z │ # │ select-pane -D │ C-S-Down │ │ │ │ # │ select-pane -L │ C-S-Left │ │ │ │ # │ select-pane -R │ C-S-Right │ │ │ │ From 1d5bf4474f9cba4c61848ab7368d67764f4d8297 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 26 Jan 2025 14:29:51 +0100 Subject: [PATCH 216/253] tmux/prefix,zoom --- sh/tmux.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index e769ee2..df343eb 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -87,8 +87,11 @@ set-option -g status-fg white # line 1 set-option -g status-format[0] '\ #{W:\ -#[bg=##202020] #[bg=##303030] \ -#[fg=yellow]#{window_index}\ +#[fg=yellow]\ +#[bg=##202020]\ +#{?window_zoomed_flag,z, }\ +#[bg=##303030] \ +#{window_index}\ \ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=blue]}}\ @@ -99,7 +102,7 @@ set-option -g status-format[0] '\ #[align=right]\ #[bg=##202020] #[bg=##303030] \ #[fg=yellow]%H:%M:%S\ -#[bg=##303030] #{?client_prefix,#[bg=green],#[bg=##202020]} \ +#[bg=##303030] #[bg=##202020]#{?client_prefix,p, }\ ' # line 2 From a273d2ea43cbb1230deb496fd5d10697dd163afd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 26 Jan 2025 14:41:08 +0100 Subject: [PATCH 217/253] tmux/zoom,prefix --- sh/tmux.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sh/tmux.sh b/sh/tmux.sh index df343eb..d9813e1 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -87,11 +87,10 @@ set-option -g status-fg white # line 1 set-option -g status-format[0] '\ #{W:\ -#[fg=yellow]\ -#[bg=##202020]\ -#{?window_zoomed_flag,z, }\ -#[bg=##303030] \ -#{window_index}\ +#[bg=##202020] #[bg=##303030]\ +#{?window_zoomed_flag,#[fg=magenta][, }\ +#[fg=yellow]#{window_index}\ +#{?window_zoomed_flag,#[fg=magenta]], }\ \ #{?window_active,#[fg=green],\ #{?window_activity_flag,#[fg=red],#[fg=blue]}}\ @@ -102,7 +101,8 @@ set-option -g status-format[0] '\ #[align=right]\ #[bg=##202020] #[bg=##303030] \ #[fg=yellow]%H:%M:%S\ -#[bg=##303030] #[bg=##202020]#{?client_prefix,p, }\ +#[bg=##303030] #[bg=##202020]\ +#{?client_prefix,#[fg=green]p, }\ ' # line 2 From 3ba4859231aafc26a790855725369b33ad398770 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 28 Jan 2025 09:21:42 +0100 Subject: [PATCH 218/253] ffmpeg/hdmi --- sh/ffmpeg.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh index 1032688..9943524 100644 --- a/sh/ffmpeg.sh +++ b/sh/ffmpeg.sh @@ -54,7 +54,7 @@ rwx_ffmpeg_input_file() { for argument in "${@}"; do echo "${argument}"; done } -rwx_ffmpeg_input_nearstream_ccd10() { +rwx_ffmpeg_input_hdmi() { local device="${1}" [ -n "${device}" ] || device="/dev/video0" set -- \ @@ -130,11 +130,11 @@ rwx_ffmpeg_output_video_slow() { # │ ffmpeg │ record │ # ╰────────┴────────╯ -rwx_ffmpeg_record_ccd10_yeti() { +rwx_ffmpeg_record_hdmi_yeti() { local file="${1}" [ -n "${file}" ] || return set -- \ - $(rwx_ffmpeg_input_nearstream_ccd10) \ + $(rwx_ffmpeg_input_hdmi) \ $(rwx_ffmpeg_input_blue_yeti) \ $(rwx_ffmpeg_output_video_fast) \ $(rwx_ffmpeg_output_audio_fast) \ From 657636b9c4605c903ddb379e6dfc95e687068c1f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 28 Jan 2025 09:38:27 +0100 Subject: [PATCH 219/253] ffmpeg/precision --- sh/ffmpeg.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh index 9943524..57f9d21 100644 --- a/sh/ffmpeg.sh +++ b/sh/ffmpeg.sh @@ -38,6 +38,18 @@ usb-Generic_Blue_Microphones_2051BAB04XY8-00.analog-stereo" for argument in "${@}"; do echo "${argument}"; done } +rwx_ffmpeg_input_dell_precision() { + local device="alsa_input.\ +pci-0000_00_1f.3.analog-stereo" + set -- \ + -f "pulse" \ + -i "${device}" \ + -ac "2" \ + -ar "48000" + local argument + for argument in "${@}"; do echo "${argument}"; done +} + rwx_ffmpeg_input_file() { local file="${1}" local from="${2}" @@ -130,6 +142,19 @@ rwx_ffmpeg_output_video_slow() { # │ ffmpeg │ record │ # ╰────────┴────────╯ +rwx_ffmpeg_record_hdmi_precision() { + local file="${1}" + [ -n "${file}" ] || return + set -- \ + $(rwx_ffmpeg_input_hdmi) \ + $(rwx_ffmpeg_input_dell_precision) \ + $(rwx_ffmpeg_output_video_fast) \ + $(rwx_ffmpeg_output_audio_fast) \ + $(rwx_ffmpeg_output_file "${file}") + echo "${@}" + ffmpeg "${@}" +} + rwx_ffmpeg_record_hdmi_yeti() { local file="${1}" [ -n "${file}" ] || return From 2ce78087c446611fefc53ef45460de757c077931 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 18:01:41 +0100 Subject: [PATCH 220/253] mypy --- sh/lint/mypy.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sh/lint/mypy.sh diff --git a/sh/lint/mypy.sh b/sh/lint/mypy.sh new file mode 100644 index 0000000..586d409 --- /dev/null +++ b/sh/lint/mypy.sh @@ -0,0 +1,4 @@ +rwx_mypy() { + local path="${1}" + mypy "${path}" +} From a5d8c672602136c63f7938ab9824a3a60ae9d29d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 18:26:00 +0100 Subject: [PATCH 221/253] pydoclint --- sh/lint/pydoclint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sh/lint/pydoclint.sh diff --git a/sh/lint/pydoclint.sh b/sh/lint/pydoclint.sh new file mode 100644 index 0000000..d2eb72f --- /dev/null +++ b/sh/lint/pydoclint.sh @@ -0,0 +1,9 @@ +rwx_pydoclint() { + local path="${1}" + pydoclint \ + --allow-init-docstring True \ + --quiet \ + --skip-checking-short-docstrings False \ + --style "sphinx" \ + "${path}" +} From 5a89616f5c3bb301c23f491a893c6a433bd375cc Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 18:31:24 +0100 Subject: [PATCH 222/253] lint python --- sh/lint/python.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sh/lint/python.sh diff --git a/sh/lint/python.sh b/sh/lint/python.sh new file mode 100644 index 0000000..ab3a735 --- /dev/null +++ b/sh/lint/python.sh @@ -0,0 +1,10 @@ +# lint python code +rwx_python_lint() { + local path="${1}" + # check pydoc + rwx_log "pydoc" + pydoclint "${path}" + # check typing + rwx_log "mypy" + mypy "${path}" +} From e4178bda5d7d7be1d0e1bfb0e7291a03978fafe2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 18:42:58 +0100 Subject: [PATCH 223/253] python/ruff --- sh/lint/python.sh | 7 +++++-- sh/lint/ruff.sh | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 sh/lint/ruff.sh diff --git a/sh/lint/python.sh b/sh/lint/python.sh index ab3a735..6f4cef2 100644 --- a/sh/lint/python.sh +++ b/sh/lint/python.sh @@ -3,8 +3,11 @@ rwx_python_lint() { local path="${1}" # check pydoc rwx_log "pydoc" - pydoclint "${path}" + rwx_pydoclint "${path}" # check typing rwx_log "mypy" - mypy "${path}" + rwx_mypy "${path}" + # ruff + rwx_log "ruff" + rwx_ruff "${path}" } diff --git a/sh/lint/ruff.sh b/sh/lint/ruff.sh new file mode 100644 index 0000000..89757f2 --- /dev/null +++ b/sh/lint/ruff.sh @@ -0,0 +1,13 @@ +rwx_ruff() { + local path="${1}" + rwx_ruff_format \ + "${path}" +} + +rwx_ruff_format() { + local path="${1}" + ruff format \ + --diff \ + --line-length 80 \ + "${path}" +} From 0dd0c5fd8f60cffd9f9a1bf1f4a987db465f2278 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 22:38:28 +0100 Subject: [PATCH 224/253] ruff/format --- rwx/ps/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rwx/ps/__init__.py b/rwx/ps/__init__.py index 82c9640..32740d1 100644 --- a/rwx/ps/__init__.py +++ b/rwx/ps/__init__.py @@ -72,7 +72,9 @@ def run_lines( :rtype: list[str] """ process = subprocess.run( - get_tuples_args(*items), capture_output=True, check=True + get_tuples_args(*items), + capture_output=True, + check=True, ) string = process.stdout.decode(charset) return string.rstrip().splitlines() From 3a2d8d9d4f900b172576799750c340a2ef1a85d3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 22:44:26 +0100 Subject: [PATCH 225/253] ruff/com812 --- rwx/fs/__init__.py | 2 +- rwx/ps/__init__.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index 0772a8d..1873da2 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -61,7 +61,7 @@ def get_path_mount(path: Path) -> Path: "stat", ("--format", "%m"), str(path), - ) + ), ) diff --git a/rwx/ps/__init__.py b/rwx/ps/__init__.py index 32740d1..81d2320 100644 --- a/rwx/ps/__init__.py +++ b/rwx/ps/__init__.py @@ -43,7 +43,9 @@ def run(*items: str | tuple[str, ...]) -> subprocess.CompletedProcess: :rtype: subprocess.CompletedProcess """ return subprocess.run( - get_tuples_args(*items), capture_output=False, check=True + get_tuples_args(*items), + capture_output=False, + check=True, ) @@ -61,7 +63,8 @@ def run_line(*items: str | tuple[str, ...], charset: str = txt.CHARSET) -> str: def run_lines( - *items: str | tuple[str, ...], charset: str = txt.CHARSET + *items: str | tuple[str, ...], + charset: str = txt.CHARSET, ) -> list[str]: """Run and return output lines. From 1bba63ac1477dd55f6d151d005ea6fdc5a858963 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 22:58:09 +0100 Subject: [PATCH 226/253] pyproject --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1d231ec..0476e89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [] description = "Read Write eXecute" dynamic = ["version"] keywords = [] -license-files = { paths = ["license.md"] } +license-files = ["license.md"] name = "rwx" readme = "readme.md" requires-python = ">= 3.11" @@ -41,5 +41,5 @@ style = "sphinx" line-length = 80 [tool.ruff.lint] -ignore = ["COM812", "D203", "D213", "ISC001"] +ignore = ["D203", "D213"] select = ["ALL"] From 007994bfea4a26f4bf7ba5701aeecb6f605f4562 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 23:03:03 +0100 Subject: [PATCH 227/253] ruff/check --- sh/lint/ruff.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sh/lint/ruff.sh b/sh/lint/ruff.sh index 89757f2..8874cab 100644 --- a/sh/lint/ruff.sh +++ b/sh/lint/ruff.sh @@ -1,6 +1,19 @@ rwx_ruff() { local path="${1}" - rwx_ruff_format \ + local action + set \ + "check" \ + "format" + for action in "${@}"; do + "rwx_ruff_${action}" "${path}" + done +} + +rwx_ruff_check() { + local path="${1}" + ruff check \ + --select "ALL" \ + --ignore "D203,D213" \ "${path}" } From 0d5d3aa5ba749cfc10adac096d10e58736b66ca9 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 23:28:06 +0100 Subject: [PATCH 228/253] pylint --- sh/lint/pylint.sh | 6 ++++++ sh/lint/python.sh | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 sh/lint/pylint.sh diff --git a/sh/lint/pylint.sh b/sh/lint/pylint.sh new file mode 100644 index 0000000..52e1bd1 --- /dev/null +++ b/sh/lint/pylint.sh @@ -0,0 +1,6 @@ +rwx_pylint() { + local path="${1}" + pylint \ + --enable-all-extensions \ + "${path}/**/*.py" +} diff --git a/sh/lint/python.sh b/sh/lint/python.sh index 6f4cef2..7e8abdf 100644 --- a/sh/lint/python.sh +++ b/sh/lint/python.sh @@ -1,6 +1,9 @@ # lint python code rwx_python_lint() { local path="${1}" + # pylint + rwx_log "pylint" + rwx_pylint "${path}" # check pydoc rwx_log "pydoc" rwx_pydoclint "${path}" From 98aff4baa89db97efb3f007ee964c34c8847310f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 23:31:44 +0100 Subject: [PATCH 229/253] python/lint --- sh/lint/python.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/sh/lint/python.sh b/sh/lint/python.sh index 7e8abdf..bdee7bc 100644 --- a/sh/lint/python.sh +++ b/sh/lint/python.sh @@ -1,16 +1,14 @@ # lint python code rwx_python_lint() { local path="${1}" - # pylint - rwx_log "pylint" - rwx_pylint "${path}" - # check pydoc - rwx_log "pydoc" - rwx_pydoclint "${path}" - # check typing - rwx_log "mypy" - rwx_mypy "${path}" - # ruff - rwx_log "ruff" - rwx_ruff "${path}" + local action + set \ + "pylint" \ + "pydoclint" \ + "mypy" \ + "ruff" + for action in "${@}"; do + rwx_log "${action}" + "rwx_${action}" "${path}" + done } From dca2637f81bba0a5dabf8ff979e7f268a4a98d53 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 23:32:49 +0100 Subject: [PATCH 230/253] mv --- sh/lint/{python.sh => lint.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sh/lint/{python.sh => lint.sh} (100%) diff --git a/sh/lint/python.sh b/sh/lint/lint.sh similarity index 100% rename from sh/lint/python.sh rename to sh/lint/lint.sh From 9d45c0285c06b56f21f51cb94dae3609a1ed094a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 23:34:44 +0100 Subject: [PATCH 231/253] lint/shell --- sh/lint/lint.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index bdee7bc..a41a166 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -1,5 +1,5 @@ # lint python code -rwx_python_lint() { +rwx_lint_python() { local path="${1}" local action set \ @@ -12,3 +12,16 @@ rwx_python_lint() { "rwx_${action}" "${path}" done } + +# lint shell code +rwx_lint_shell() { + local path="${1}" + local action + set \ + "shellcheck" \ + "shfmt" + for action in "${@}"; do + rwx_log "${action}" + "rwx_${action}" "${path}" + done +} From be49eab2f4debfde3c67cd52a386253adbb7430f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 23:37:33 +0100 Subject: [PATCH 232/253] lint --- sh/lint/lint.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index a41a166..90cef0c 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -1,3 +1,16 @@ +# lint code +rwx_lint() { + local path="${1}" + local code + set \ + "python" \ + "shell" + for code in "${@}"; do + rwx_log "${code}" + "rwx_lint_${code}" "${path}" + done +} + # lint python code rwx_lint_python() { local path="${1}" From 98adf0b2a1a4819fa76db2b3c63a22d256e5d390 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 23:51:48 +0100 Subject: [PATCH 233/253] gitlint --- sh/lint/gitlint.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sh/lint/gitlint.sh diff --git a/sh/lint/gitlint.sh b/sh/lint/gitlint.sh new file mode 100644 index 0000000..643333c --- /dev/null +++ b/sh/lint/gitlint.sh @@ -0,0 +1,6 @@ +rwx_gitlint() { + local path="${1}" + gitlint \ + --target "${path}" \ + "lint" +} From 2635d74f910985fa9aee11f1bb3d841cc8e49694 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 00:23:47 +0100 Subject: [PATCH 234/253] =?UTF-8?q?ruff/check=E2=86=94format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- sh/lint/ruff.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0476e89..436119b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,5 +41,5 @@ style = "sphinx" line-length = 80 [tool.ruff.lint] -ignore = ["D203", "D213"] +ignore = ["D203", "D213", "COM812", "ISC001"] select = ["ALL"] diff --git a/sh/lint/ruff.sh b/sh/lint/ruff.sh index 8874cab..7750ed1 100644 --- a/sh/lint/ruff.sh +++ b/sh/lint/ruff.sh @@ -14,6 +14,7 @@ rwx_ruff_check() { ruff check \ --select "ALL" \ --ignore "D203,D213" \ + --ignore "COM812,ISC001" \ "${path}" } From e2b8bdbc0a6fa0afd05ab3b1ed77a3daae105d70 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 00:31:29 +0100 Subject: [PATCH 235/253] format/isolated --- sh/lint/ruff.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/lint/ruff.sh b/sh/lint/ruff.sh index 7750ed1..0352795 100644 --- a/sh/lint/ruff.sh +++ b/sh/lint/ruff.sh @@ -22,6 +22,7 @@ rwx_ruff_format() { local path="${1}" ruff format \ --diff \ - --line-length 80 \ + --isolated \ + --line-length "80" \ "${path}" } From b41fe30bf378bc7029578cc5744e0e4abd39896a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 00:33:21 +0100 Subject: [PATCH 236/253] check/isolated --- sh/lint/ruff.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/lint/ruff.sh b/sh/lint/ruff.sh index 0352795..e15b701 100644 --- a/sh/lint/ruff.sh +++ b/sh/lint/ruff.sh @@ -12,9 +12,9 @@ rwx_ruff() { rwx_ruff_check() { local path="${1}" ruff check \ - --select "ALL" \ --ignore "D203,D213" \ - --ignore "COM812,ISC001" \ + --isolated \ + --select "ALL" \ "${path}" } From 75628cac57a291180143b60cc65b199e74d0d1d2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 00:37:30 +0100 Subject: [PATCH 237/253] lint/import --- rwx/fs/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index 1873da2..8a45288 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -2,9 +2,10 @@ import os import shutil -import tomllib from pathlib import Path +import tomllib + from rwx import ps CHARSET = "UTF-8" From ce62a934d8e5b42d2cb587f1d5817251b40f8032 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 00:45:13 +0100 Subject: [PATCH 238/253] =?UTF-8?q?=E2=88=92pyproject/tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 436119b..7a3d9c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,16 +30,3 @@ requires-python = ">= 3.11" [tool.hatch.version] path = "rwx/__init__.py" - -[tool.pydoclint] -allow-init-docstring = true -quiet = true -skip-checking-short-docstrings = false -style = "sphinx" - -[tool.ruff] -line-length = 80 - -[tool.ruff.lint] -ignore = ["D203", "D213", "COM812", "ISC001"] -select = ["ALL"] From 029d4ca10a4e7ab1d3eed12a8700ead191464c89 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 00:58:14 +0100 Subject: [PATCH 239/253] lint/tasks --- sh/lint/lint.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index 90cef0c..23c5f72 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -38,3 +38,20 @@ rwx_lint_shell() { "rwx_${action}" "${path}" done } + +# lint code tasks +rwx_lint_tasks() { + local path="${1}" + local type + set \ + "LATER" \ + "TODO" \ + "FIXME" + for type in "${@}"; do + rwx_log "${type}" + grep \ + --directories "recurse" \ + --line-number \ + "${type}" + done +} From 086222afd2edffabfdb633b24acffe7496785dc9 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 01:02:10 +0100 Subject: [PATCH 240/253] tasks/path --- sh/lint/lint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index 23c5f72..53629c9 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -52,6 +52,7 @@ rwx_lint_tasks() { grep \ --directories "recurse" \ --line-number \ - "${type}" + " ${type}" \ + "${path}" done } From bec792d29acd3f16d3111de94a16b96a699695de Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 01:18:13 +0100 Subject: [PATCH 241/253] lint/clean --- sh/lint/lint.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index 53629c9..a340d0a 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -11,6 +11,20 @@ rwx_lint() { done } +# clean +rwx_lint_clean() { + local path="${1}" + [ -n "${path}" ] || exit 1 + local tool + set \ + "mypy" \ + "ruff" + for tool in "${@}"; do + rwx_log "${tool}" + rwx_remove "${path}/.${tool}_cache" + done +} + # lint python code rwx_lint_python() { local path="${1}" From 7cea09aedca0450a1f1da9f1bc056b523b14aa23 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 01:27:04 +0100 Subject: [PATCH 242/253] lint/py3clean --- sh/lint/lint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index a340d0a..9f34299 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -15,10 +15,14 @@ rwx_lint() { rwx_lint_clean() { local path="${1}" [ -n "${path}" ] || exit 1 - local tool + rwx_log "py3clean" + py3clean \ + --verbose \ + "${path}" set \ "mypy" \ "ruff" + local tool for tool in "${@}"; do rwx_log "${tool}" rwx_remove "${path}/.${tool}_cache" From 486b7cea1dacb8cb3c2b056c2eff91e960d9a6ab Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 01:29:47 +0100 Subject: [PATCH 243/253] lint/clean --- sh/lint/lint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index 9f34299..5448563 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -1,14 +1,17 @@ # lint code rwx_lint() { local path="${1}" - local code + [ -n "${path}" ] || exit 1 + rwx_lint_clean set \ "python" \ "shell" + local code for code in "${@}"; do rwx_log "${code}" "rwx_lint_${code}" "${path}" done + rwx_lint_clean } # clean From 5a88d127d69882010c4ef1dcbc384bd24998977d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 01:30:54 +0100 Subject: [PATCH 244/253] lint/return --- sh/lint/lint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index 5448563..3240fd0 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -1,7 +1,7 @@ # lint code rwx_lint() { local path="${1}" - [ -n "${path}" ] || exit 1 + [ -n "${path}" ] || return 1 rwx_lint_clean set \ "python" \ @@ -17,7 +17,7 @@ rwx_lint() { # clean rwx_lint_clean() { local path="${1}" - [ -n "${path}" ] || exit 1 + [ -n "${path}" ] || return 1 rwx_log "py3clean" py3clean \ --verbose \ From a98294a65ee18b2d1516a664ed33da6f01c9d2c1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 01:32:33 +0100 Subject: [PATCH 245/253] fix --- sh/lint/lint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index 3240fd0..b0d9909 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -2,7 +2,7 @@ rwx_lint() { local path="${1}" [ -n "${path}" ] || return 1 - rwx_lint_clean + rwx_lint_clean "${path}" set \ "python" \ "shell" @@ -11,7 +11,7 @@ rwx_lint() { rwx_log "${code}" "rwx_lint_${code}" "${path}" done - rwx_lint_clean + rwx_lint_clean "${path}" } # clean From 459e85de929e277e00da51fa214f627a15541f94 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 01:38:15 +0100 Subject: [PATCH 246/253] tasks/after --- sh/lint/lint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index b0d9909..6aa96b4 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -3,6 +3,7 @@ rwx_lint() { local path="${1}" [ -n "${path}" ] || return 1 rwx_lint_clean "${path}" + rwx_lint_tasks "${path}" set \ "python" \ "shell" @@ -71,6 +72,7 @@ rwx_lint_tasks() { for type in "${@}"; do rwx_log "${type}" grep \ + --after "1" \ --directories "recurse" \ --line-number \ " ${type}" \ From 2c0d6050efbaeaac84fd61f28bb512760e3bea28 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Feb 2025 01:47:12 +0100 Subject: [PATCH 247/253] log/"" --- sh/lint/lint.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index 6aa96b4..6cd7533 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -9,7 +9,7 @@ rwx_lint() { "shell" local code for code in "${@}"; do - rwx_log "${code}" + rwx_log "" "${code}" "rwx_lint_${code}" "${path}" done rwx_lint_clean "${path}" @@ -19,7 +19,7 @@ rwx_lint() { rwx_lint_clean() { local path="${1}" [ -n "${path}" ] || return 1 - rwx_log "py3clean" + rwx_log "" "py3clean" py3clean \ --verbose \ "${path}" @@ -28,7 +28,7 @@ rwx_lint_clean() { "ruff" local tool for tool in "${@}"; do - rwx_log "${tool}" + rwx_log "" "${tool}" rwx_remove "${path}/.${tool}_cache" done } @@ -43,7 +43,7 @@ rwx_lint_python() { "mypy" \ "ruff" for action in "${@}"; do - rwx_log "${action}" + rwx_log "" "${action}" "rwx_${action}" "${path}" done } @@ -56,7 +56,7 @@ rwx_lint_shell() { "shellcheck" \ "shfmt" for action in "${@}"; do - rwx_log "${action}" + rwx_log "" "${action}" "rwx_${action}" "${path}" done } @@ -70,7 +70,7 @@ rwx_lint_tasks() { "TODO" \ "FIXME" for type in "${@}"; do - rwx_log "${type}" + rwx_log "" "${type}" grep \ --after "1" \ --directories "recurse" \ From bd35b13f73d1e69cc6a4cbe0a083c79f743751f2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 3 Feb 2025 19:15:34 +0100 Subject: [PATCH 248/253] future --- rwx/grub/__init__.py | 2 ++ rwx/ps/__init__.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/rwx/grub/__init__.py b/rwx/grub/__init__.py index 572b13e..aa208c3 100644 --- a/rwx/grub/__init__.py +++ b/rwx/grub/__init__.py @@ -1,5 +1,7 @@ """Wrap GRUB commands.""" +from __future__ import annotations + from rwx import cmd, ps cmd.need("grub-mkimage") diff --git a/rwx/ps/__init__.py b/rwx/ps/__init__.py index 81d2320..3bef50d 100644 --- a/rwx/ps/__init__.py +++ b/rwx/ps/__init__.py @@ -1,5 +1,7 @@ """Handle processes.""" +from __future__ import annotations + import subprocess from rwx import Object, txt From 024172af9d81c5e758c76dc144a1d056962a83e0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 3 Feb 2025 19:21:15 +0100 Subject: [PATCH 249/253] members --- sh/rescue/hetzner.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sh/rescue/hetzner.sh b/sh/rescue/hetzner.sh index 9d22847..24d6bd0 100644 --- a/sh/rescue/hetzner.sh +++ b/sh/rescue/hetzner.sh @@ -63,6 +63,8 @@ rwx_rescue_wipe_0_init_hetzner_8_8() { for device in "${@}"; do members="${members} ${device}2" done + # LATER alternative + # shellcheck disable=SC2086 rwx_fs_raid_create \ "boot" "00000000:00000000:00000000:00000002" ${members} # @@ -87,6 +89,8 @@ rwx_rescue_wipe_0_init_hetzner_8_8() { for device in "${@}"; do members="${members} ${device}1" done + # LATER alternative + # shellcheck disable=SC2086 rwx_fs_raid_create \ "crypt" "00000000:00000000:00000000:00000001" ${members} # encrypt From 3ef93255e9c441dd36084ea19c060beeb5e62b86 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 3 Feb 2025 19:29:02 +0100 Subject: [PATCH 250/253] ffmpeg --- sh/ffmpeg.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh index 57f9d21..ed20d40 100644 --- a/sh/ffmpeg.sh +++ b/sh/ffmpeg.sh @@ -145,6 +145,8 @@ rwx_ffmpeg_output_video_slow() { rwx_ffmpeg_record_hdmi_precision() { local file="${1}" [ -n "${file}" ] || return + # shellcheck disable=SC2046,SC2312 + # LATER alternative set -- \ $(rwx_ffmpeg_input_hdmi) \ $(rwx_ffmpeg_input_dell_precision) \ @@ -158,6 +160,8 @@ rwx_ffmpeg_record_hdmi_precision() { rwx_ffmpeg_record_hdmi_yeti() { local file="${1}" [ -n "${file}" ] || return + # shellcheck disable=SC2046,SC2312 + # LATER alternative set -- \ $(rwx_ffmpeg_input_hdmi) \ $(rwx_ffmpeg_input_blue_yeti) \ @@ -178,6 +182,8 @@ rwx_ffmpeg_reduce() { local from="${3}" local to="${4}" [ -n "${output}" ] || return + # shellcheck disable=SC2046,SC2312 + # LATER alternative set -- \ $(rwx_ffmpeg_input_file "${input}" "${from}" "${to}") \ $(rwx_ffmpeg_output_video_slow) \ From aaba7cbcc6f162633e2637da0fac7eda7c7efdcf Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 3 Feb 2025 19:38:50 +0100 Subject: [PATCH 251/253] =?UTF-8?q?=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/ffmpeg.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/ffmpeg.sh b/sh/ffmpeg.sh index ed20d40..bcb3a62 100644 --- a/sh/ffmpeg.sh +++ b/sh/ffmpeg.sh @@ -145,8 +145,8 @@ rwx_ffmpeg_output_video_slow() { rwx_ffmpeg_record_hdmi_precision() { local file="${1}" [ -n "${file}" ] || return - # shellcheck disable=SC2046,SC2312 # LATER alternative + # shellcheck disable=SC2046,SC2312 set -- \ $(rwx_ffmpeg_input_hdmi) \ $(rwx_ffmpeg_input_dell_precision) \ @@ -160,8 +160,8 @@ rwx_ffmpeg_record_hdmi_precision() { rwx_ffmpeg_record_hdmi_yeti() { local file="${1}" [ -n "${file}" ] || return - # shellcheck disable=SC2046,SC2312 # LATER alternative + # shellcheck disable=SC2046,SC2312 set -- \ $(rwx_ffmpeg_input_hdmi) \ $(rwx_ffmpeg_input_blue_yeti) \ @@ -182,8 +182,8 @@ rwx_ffmpeg_reduce() { local from="${3}" local to="${4}" [ -n "${output}" ] || return - # shellcheck disable=SC2046,SC2312 # LATER alternative + # shellcheck disable=SC2046,SC2312 set -- \ $(rwx_ffmpeg_input_file "${input}" "${from}" "${to}") \ $(rwx_ffmpeg_output_video_slow) \ From 7668ef8f47467facc2f966ff77c2fd043d06a7db Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 3 Feb 2025 19:42:09 +0100 Subject: [PATCH 252/253] lint/clean --- sh/lint/lint.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index 6cd7533..365773f 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -19,16 +19,13 @@ rwx_lint() { rwx_lint_clean() { local path="${1}" [ -n "${path}" ] || return 1 - rwx_log "" "py3clean" - py3clean \ - --verbose \ - "${path}" + rwx_log "" "clean" "" + py3clean "${path}" set \ "mypy" \ "ruff" local tool for tool in "${@}"; do - rwx_log "" "${tool}" rwx_remove "${path}/.${tool}_cache" done } From e511ffa7f7c102fe0244d9babe13c274f04ba240 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 7 Feb 2025 21:39:13 +0100 Subject: [PATCH 253/253] python/venv --- sh/python.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sh/python.sh diff --git a/sh/python.sh b/sh/python.sh new file mode 100644 index 0000000..44ea181 --- /dev/null +++ b/sh/python.sh @@ -0,0 +1,14 @@ +# ╭────────╮ +# │ python │ +# ╰────────╯ + +# ╭────────┬──────╮ +# │ python │ venv │ +# ╰────────┴──────╯ + +rwx_python_venv() { + local path="${1}" + [ -d "${path}" ] || return 1 + export VIRTUAL_ENV="${path}" && \ + export PATH="${VIRTUAL_ENV}/bin:${PATH}" +}