File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -827,6 +827,24 @@ impl Shelly {
827827 . into ( ) ,
828828 )
829829 . into ( ) ,
830+ tuple_row (
831+ shellcommand_hint_text ( theme. clone ( ) , "Hotkey" ) ,
832+ text_input_cell ( self . hotkey . clone ( ) . unwrap_or ( "" . to_string ( ) ) , & theme, "Hotkey" )
833+ . on_input ( {
834+ let shell = shell. clone ( ) ;
835+ move |input| {
836+ let old = shell. clone ( ) ;
837+ let mut new = old. clone ( ) ;
838+ new. hotkey = Some ( input) ;
839+ Message :: SetConfig ( SetConfigFields :: ShellCommands ( Editable :: Update {
840+ old,
841+ new,
842+ } ) )
843+ }
844+ } )
845+ . into ( ) ,
846+ )
847+ . into ( ) ,
830848 tuple_row (
831849 Button :: new ( "Delete" )
832850 . on_press ( Message :: SetConfig ( SetConfigFields :: ShellCommands (
@@ -837,7 +855,7 @@ impl Shelly {
837855 move |_, _| delete_button_style ( & theme)
838856 } )
839857 . into ( ) ,
840- notice_item ( theme. clone ( ) , "Icon path is optional" ) ,
858+ notice_item ( theme. clone ( ) , "Icon path and hotkey are optional" ) ,
841859 )
842860 . into ( ) ,
843861 ] )
You can’t perform that action at this time.
0 commit comments