From 3b002ca77a3f9964b87ce84852a4d77a057a5606 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Wed, 16 Oct 2024 23:09:02 -0400 Subject: Write Documentation --- pos-dyntercomms.sh | 7 +++++-- pos-dyntercomms.sh.1.scd | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 pos-dyntercomms.sh.1.scd diff --git a/pos-dyntercomms.sh b/pos-dyntercomms.sh index 22e4a43..e9de0a3 100755 --- a/pos-dyntercomms.sh +++ b/pos-dyntercomms.sh @@ -8,7 +8,7 @@ setComms(){ activewmclass="$1" activetitle="$2" if ! test "$activewmclass"; then - json="$(hyprctl -j -i 0 activewindow)" + json="$(hyprctl -j activewindow)" activewmclass="$(printf "%s" "$json" | jq -r .class)" activetitle="$(printf "%s" "$json" | jq -r .title)" fi @@ -137,7 +137,7 @@ case "$activewmclass" in ;; *micro*) #Micro - c="'Prior','Next','Comma','Period','s','q','f','p','n','e','c','v','z','y'" + c="'Prior','Next','comma','period','s','q','f','p','n','e','c','v','z','y'" CHOICES=" $icon_prv Previous Tab ^ 1 ^ sxmo_type -M Alt , -m Alt $icon_nxt Next Tab ^ 1 ^ sxmo_type -M Alt . -m Alt @@ -514,6 +514,9 @@ case "$activewmclass" in c="'equal','minus','F','f','r','d','l'" WINNAME=Maps ;; + org.gnome.Loupe) + c="'Left','Right'" + ;; *mepo*) # Mepo # The choices / hotkeys for the contextmenu are generated through mepo's diff --git a/pos-dyntercomms.sh.1.scd b/pos-dyntercomms.sh.1.scd new file mode 100644 index 0000000..c66f9b3 --- /dev/null +++ b/pos-dyntercomms.sh.1.scd @@ -0,0 +1,34 @@ +pos-dyntercomms.sh(1) + +# NAME +phosh-osk-stub dynamic terminal commands - reconfigure terminal shortcuts automatically + +# SYNOPSIS + +*pos-dyntercomms.sh* _windowclass_ _WindowTitle_ + +*pos-dyntercomms.sh* + +*pos-dyntercomms.sh* _--watch_ + + +# OPTIONS +_--watch_ + Monitor the window title for changes over IPC. + +_windowclass_ + The class of the window (name of the running program) + +_WindowTitle_ + The title of the window + +# DESCRIPTION + +When ran with arguments _windowclass_ and _WindowTitle_, changes phosh-osk-stub's Terminal shortcuts to appropriate shortcuts for that program. + +When ran without arguments, picks up the _windowclass_ and _WindowTitle_ from the active compositor. (currently only works with Hyprland, using hyprctl). + +When ran with _--watch_, monitors the active compositor for title changes and changes the shortcuts as the title changes. (currently only works with Hyprland, using IPC). + +# SEE ALSO +*phosh-osk-stub*(1) *Hyprland*(1) *hyprctl*(1) -- cgit 1.4.1