From a5768d66d82f3795d9bdda756945c0446a2855c4 Mon Sep 17 00:00:00 2001 From: thek4n Date: Wed, 11 Dec 2024 01:23:03 +0300 Subject: [PATCH] termux shortcuts --- .../.shortcuts/{hideworkspaces.sh => hideWorkspaces} | 2 ++ home/user/.termux/termux.properties | 11 +++++++++++ install-hooks/termux/post-install | 11 +++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) rename home/user/.shortcuts/{hideworkspaces.sh => hideWorkspaces} (77%) diff --git a/home/user/.shortcuts/hideworkspaces.sh b/home/user/.shortcuts/hideWorkspaces similarity index 77% rename from home/user/.shortcuts/hideworkspaces.sh rename to home/user/.shortcuts/hideWorkspaces index 0bd3bbf..0a661f8 100755 --- a/home/user/.shortcuts/hideworkspaces.sh +++ b/home/user/.shortcuts/hideWorkspaces @@ -1 +1,3 @@ +#!/bin/sh + ssh pc DISPLAY=:0 xdotool key super+q \ No newline at end of file diff --git a/home/user/.termux/termux.properties b/home/user/.termux/termux.properties index 4ef5278..c5433af 100644 --- a/home/user/.termux/termux.properties +++ b/home/user/.termux/termux.properties @@ -1,5 +1,16 @@ enforce-char-based-input = true +# Open a new terminal with ctrl + t (volume down + t) +shortcut.create-session=ctrl + t + +# Go one session down with (for example) ctrl + 2 +shortcut.next-session=ctrl + 2 + +# Go one session up with (for example) ctrl + 1 +shortcut.previous-session=ctrl + 1 + +# Rename a session with (for example) ctrl + n +shortcut.rename-session=ctrl + n extra-keys = [ \ [ \ diff --git a/install-hooks/termux/post-install b/install-hooks/termux/post-install index dea5c5c..e484876 100755 --- a/install-hooks/termux/post-install +++ b/install-hooks/termux/post-install @@ -1,8 +1,11 @@ #!/bin/sh -if [ -d "$HOME/.shortcuts" ]; then - cp "$SUB/.shortcuts/*" "$HOME/.shortcuts" +if [ -d "${HOME}/.shortcuts" ]; then + cp "${SUB}/.shortcuts/"* "${HOME}/.shortcuts" else - cp -r "$SUB/.shortcuts" "$HOME" -fi \ No newline at end of file + cp -r "${SUB}/.shortcuts" "${HOME}" +fi + +mkdir -p "${HOME}/bin" +ln -s "$(which "${EDITOR}")" "${HOME}/bin/termux-file-editor" \ No newline at end of file