Skip to content
samuelbaPublic

About

A drop-down terminal for Linux, written in Rust. Quake style drop- down terminal for Gnome, COSMIC and KDE.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Dropshade

Dropshade logo

CI Latest release License

A drop-down terminal for Linux, written in Rust. Press a hotkey and it slides down over your windows; press it again and it is gone.

Dropshade dropped down over the desktop, translucent, with a split tab and a tab bar on the left Dropshade Settings panel on the Appearance page: opacity, padding, tab bar, cursor and scrollbar

Dropshade is a native Wayland app built on iced and alacritty_terminal. Wayland leaves placement and staying on top to the compositor: on COSMIC, KDE Plasma, Sway, Hyprland and other compositors with layer shell, Dropshade does both itself. On GNOME, a small companion Shell extension handles them, plus the global hotkey and the slide animation.

Install and set up

Install it for your user, without sudo:

curl -fsSL https://samuelba.dev/dropshade/install.sh | sh

Run the same command again to update. It installs to ~/.local/bin and, on GNOME, also sets up the extension. The script is scripts/install.sh.

To also set up the GNOME extension while you are on another desktop:

curl -fsSL https://samuelba.dev/dropshade/install.sh | sh -s -- --gnome-extension

To remove Dropshade again (your configuration stays):

curl -fsSL https://samuelba.dev/dropshade/install.sh | sh -s -- --uninstall

To have your package manager install and update Dropshade instead, download the package for your machine from the latest release and install it:

sudo dnf install ./dropshade-*.rpm   # Fedora
sudo apt install ./dropshade_*.deb   # Debian 12+, Ubuntu 22.04+
sudo pacman -U ./dropshade-bin-*.pkg.tar.zst   # Arch, CachyOS (x86_64)

The .deb and .rpm also add Dropshade's apt or dnf repository, so from then on apt upgrade, dnf upgrade and your desktop's software updater bring new releases. On Fedora, run sudo dnf upgrade once in a terminal first and confirm the repository's key; until then, GNOME Software and dnf-automatic cannot read the repository. To add the repository without downloading a package, follow samuelba.github.io/dropshade. To stop these updates, set Enabled: no in /etc/apt/sources.list.d/dropshade.sources or enabled=0 in /etc/yum.repos.d/dropshade.repo; upgrades keep that change. An Ubuntu release upgrade turns the repository off, so set it back to Enabled: yes afterwards.

Then set up the hotkey once, depending on your desktop. From then on F12 drops the terminal down and hides it again, and the first press starts Dropshade.

  • COSMIC: open Dropshade once from the app launcher. It adds F12 to COSMIC's custom keyboard shortcuts, so the key keeps working after you log out.

  • GNOME: turn on the Dropshade extension, then log out and back in:

    gnome-extensions enable dropshade@samuelba.dev

    The Extensions app works too. Dropshade shows an icon in the top bar while it runs.

  • KDE Plasma: open Dropshade once from the app launcher and confirm the shortcut when the desktop asks. The desktop only passes F12 to Dropshade while it runs, so turn on Settings β†’ Session β†’ Start when you log in, which starts it hidden.

  • Hyprland: Hyprland never asks about shortcuts, so bind the key in its config, as shown under Hyprland.

  • Sway, niri, X11 and other desktops: add a keyboard shortcut in your desktop's settings that runs F12 or dropshade toggle.

To use a different key, change Settings β†’ Window β†’ Hotkey (right-click the terminal, then Settings), or window.hotkey in the config file. The details for each desktop are under How it drops down.

Each release also has an AppImage and a .tar.gz with the binary, for x86_64 and aarch64. Neither installs the GNOME extension: run Dropshade-*.AppImage gnome-extension install or dropshade gnome-extension install once, then log out and back in. On other desktops, set them up as above, starting the binary instead of the launcher entry.

On start, Dropshade asks GitHub for the latest release. When a newer one is out, it shows a notification once per version and a download link in About Dropshade. Turn this off with [updates] check = false, or under Settings β†’ Session.

Features

  • One hotkey: slides down over your windows and hides again; the first press starts Dropshade.
  • Placement: height, width, horizontal and vertical alignment, a slide, fade or no animation, and an ordered list of screens so one config works at every desk.
  • Tabs and splits: split any tab into panes, resize and zoom them, and put the tab bar on any side. Reorder, rename and close tabs with the mouse.
  • Sessions and layouts: tabs, splits and directories come back on the next start; save named layouts, or write them by hand with a command per pane.
  • Keyboard selection: a vi mode to move through and select the scrollback, plus search.
  • Shell integration: jump between prompts, select a command's output and close idle tabs without asking (bash and zsh).
  • Inline images: pictures from kitten icat, yazi, timg, chafa, img2sixel and other tools that speak the kitty graphics protocol or sixel.
  • Notifications: a dot on tabs that rang the bell or printed output, and a desktop notification when a long command finishes.
  • Themes and colors: Dusk and Dawn built in, any Alacritty theme, follow the system's light or dark setting, and single colors with a color picker.
  • Settings and config file: a Settings panel that saves into config.toml, keeping comments; edits apply live and a broken file never takes effect.
  • Translucent: opacity, padding, cursor and scrollbar to taste; unfocused panes fade slightly.

Shortcuts

Keys Action
Ctrl+Shift+T New tab
Ctrl+Shift+R / Ctrl+Shift+D Split the pane: new terminal to the right / below
Ctrl+Shift+W Close the pane, or the tab with its last pane (asks first if a command is still running)
Alt+Arrows Move to the pane in that direction (in split tabs)
Ctrl+Shift+Alt+Arrows Move the pane's divider (in split tabs)
Ctrl+Shift+X Zoom the pane to fill the tab / show all panes again
Ctrl+PageDown / Ctrl+PageUp, Ctrl+Tab / Ctrl+Shift+Tab Next / previous tab
Ctrl+Shift+PageUp / Ctrl+Shift+PageDown Move tab left / right
Alt+1 … Alt+9 Go to tab 1–9
F2 Rename tab (or double-click the tab)
Ctrl+Shift+C / Ctrl+Shift+V Copy / paste
Shift+Insert, middle click Paste the primary selection
Shift+PageUp/PageDown/Home/End Scroll the scrollback
Ctrl+click Open a link (links under the pointer are underlined while Ctrl is held)
Ctrl+Shift+F Search the scrollback (Enter: older match)
Ctrl+Shift+Space Select with the keyboard (vi mode)
Ctrl+Shift+E Quick select a URL, path or hash: its label copies it, Shift+label opens it
Ctrl+Shift+Up / Ctrl+Shift+Down Jump to the previous / next prompt (needs shell integration)
Ctrl+Shift+A Select the last command's output (needs shell integration)
Ctrl+= / Ctrl+- / Ctrl+0 Zoom in / out / reset (all tabs, not saved)
F11 Fill the screen / back to the configured size (hiding ends it)
Ctrl+, Open Settings

Right-click the terminal for Copy, Paste, Select Command Output (of the command you clicked on), Select with Keyboard, New Tab, Find, Panes (split right or down, zoom, close), Zoom (in, out, normal size; for the session only, the configured font size stays), Toggle Maximize, Reset (clears modes a crashed program left on, like mouse reporting or the alternate screen, and clears the screen; scroll up to see what was there), Reset and Clean (also clears the scrollback), Settings and About. Settings is a panel for theme and colors (with a color picker), font size, opacity, tab bar, drop-down size and screen, cursor and session restore that saves straight into config.toml, keeping its comments.

When a program uses the mouse itself (zellij, tmux, vim with mouse=a, ...), clicks go to it. Hold Shift to click, select and open the menu in Dropshade instead, right-click the empty part of the tab bar, or press Ctrl+, for Settings.

Splits

Ctrl+Shift+R and Ctrl+Shift+D split the focused pane; the new shell starts in the same directory. Click a pane or use Alt+Arrows to move between panes, drag a divider or press Ctrl+Shift+Alt+Arrows to resize, and Ctrl+Shift+X to zoom one pane for a while (a ZOOM badge shows while the others are hidden). Panes without the keyboard fade slightly; set how much with [appearance] unfocused_pane_dim (0 turns it off) or in Settings.

In a tab that is not split, Alt+Arrows and the other pane keys go to the program as usual. All of them can be rebound under [keybindings] (split-right, split-down, close-pane, focus-pane-left …, resize-pane-left …, toggle-pane-zoom); close-tab closes a whole tab.

Keyboard selection

Ctrl+Shift+Space starts vi mode: a block cursor moves through the output and scrollback, a badge in the top-right corner shows the mode, and keys no longer reach the shell.

Keys Action
h j k l, arrows Move
w b e / W B E Next word / previous word / end of word (W B E: words split only at spaces)
0 ^ $, Home End Start of line / first character / end of line
H M L Top / middle / bottom of the view
{ } % Previous / next paragraph, matching bracket
gg / G Oldest line of the scrollback / newest output
Ctrl+U / Ctrl+D, Ctrl+B / Ctrl+F, PageUp / PageDown Half a page / a page up or down
v / V / Ctrl+V / Alt+V Select by character / line / block / word (again: stop selecting)
y Copy the selection (clipboard and primary) and leave vi mode
/ ? then n N Search newer / older output, then the next / previous match
Esc, i, q, Ctrl+C Leave vi mode (Esc first clears a selection)

In the search bar, Enter returns to the cursor at the match. Shortcuts such as Ctrl+Shift+C keep working, and new output does not move the view while vi mode is on.

Quick select

Ctrl+Shift+E labels every URL, file path and hash (git commits, checksums, UUIDs) in view with one or two letters, the easiest ones on the newest output. Type a label to copy that text (clipboard and primary), or type it with Shift to open it: URLs in the browser, files with their default app (relative paths are taken from the shell's directory, and a :line:column suffix is dropped). Hashes are always copied. Esc, a key that matches no label, scrolling or new output ends it. Rebind it with quick-select under [keybindings].

In tabs: middle-click closes, right-click opens a menu, and dragging reorders. Right-click the empty part of the tab bar for the terminal menu. Every shortcut can be changed in the [keybindings] section of the configuration.

Configuration

Dropshade reads ~/.config/dropshade/config.toml and applies changes as soon as the file is saved. A broken file never takes effect: Dropshade keeps the previous settings and shows what is wrong.

dropshade config print-default > ~/.config/dropshade/config.toml   # documented defaults
dropshade config check                                              # validate, with line numbers

Themes: dusk (dark) and dawn (light) are built in, and any Alacritty theme dropped into ~/.config/dropshade/themes/ works by its file name. theme = { dark = "dusk", light = "dawn" } follows the system's light/dark setting.

Colors: any single color can be changed on top of the theme, in Settings β†’ Colors or in a [colors] section laid out like an Alacritty theme. Only the colors you set are replaced, so they stay when you switch themes; delete a key to get the theme's color back.

[colors.primary]
background = "#101216"
[colors.selection]
background = "#3a4150"   # unset: selections swap text and background
[colors.normal]
red = "#ff5f6d"

Screens: window.monitor takes one screen or a list in order of preference, and the first one that is connected is used, so a single config works at every desk:

[window]
monitor = ["LEN P27h-10", "DELL U2719DC", "eDP-1", "pointer"]
#          office          home            laptop   anything else

Each entry is a model (as Settings lists it), a connector such as DP-1, "pointer" (the screen under the mouse pointer) or "primary". Models are the safer choice because docks often number the connectors differently; use connectors for two screens of the same model.

Shell integration

Bash and zsh tell Dropshade where each prompt, command and command output is (with OSC 133 marks). That makes these things possible:

  • Jump between prompts with Ctrl+Shift+Up / Ctrl+Shift+Down.
  • Select a command's output: right-click it and choose Select Command Output, or press Ctrl+Shift+A for the last command. It goes to the primary selection (and the clipboard with copy_on_select); Ctrl+Shift+C copies it.
  • Close idle tabs without asking: Ctrl+Shift+W only asks while a command runs, which also works inside ssh, a nested shell or tmux. Without shell integration it asks whenever a program other than the shell is in the foreground.
  • Tab titles: each prompt names the tab user@host: dir, so a tab no longer keeps the title ssh set after you log out. A title your own prompt sets still wins.

Dropshade sets this up by itself. It writes small scripts to ~/.local/share/dropshade/shell-integration/, then starts bash with --rcfile pointing at its script, which loads your ~/.bashrc first. Zsh gets a ZDOTDIR whose .zshenv restores yours and loads your own files. Prompt themes such as starship keep working. Fish 4.0 and later sends the marks on its own. A shell configured with shell_args is started as given and is not set up.

Turn it off with [terminal] shell_integration = false (or under Settings β†’ Terminal). Other shells and prompts can send the marks themselves: ESC ] 133 ; A BEL where the prompt starts, 133;B where the command line starts, 133;C where the output starts and 133;D;<exit status> when the command finished.

Inline images

Programs can show images with the kitty graphics protocol (kitten icat picture.png, file previews in yazi, timg -pk, chafa -f kitty, editor plugins) or as sixels (img2sixel, chafa -f sixels, lsix). An image takes the place of the text cells it covers, so it scrolls into the scrollback, is wiped by clear and is overwritten like text. Unicode placeholders (kitten icat --unicode-placeholder, used inside tmux) work too.

Images arrive inline in the program's output; the protocol's file, temporary file and shared memory transfers are not supported, so a program can never make Dropshade read a file. Images are not kept when a session is restored, and a resize that rewraps a line can split an image wider than the new window. Turn images off with images = false under [terminal].

Emoji

Emoji are drawn in color from Noto Color Emoji or another installed emoji font, including the COLRv1 fonts Fedora and other current distributions ship. Skin tones, ZWJ sequences like πŸ‘¨β€πŸ‘©β€πŸ‘§ and flags are drawn as one emoji.

An emoji that is a symbol plus U+FE0F, like ❀️ or β˜€οΈ, gets one cell and is drawn small, because that is how wide bash, zsh, vim and tmux count it. With wide_emoji = true under [terminal] it gets two cells, as in kitty and Ghostty, but programs that count one cell then put the cursor a cell off after it. Programs that count graphemes themselves can ask for wide emoji with grapheme mode (DEC mode 2027) whatever the setting.

Bell, activity and finished commands

The bell does not flash the terminal unless you set [notifications] visual_bell = true. A background tab that rings the bell gets a dot in the accent color until you switch to it; with [notifications] activity_indicator = true a muted dot also marks background tabs that printed output. When a command that ran for at least command_min_duration seconds (10 by default) finishes while Dropshade is hidden or unfocused, a desktop notification says so; clicking it shows Dropshade on that tab. Change these under Settings β†’ Notifications.

How it drops down

How the terminal drops down depends on the desktop. Dropshade picks the right way on its own. Running it needs a Wayland or X11 session, Vulkan or OpenGL drivers, and libxkbcommon.

GNOME

Mutter, GNOME's compositor, does not let apps place themselves over other windows, so a small companion Shell extension shows and hides Dropshade. It supports GNOME 46 to 51.

The .rpm, .deb and pacman packages install the extension for all users. For a build of your own:

./target/release/dropshade gnome-extension install   # once; then log out and back in
# Upgrading from a build before the dev.samuelba.Dropshade rename:
# gnome-extensions uninstall dropshade@samuelba.github.io

The extension binds window.hotkey and starts Dropshade in the background when you log in (dropshade --hidden, no window until the first press), so the first press does not wait for it to start. To start it on the first press instead, turn off Settings β†’ Session β†’ Start when you log in. While Dropshade runs, an icon in the top bar shows and hides it on a click; right-click the icon to open the settings or the About dialog.

COSMIC, KDE Plasma, Sway, Hyprland and other layer-shell desktops

These compositors support layer shell, so no extension is needed: Dropshade slides down over your windows by itself, on the screen in window.monitor, sized and animated by the [window] settings.

While Dropshade runs, its icon sits in the panel's tray: COSMIC's Notifications Tray (add the applet to the panel if it is not there) or KDE Plasma's System Tray. A click shows or hides the terminal; the icon's menu also opens the settings or the About dialog. Turn it off with Settings β†’ Window β†’ Tray icon or window.tray_icon = false.

On COSMIC, Dropshade adds a shortcut named "Dropshade" for window.hotkey to COSMIC's custom shortcuts the first time it starts, and updates it whenever you change the hotkey (press Enter in the Hotkey field of Settings, or edit the config file). COSMIC then runs dropshade toggle, so the first press starts Dropshade. If you delete the shortcut in COSMIC's settings, Dropshade does not add it back on later starts. It only touches its own shortcut, reads the file the way COSMIC does, leaves it alone if anything looks unexpected or the keys are taken, and keeps the previous file in ~/.local/state/dropshade/cosmic-shortcuts-custom.backup.

On KDE Plasma and other desktops whose portal offers global shortcuts, Dropshade asks the desktop for the shortcut when it starts, suggesting window.hotkey (Plasma asks you to confirm once). After that the desktop owns the keys: change them in its shortcut settings, where it lists "Show or hide Dropshade", or with Change… next to the Hotkey in Dropshade's Settings where the desktop supports that (Plasma does). This only works while Dropshade runs, so start it with your session: Settings β†’ Session β†’ Start when you log in writes ~/.config/autostart/dev.samuelba.Dropshade.desktop, which runs dropshade --hidden.

Hyprland

Hyprland's portal neither asks about shortcuts nor uses the keys Dropshade suggests, so bind the key in Hyprland's config. With hyprland.conf:

exec-once = dropshade --hidden
bind = , F12, exec, dropshade toggle

With a Lua config (hyprland.lua, or a binds.lua and autostart.lua it loads):

hl.bind("F12", hl.dsp.exec_cmd("dropshade toggle"))

hl.on("hyprland.start", function ()
    hl.exec_cmd("dropshade --hidden")
end)

Under UWSM, leave out the autostart line and turn on Settings β†’ Session β†’ Start when you log in instead, so Dropshade does not start twice. Run hyprctl reload, then hyprctl configerrors to check the config.

Elsewhere (Sway, niri, ...), add a custom shortcut in your desktop's keyboard settings that runs dropshade toggle (use the full path if the binary is not on your PATH). The first press starts Dropshade.

Other desktops and X11

Without layer shell or the extension (X11, or GNOME before logging back in), Dropshade runs as an ordinary window: hiding closes the window while the tabs keep running, and showing opens it again. Bind dropshade toggle to a key to use it as a drop-down.

Commands

Command What it does
dropshade / dropshade show Show the terminal, starting it if needed
dropshade --hidden Start in the background without showing it (does nothing if it runs)
dropshade toggle / hide Show or hide it
dropshade new-tab [--cwd DIR] Open a tab (in DIR or the current tab's directory)
dropshade gnome-extension install Install or update the GNOME Shell extension
dropshade config print-default | path | check Inspect the configuration

There is only ever one instance: running dropshade again hands the request to the running one.

Sessions and layouts

Dropshade remembers your tabs: their order, names, splits and directories are saved as you work (and on logout) and reopened on the next start. Turn this off with [session] restore = false.

With [session] restore_scrollback = true, each pane also comes back showing the last 2000 lines it had, above a ── restored ── line and a fresh shell. The text is written to ~/.local/state/dropshade/scrollback when Dropshade quits (readable only by you) and removed once it is restored. Whatever was on screen goes to disk, passwords and tokens included, so this is off by default. A crash keeps no scrollback.

Layouts are named sets of tabs in ~/.config/dropshade/layouts/<name>.toml:

dropshade layout save work   # the open tabs become a layout
dropshade layout load work   # open its tabs next to the current ones
dropshade layout list

Layout files are easy to write by hand, and a tab can run a command when it opens:

active = 0

[[tab]]
name = "api"
cwd = "~/projects/api"
command = "cargo watch -x run"

[[tab]]
name = "logs"
cwd = "~/projects/api"

A split tab lists its panes instead. Each pane after the first splits an earlier one: split is "right" or "down", of names the pane it splits (counting from 1, the previous pane when left out) and size is the new pane's share of it (half when left out). focus = true marks the pane that gets the keyboard; the tab's cwd is the default for panes without their own.

[[tab]]
name = "dev"
cwd = "~/projects/api"

[[tab.pane]]
command = "nvim"

[[tab.pane]]
split = "right"
size = 0.35
command = "cargo watch -x test"

[[tab.pane]]
split = "down"
command = "tail -f log.txt"

[session] layout = "work" starts every session with that layout instead of the last one.

Development

cargo build --release

Building needs the libxkbcommon development files (libxkbcommon-devel on Fedora, libxkbcommon-dev on Debian and Ubuntu, libxkbcommon on Arch). The PKGBUILDs in packaging/arch/ build from source (dropshade) or from the release tarball (dropshade-bin).

cargo fmt --all
cargo clippy --workspace --all-targets
cargo test --workspace

GNOME extension

gnome-extension/ holds the companion Shell extension. Two scripts run it against a throwaway GNOME Shell whose D-Bus session, dconf database and extension directory live under target/, so your real session is never touched:

./scripts/gnome-smoke.sh              # headless, with the extension: windows, tabs, config, CLI
./scripts/gnome-smoke.sh --fallback   # headless, without it: the app manages its own window
./scripts/package.sh                  # every release artifact for this machine, into dist/
./scripts/gnome-dev.sh     # nested window you can use (needs: sudo dnf install mutter-devkit)
Crate Purpose
dropshade The application
dropshade-term Terminal widget: pty, emulation, key encoding, iced canvas view
dropshade-config Configuration schema, validation, themes

The extension (gnome-extension/) is licensed GPL-2.0-or-later, as extensions.gnome.org requires.

License

Licensed under MIT. Dropshade builds on alacritty_terminal (Apache-2.0).

About

A drop-down terminal for Linux, written in Rust. Quake style drop- down terminal for Gnome, COSMIC and KDE.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages