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 closeslabnagwhen pressed (whereas-Bdoesn'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 istop.-y,--layer overlay|top|bottom|backgroundβ picks the layer. default istop.-k,--keyboard-focus none|exclusive|on-demandβ sets the keyboard focus policy. default isnone.-f,--font <font>β the font, obviously π default isSans 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 isToggle 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 is5seconds β³-x,--exclusive-zoneβ use the exclusive zone. default isfalse.-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 is900000.--button-border-color <RRGGBB[AA]>β the button border color. default isD92424.--border-bottom-color <RRGGBB[AA]>β the bottom border color. default is470909.--button-background-color <RRGGBB[AA]>β the background color for buttons. default is680A0A.--text-color <RRGGBB[AA]>β the text color. default isFFFFFF.--button-text-color <RRGGBB[AA]>β the button text color. default isFFFFFF.--border-bottom-size <size>β how thick the bottom border is. default is3.--message-padding <padding>β the padding around the message. default is8.--details-background-color <RRGGBB[AA]>β the background color for details. default is680A0A.--details-border-size <size>β how thick the details border is. default is3.--details-border-color <RRGGBB[AA]>β the color of the details border. default is680A0A.--details-margin <margin>β the margin for the details. default is11.--button-border-size <size>β how thick the button border is. default is3.--button-gap <gap>β the size of the gap between buttons. default is20.--button-dismiss-gap <gap>β the size of the gap between the dismiss button and another button. default is15.--button-margin-right <margin>β the margin from the right of the dismiss button to the edge. default is2.--button-padding <padding>β the padding for the button text. default is3.
a lil reminder for the color values: they're<RRGGBB[AA]>, so theAApart 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
- arch rolling: labwc 0.20.2-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms