labnag(1)

πŸ’… labnag β€” show a dialog with a message and buttons (yes bestie, a whole GUI popup)

okay so real talk: labnag is a little program from the General Commands Manual that pops up a dialog box with a message and some buttons, and those buttons can run stuff when you press them. that's it, that's the vibe. it's giving "polite little notification that also does things for you" ✨


🌸 SYNOPSIS

labnag [options...]

literally just run it with some options, or don't, i'm not your mom 🫢


πŸŽ€ OPTIONS

these are the main-character flags, bestie. read them all, no skipping πŸ’–

  • -B, --button <text> [<action>] β€” makes a button that says text, and if you give it an action, that action runs when someone presses it. want more buttons? pass the flag again, again, again πŸ¦‹ they show up left to right, in the order you gave them.
  • -Z, --button-dismiss <text> [<action>] β€” same idea as -B, but this button also closes labnag when pressed (whereas -B doesn't). the optional action runs too. multiple buttons = pass it multiple times, and they line up left to right in the order provided.
  • -d, --debug β€” turns on debugging. for when you're like "why is this behaving like that 😭" and you want the receipts.
  • -e, --edge top|bottom β€” picks which edge to use. default is top.
  • -y, --layer overlay|top|bottom|background β€” picks the layer. default is top.
  • -k, --keyboard-focus none|exclusive|on-demand β€” sets the keyboard focus policy. default is none.
  • -f, --font <font> β€” the font, obviously πŸ’… default is Sans 10.
  • -h, --help β€” shows the help message and quits. the classic.
  • -l, --detailed-message β€” reads a detailed message from stdin, and adds a button that toggles the details on and off. the details show up in a scrollable multi-line text area (fancy, i know πŸ‘‘).
  • -L, --detailed-button <text> β€” sets the text of that details-toggle button. heads up: this does nothing if there's no detailed message. default text is Toggle details.
  • -m, --message <msg> β€” sets the message text. the actual words on screen, bestie.
  • -o, --output <output> β€” sets the output to use. this should be the name of a xdg_output.
  • -t, --timeout β€” sets the duration until the dialog closes. default is 5 seconds ⏳
  • -x, --exclusive-zone β€” use the exclusive zone. default is false.
  • -v, --version β€” shows the version number and quits.

✨ APPEARANCE OPTIONS ✨

this is the glow-up section. every single one, no cap 🌈

  • --background-color <RRGGBB[AA]> β€” the background color. default is 900000.
  • --button-border-color <RRGGBB[AA]> β€” the button border color. default is D92424.
  • --border-bottom-color <RRGGBB[AA]> β€” the bottom border color. default is 470909.
  • --button-background-color <RRGGBB[AA]> β€” the background color for buttons. default is 680A0A.
  • --text-color <RRGGBB[AA]> β€” the text color. default is FFFFFF.
  • --button-text-color <RRGGBB[AA]> β€” the button text color. default is FFFFFF.
  • --border-bottom-size <size> β€” how thick the bottom border is. default is 3.
  • --message-padding <padding> β€” the padding around the message. default is 8.
  • --details-background-color <RRGGBB[AA]> β€” the background color for details. default is 680A0A.
  • --details-border-size <size> β€” how thick the details border is. default is 3.
  • --details-border-color <RRGGBB[AA]> β€” the color of the details border. default is 680A0A.
  • --details-margin <margin> β€” the margin for the details. default is 11.
  • --button-border-size <size> β€” how thick the button border is. default is 3.
  • --button-gap <gap> β€” the size of the gap between buttons. default is 20.
  • --button-dismiss-gap <gap> β€” the size of the gap between the dismiss button and another button. default is 15.
  • --button-margin-right <margin> β€” the margin from the right of the dismiss button to the edge. default is 2.
  • --button-padding <padding> β€” the padding for the button text. default is 3.
a lil reminder for the color values: they're <RRGGBB[AA]>, so the AA part is optional. the defaults above are given in that exact short form.

πŸ¦‹ EXAMPLE

here's a simple example of a labnag logout GUI β€” honestly iconic, a whole system menu in a shell script πŸ’–

#!/bin/sh

# logout with labnag

labnag \
 -f "Hack Regular 10"\
 -m "Choose your logout option"\
 -Z "  Lock   " "gtklock -d"\
 -Z " Logout  " "labwc -e"\
 -Z "Shutdown " "systemctl poweroff"\
 -Z " Reboot  " "systemctl reboot"\
 -Z "Hibernate" "systemctl hibernate"\
 -Z " Suspend " "systemctl suspend"\
 -Z " Cancel  "\
 --background-color 00ffff\
 --button-background-color 00ffff\
 --button-border-color 00ccccaa\
 --text-color 000000\
 --button-text-color 000000\
 --button-gap 8\
 --button-margin-right 0\
 --button-padding 5\
 --button-border-size 2\
 -t 60

⭐ quick vibe check before you go: this page is from General Commands Manual, and it's dated 2026-08-22 β€” so if you're reading this, hi from the archives bestie, the version of labnag(1) you're looking at is that exact one. slay, go press some buttons πŸ’…πŸŒΈ
πŸ“¦ where this page comes from