Noice (thelemmy.club)
submitted 3 months ago by to c/linuxmemes@lemmy.world
 
you are viewing a single comment's thread
view the rest of the comments
[–] [S] 6 points 3 months ago (3 children)

Forgot to mention but only in fish shell.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 3 months ago (1 child)
  • [–] 2 points 3 months ago*

    I figured it out, at least in Linux Mint:

    1. Install Keysharp (which includes installing Microsoft's .NET 10 Runtime, but not SDK!)
    2. Put this in a .ks folder:

    !s::{ ; Press Alt+S to use sudo on the previous Terminal line
        KeyWait 's'
        If WinActive('ahk_exe gnome-terminal-server')
            Send 'sudo {!}{!}{Enter}'
    }
    

    Set it as a Startup Program with the command keysharp "(filepath)/(filename).ks" and it'll always be ready to go!

  • source
  • parent