sxalert

Simple notification system for X
git clone git://mcdim.xyz/sxalert.git
Log | Files | Refs | README | LICENSE

sxalert.1 (2517B)


      1 .\" Manpage for sxalert
      2 
      3 .TH man 1 "15 Oct 2026" "1.0" "sxalert manual page"
      4 .SH NAME
      5 sxalert \- Simple X Alert
      6 
      7 .SH SYNOPSIS
      8 .B sxalert
      9 .RB [ \-s ]
     10 .RB [ \-t
     11 .IR color ]
     12 .RB [ \-g
     13 .IR color ]
     14 .RB [ \-r
     15 .IR color ]
     16 .RB [ \-b
     17 .IR width ]
     18 .RB [ \-d
     19 .IR duration ]
     20 .RI [ line " ...]"
     21 .br
     22 .B sxalert \-v
     23 .br
     24 .B sxalert \-h
     25 
     26 .SH DESCRIPTION
     27 .B sxalert
     28 displays text notifications for X. It accepts standard input,
     29 command-line arguments, or both, appending the latter to the former.
     30 Mouse interactions produce distinct exit statuses, allowing sxalert
     31 to be used in shell scripts. It allows for runtime visual
     32 customizability through command-line arguments.
     33 Concurrent notifications are serialized using an advisory file lock.
     34 
     35 .SH OPTIONS
     36 
     37 .TP
     38 .B -s
     39 Read from stdin. Command line arguments will be appended.
     40 
     41 .TP
     42 .BI "-t " color
     43 Set the text color in hexadecimal. Six consecutive digits without prefix.
     44 
     45 .TP
     46 .BI "-g " color
     47 Set the background color.
     48 
     49 .TP
     50 .BI "-r " color
     51 Set the border color.
     52 
     53 .TP
     54 .BI "-b " width
     55 Set the border width in pixels.
     56 
     57 .TP
     58 .BI "-d " duration
     59 Set the duration in milliseconds. Will run indefinitely for values less than, or equal to, zero.
     60 
     61 .TP
     62 .B -h
     63 Print help panel & exit.
     64 
     65 .TP
     66 .B -v
     67 Print version & exit.
     68 
     69 .SH EXIT CODES
     70 
     71 .TP
     72 .B 0
     73 Left click on the notification window.
     74 
     75 .TP
     76 .B 1
     77 Midde click on the notification window.
     78 
     79 .TP
     80 .B 2
     81 Right click on the notification window.
     82 
     83 .TP
     84 .B 3
     85 Time out.
     86 
     87 .SH EXAMPLES
     88 
     89 Display a simple notification:
     90 .PP
     91 .RS
     92 .nf
     93 sxalert "Updates available"
     94 .fi
     95 .RE
     96 
     97 Display a notification with red text, black background, no border:
     98 .PP
     99 .RS
    100 .nf
    101 sxalert -t 0xff0000 -g 0x000000 -b 0 "Updates available"
    102 .fi
    103 .RE
    104 
    105 These options override the defaults in config.h.
    106 .PP
    107 
    108 Confirmation dialoge with a right click, dismissed otherwise:
    109 .PP
    110 .RS
    111 .nf
    112 sxalert "Proceed with backup?" && backup.sh
    113 .fi
    114 .RE
    115 
    116 Launch neomutt in st when the notification is accepted; otherwise display "Ignored":
    117 .PP
    118 .RS
    119 .nf
    120 sxalert "New mail!" && nohup st -e neomutt || sxalert "Ignored"
    121 .fi
    122 .RE
    123 
    124 Display a preformatted text file:
    125 .PP
    126 .RS
    127 .nf
    128 sxalert -s < banner.txt
    129 .fi
    130 .RE
    131 
    132 Display stdin and append a timestamp:
    133 .PP
    134 .RS
    135 .nf
    136 make test | tail | sxalert -s "$(date)"
    137 .fi
    138 .RE
    139 
    140 .SH COLOPHON 
    141 .TP
    142 .B Author
    143 Michail Konstantinos Dimopoulos <mk@mcdim.xyz>
    144 .TP
    145 .B Copyright
    146 \(co 2023,2026 Michail Konstantinos Dimopoulos
    147 .TP
    148 .B License
    149 GNU General Public License 3.0 or later (GPL-3.0-or-later)
    150 
    151 .TP
    152 .B Patches
    153 Send patches to <hackers@mcdim.xyz>
    154 
    155 .SH SEE ALSO
    156 .BR herbe (1),
    157 .BR xmessage (1),
    158 .BR notify-send (1)