Skip to content

Commit

Permalink
fix: added <PATH> for completion
Browse files Browse the repository at this point in the history
  • Loading branch information
kRHYME7 committed Sep 5, 2024
1 parent 34882b5 commit 7784a9d
Show file tree
Hide file tree
Showing 6 changed files with 382 additions and 335 deletions.
14 changes: 12 additions & 2 deletions Hyde
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ theme() { #? Theme commands
Patch-Theme "${@}"
fi
;;
import) #? Import a theme from different repository.\nﯦ Invoking without args will launch a menu from Hyde-gallery DB
import) #? [*] Import a theme from different repository.\nﯦ Invoking without args will launch a menu from Hyde-gallery DB
shift
navigate_clone
if [[ -z "${*}" ]]; then
Expand All @@ -478,6 +478,11 @@ theme() { #? Theme commands
export SINGLE_THEME_ONLY=true
Patch-Theme "${@}"
fi
: <<USAGE
[THEME_IMPORT_USAGE]
<PATH>
[END]
USAGE
;;
# remove) #? Removes a theme from the system !! Unrecoverable
# :
Expand All @@ -490,12 +495,17 @@ theme() { #? Theme commands

wallpaper() { #? Wallpaper commands
case $1 in
set) #? Set /Path/to/Wallpaper
set) #? [*] Set /Path/to/Wallpaper
print_prompt +r "[deprecated] " +y "add 'wallAddCustomPath=( \"path/to/wallpapers\" \"...\" )' in '${hydeConfDir}/hyde.conf' instead"
shift
# cd - || exit
if [[ -z "${*}" ]] ; then echo "Missing /Path/to/Wallpaper: ${*}" ; exit 1 ; fi
"${scrDir}"/swwwallpaper.sh -s "${1}"
: <<USAGE
[WALLPAPER_SET_USAGE]
<PATH>
[END]
USAGE
;;
next) #? Next wallppaer
"${scrDir}"/swwwallpaper.sh -n
Expand Down
24 changes: 20 additions & 4 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,16 @@ Usage: Hyde [Function] [options]
[patch] ↪️
[import] ↪️ Import a theme from different repository.
[import] ↪️ [*] Import a theme from different repository.
💡Invoking without args will launch a menu from Hyde-gallery DB
[ <PATH>] ↪️
[wallpaper] ↪️ Wallpaper commands
[set] ↪️ Set /Path/to/Wallpaper
[set] ↪️ [*] Set /Path/to/Wallpaper
[ <PATH>] ↪️
[next] ↪️ Next wallppaer
Expand Down Expand Up @@ -207,11 +211,13 @@ Usage: Hyde [Function] [options]
[--persist ] ↪️ Saves bookmark file list to ~/.cache.So no re-caching after reboot
[--rasi <PATH>] ↪️ set rofi configuration
[--rebuild] ↪️ force rebuild cached bookmark paths
[ --deps] ↪️ check and resolve dependencies
[calc] ↪️ [*] Calculator (libqalculate)
[--rasi <PATH>] ↪️ set rofi configuration
[--reset] ↪️ Reset cache
[ --deps] ↪️ check and resolve dependencies
[emoji] ↪️ [*] Emoji selector
💡Add 'emoji_style=2'
Expand All @@ -220,16 +226,20 @@ Usage: Hyde [Function] [options]
[--style] ↪️ use style [ 1 | 2 ]
[--rasi <PATH>] ↪️ set rofi configuration
[ --deps] ↪️ check and resolve dependencies
[glyph] ↪️ [*] Glyph selector
[glyph] ↪️ Glyph selector
[--deps] ↪️ check and resolve dependencies
[pastebin] ↪️ [*] Pastebin manager
💡 pass [only once] '--ignore=initialclass' to disable autopaste
[--copy] ↪️ list and copy selected
[--copy] ↪️ list and copy selected
[--delete] ↪️ list and delete selected
[--wipe] ↪️ wipe database
[--option] ↪️ options
[--deps] ↪️ check and resolve dependencies
[screencap] ↪️ Use rofi to select screenshot options
!! kills another rofi session
Expand Down Expand Up @@ -282,6 +292,10 @@ Usage: Hyde [Function] [options]
Descriptions with [*] can be expanded to show more information. Append [--help]
Check for dependencies by appending '--deps' flag. eg ' Hyde show pastebin --deps '
Regenerate this 'man' page by appending '--reload' flag. 'Hyde man --reload'
Expand All @@ -304,4 +318,6 @@ Usage: Hyde-tool [Function] [options]
====================================================================================================================================================================
Descriptions with [*] can be expanded to show more information. Append [--help]
Regenerate this 'man' page by appending '--reload' flag. 'Hyde-tool man --reload'
```
73 changes: 37 additions & 36 deletions shell-completions/Hyde.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,46 @@ _Hyde () {
local words cword
_get_comp_words_by_ref -n "$COMP_WORDBREAKS" words cword

local -a literals=("revert" "--uninstall" "wallbash" "--copy" "--opacity" "-j" "theme" "save" "unset" "3" "--stop" "--animations" "backup" "BackUp" "list" "cursor" "--freeze" "-p" "--no-custom" "Config" "--install" "--scan" "--record-focus" "theme" "bookmarks" "0" "--reset" "toggle" "pastebin" "unset" "1" "systeminfo" "--all" "theme" "--delete" "upgrade" "toggle" "waybar" "reload" "update" "all" "glyph" "--wipe" "--print-monitor" "game" "shell" "Config" "info" "--style" "set" "reload" "reset" "on" "--animations" "code" "search" "version" "--site" "select" "--blur" "off" "variety" "clean" "calc" "airplane_mode" "reload" "--browser" "--print-snip" "--reset" "reload" "--rasi" "Clone" "--all" "check" "--all" "::=" "--mismatch" "prev" "--borderangle" "wallpaper" "--borderangle" "show" "-f" "inject" "power" "--persist" "binds" "rebuild" "screencap" "man" "asus_patch" "events" "override" "--rebuild" "--rasi" "--blur" "restore" "install" "-d" "info" "--browser" "sddm" "run" "set" "--option" "cache" "list" "control" "prev" "patch" "chaotic_aur" "--less" "mode" "--opacity" "--reset" "Link" "audio_idle" "--print-all" "next" "-h" "import" "--preserve" "size" "next" "branch" "select" "next" "size" "test" "flatpak" "Config" "screencap" "emoji" "--record-snip" "prev" "2" "--revert" "set" "select" "Package" "control")
local -a literals=("revert" "--uninstall" "wallbash" "--opacity" "-j" "theme" "save" "unset" "3" "--copy" "--animations" "--stop" "backup" "BackUp" "list" "cursor" "--deps" "-p" "--no-custom" "Config" "--freeze" "--install" "--scan" "--record-focus" "theme" "bookmarks" "0" "--reset" "toggle" "pastebin" "unset" "1" "systeminfo" "--all" "theme" "--delete" "upgrade" "toggle" "waybar" "reload" "update" "all" "--wipe" "--print-monitor" "game" "shell" "Config" "info" "--style" "reload" "code" "reset" "on" "--animations" "search" "--site" "version" "select" "--blur" "off" "variety" "clean" "calc" "airplane_mode" "reload" "--browser" "--print-snip" "--reset" "reload" "--rasi" "Clone" "--all" "check" "--all" "::=" "--mismatch" "prev" "--borderangle" "wallpaper" "--borderangle" "show" "-f" "inject" "power" "--persist" "binds" "rebuild" "screencap" "man" "asus_patch" "events" "override" "--rebuild" "--rasi" "--blur" "restore" "install" "-d" "info" "--browser" "sddm" "run" "set" "--option" "cache" "list" "control" "prev" "patch" "chaotic_aur" "--less" "mode" "--opacity" "--reset" "Link" "audio_idle" "--print-all" "next" "-h" "set" "--preserve" "size" "next" "branch" "select" "next" "size" "test" "flatpak" "import" "Config" "screencap" "emoji" "--record-snip" "prev" "2" "--revert" "set" "select" "Package" "glyph" "control")

declare -A literal_transitions
literal_transitions[0]="([84]=6 [73]=2 [39]=3 [56]=4 [2]=5 [35]=25 [23]=7 [101]=9 [102]=10 [124]=12 [105]=11 [37]=26 [45]=13 [107]=14 [89]=15 [31]=16 [12]=17 [79]=18 [15]=19 [81]=20 [83]=21 [92]=22 [54]=24 [96]=8 [38]=1)"
literal_transitions[2]="([139]=27 [46]=34)"
literal_transitions[5]="([36]=27 [112]=29)"
literal_transitions[6]="([27]=27 [44]=27 [7]=40 [51]=27 [8]=33)"
literal_transitions[7]="([58]=27 [118]=27 [137]=27 [120]=27 [109]=27 [108]=27)"
literal_transitions[8]="([115]=27 [19]=27 [13]=27 [71]=27)"
literal_transitions[9]="([103]=27 [29]=27 [99]=27 [106]=27 [128]=27 [97]=27)"
literal_transitions[10]="([64]=27 [116]=27 [91]=27 [131]=42)"
literal_transitions[11]="([87]=27 [69]=27)"
literal_transitions[13]="([138]=27)"
literal_transitions[14]="([130]=27)"
literal_transitions[17]="([14]=27 [40]=27 [62]=27 [0]=27)"
literal_transitions[18]="([61]=43 [125]=27 [49]=27 [123]=27 [77]=27)"
literal_transitions[19]="([65]=27 [47]=27 [122]=27 [33]=27)"
literal_transitions[20]="([132]=35 [63]=36 [41]=27 [86]=30 [24]=37 [88]=27 [55]=38 [28]=39)"
literal_transitions[21]="([90]=27 [129]=27 [110]=32)"
literal_transitions[24]="([6]=27)"
literal_transitions[26]="([127]=44 [134]=27 [50]=27 [126]=27 [140]=27)"
literal_transitions[29]="([25]=27 [30]=27 [135]=27 [9]=27)"
literal_transitions[30]="([5]=27 [119]=27 [17]=27 [82]=28 [98]=27)"
literal_transitions[32]="([1]=27 [20]=27 [136]=27)"
literal_transitions[33]="([4]=27 [53]=27 [80]=27 [95]=27 [74]=27)"
literal_transitions[34]="([121]=27 [111]=27 [76]=27)"
literal_transitions[35]="([48]=27 [70]=28)"
literal_transitions[36]="([26]=27 [94]=28)"
literal_transitions[37]="([93]=27 [18]=27 [85]=27 [70]=28 [66]=31)"
literal_transitions[38]="([57]=27 [100]=27 [94]=28 [26]=27)"
literal_transitions[39]="([104]=27 [34]=27 [42]=27 [3]=27)"
literal_transitions[40]="([52]=27 [11]=27 [59]=27 [60]=27 [78]=27 [113]=27 [72]=27)"
literal_transitions[41]="([75]=27)"
literal_transitions[42]="([10]=27 [133]=27 [22]=27 [43]=27 [16]=27 [114]=27 [67]=27 [117]=27 [21]=27)"
literal_transitions[43]="([68]=27)"
literal_transitions[44]="([32]=27)"
literal_transitions[0]="([83]=6 [72]=2 [40]=3 [56]=4 [2]=5 [36]=25 [24]=7 [100]=9 [101]=10 [123]=12 [104]=11 [38]=26 [45]=13 [106]=14 [88]=15 [32]=16 [12]=17 [78]=18 [15]=19 [80]=20 [82]=21 [91]=22 [50]=24 [95]=8 [39]=1)"
literal_transitions[2]="([139]=28 [46]=27)"
literal_transitions[5]="([37]=28 [111]=42)"
literal_transitions[6]="([28]=28 [44]=28 [6]=44 [51]=28 [7]=35)"
literal_transitions[7]="([57]=28 [117]=28 [137]=28 [108]=28 [129]=31 [107]=28)"
literal_transitions[8]="([114]=28 [19]=28 [13]=28 [70]=28)"
literal_transitions[9]="([102]=28 [30]=28 [98]=28 [105]=28 [127]=28 [96]=28)"
literal_transitions[10]="([63]=28 [115]=28 [90]=28 [131]=34)"
literal_transitions[11]="([86]=28 [68]=28)"
literal_transitions[13]="([138]=28)"
literal_transitions[14]="([130]=28)"
literal_transitions[17]="([14]=28 [41]=28 [61]=28 [0]=28)"
literal_transitions[18]="([60]=43 [119]=31 [122]=28 [124]=28 [76]=28)"
literal_transitions[19]="([64]=28 [47]=28 [121]=28 [34]=28)"
literal_transitions[20]="([132]=36 [62]=37 [85]=30 [25]=38 [87]=28 [54]=39 [140]=32 [29]=40)"
literal_transitions[21]="([89]=28 [128]=28 [109]=41)"
literal_transitions[24]="([5]=28)"
literal_transitions[26]="([126]=45 [134]=28 [49]=28 [125]=28 [141]=28)"
literal_transitions[27]="([120]=28 [110]=28 [75]=28)"
literal_transitions[29]="([74]=28)"
literal_transitions[30]="([4]=28 [118]=28 [17]=28 [81]=31 [97]=28)"
literal_transitions[32]="([16]=28)"
literal_transitions[34]="([11]=28 [133]=28 [23]=28 [43]=28 [20]=28 [113]=28 [66]=28 [116]=28 [22]=28)"
literal_transitions[35]="([3]=28 [53]=28 [79]=28 [94]=28 [73]=28)"
literal_transitions[36]="([16]=28 [69]=31 [48]=28)"
literal_transitions[37]="([16]=28 [27]=28 [93]=31)"
literal_transitions[38]="([65]=33 [92]=28 [18]=28 [84]=28 [69]=31 [16]=28)"
literal_transitions[39]="([55]=28 [99]=28 [93]=31 [27]=28)"
literal_transitions[40]="([103]=28 [35]=28 [42]=28 [9]=28 [16]=28)"
literal_transitions[41]="([1]=28 [21]=28 [136]=28)"
literal_transitions[42]="([26]=28 [31]=28 [135]=28 [8]=28)"
literal_transitions[43]="([67]=28)"
literal_transitions[44]="([52]=28 [10]=28 [58]=28 [59]=28 [77]=28 [112]=28 [71]=28)"
literal_transitions[45]="([33]=28)"

declare -A match_anything_transitions
match_anything_transitions=([25]=27 [1]=27 [3]=27 [28]=27 [16]=27 [12]=27 [31]=27 [0]=23 [15]=27 [4]=27 [22]=27 [23]=41)
match_anything_transitions=([23]=29 [25]=28 [1]=28 [3]=28 [12]=28 [16]=28 [31]=28 [0]=23 [33]=28 [15]=28 [4]=28 [22]=28)
declare -A subword_transitions

local state=0
Expand Down Expand Up @@ -117,7 +118,7 @@ _Hyde () {
fi

declare -A specialized_commands
specialized_commands=([28]=0)
specialized_commands=([31]=0)
if [[ -v "specialized_commands[$state]" ]]; then
local command_id=${specialized_commands[$state]}
local completions=()
Expand Down
Loading

0 comments on commit 7784a9d

Please sign in to comment.