File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Hike ChangeLog
2
2
3
+ ## Unreleased
4
+
5
+ ** Released: WiP**
6
+
7
+ - Added ` --theme ` as a command line switch; which lets the user configure
8
+ the theme via the command line.
9
+ ([ #74 ] ( https://github.com/davep/hike/pull/74 ) )
10
+
3
11
## v0.9.0
4
12
5
13
** Released: 2025-04-01**
Original file line number Diff line number Diff line change @@ -52,6 +52,13 @@ def get_args() -> Namespace:
52
52
action = "store_true" ,
53
53
)
54
54
55
+ # Add --theme
56
+ parser .add_argument (
57
+ "-t" ,
58
+ "--theme" ,
59
+ help = "Set the theme for the application (set to ? to list available themes)" ,
60
+ )
61
+
55
62
# The remainder is going to be the initial command.
56
63
parser .add_argument (
57
64
"command" ,
@@ -82,6 +89,14 @@ def show_bindable_commands() -> None:
82
89
)
83
90
84
91
92
+ ##############################################################################
93
+ def show_themes () -> None :
94
+ """Show the available themes."""
95
+ for theme in sorted (Hike (Namespace (theme = None )).available_themes ):
96
+ if theme != "textual-ansi" :
97
+ print (theme )
98
+
99
+
85
100
##############################################################################
86
101
def main () -> None :
87
102
"""The main entry point."""
@@ -90,6 +105,8 @@ def main() -> None:
90
105
print (cleandoc (Hike .HELP_LICENSE ))
91
106
elif args .bindings :
92
107
show_bindable_commands ()
108
+ elif args .theme == "?" :
109
+ show_themes ()
93
110
else :
94
111
Hike (args ).run ()
95
112
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ def __init__(self, arguments: Namespace) -> None:
64
64
configuration = load_configuration ()
65
65
if configuration .theme is not None :
66
66
try :
67
- self .theme = configuration .theme
67
+ self .theme = arguments . theme or configuration .theme
68
68
except InvalidThemeError :
69
69
pass
70
70
self .update_keymap (configuration .bindings )
You can’t perform that action at this time.
0 commit comments