Skip to content

Simple C utility to show or hide terminal on key press on Linux

Notifications You must be signed in to change notification settings

sealj553/termtoggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

termtoggle

If the terminal is running, this program will toggle its visibility. If the terminal is not running, it will be started with start_cmd. This is designed to be bound to a key (I use the backtick/tilde key) for ease of use. This probably only works for X11 on Linux.

This works just like tilde or guake/yakuake, except for any arbitrary terminal. You need the window title to be unique, ideally something you can set with command-line arguments.

main.c:

const char *target_name = "dropdown";

if you use st:

const char *start_cmd   = "st -t dropdown &";

or if you use alacritty:

const char *start_cmd   = "alacritty -t dropdown &";

TODO:

  • make it work properly with GNOME
  • optionally take target_name and start_cmd through command-line arguments
  • does this still work on Wayland??

About

Simple C utility to show or hide terminal on key press on Linux

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published