{"id":21484140,"url":"https://github.com/dylex/dzen-old","last_synced_at":"2025-03-17T09:40:43.289Z","repository":{"id":1180767,"uuid":"1079810","full_name":"dylex/dzen-old","owner":"dylex","description":"general purpose messaging, notification and menuing program for X11","archived":false,"fork":false,"pushed_at":"2012-05-28T03:37:00.000Z","size":400,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T19:14:39.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://sites.google.com/site/gotmor/dzen","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dylex.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-14T23:42:59.000Z","updated_at":"2013-10-11T16:59:45.000Z","dependencies_parsed_at":"2022-07-25T20:00:25.152Z","dependency_job_id":null,"html_url":"https://github.com/dylex/dzen-old","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylex%2Fdzen-old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylex%2Fdzen-old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylex%2Fdzen-old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylex%2Fdzen-old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylex","download_url":"https://codeload.github.com/dylex/dzen-old/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244010927,"owners_count":20383333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T12:50:17.077Z","updated_at":"2025-03-17T09:40:43.258Z","avatar_url":"https://github.com/dylex.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"====================================\n dzen, (c) 2007-2010 by Robert Manea\n====================================\n\nDzen is a general purpose messaging, notification and menuing program for X11.\nIt was designed to be fast, tiny and scriptable in any language.\n\n\nFeatures\n--------\n\n    * Small, fast, very tiny set of dependencies (Xlib only by default)\n    * Scriptable in any language\n    * Sophisticated formating language - including colours, icons, graphics\n    * Versatile - display all sorts of information\n    * Interactive - user defined mouse and keyboard actions\n    * Optional XFT support\n    * Optional XINERAMA support\n\n\nRequirements\n------------\nIn order to build dzen you need the Xlib header files.\n\n\nInstallation\n------------\nEdit config.mk to match your local setup (dzen is installed into\nthe /usr/local namespace by default).\n\nAfterwards enter the following command to build and install dzen (if\nnecessary as root):\n\n    make clean install\n\n\nOptionally if you want to use dzen's gadgets:\n\n    cd gadgets\n    make clean install\n\n\nNote:       By default dzen will not be compiled with Xinerama and XPM support.\n            Uncomment the respective lines in config.mk to change this.\n\n\nContact:\n--------\nFeature requests, patches or anything else related to dzen can be send\nto: rob dot manea at gmail dot com\n\n\nRunning dzen\n------------\ndzen accepts a couple of options:\n\n    -fg     foreground color\n    -bg     background color\n    -fn     font \n    -ta     alignement of title window content \n            l(eft), c(center), r(ight)\n    -tw     title window width\n    -sa     alignment of slave window, see \"-ta\"\n    -l      lines, see (1)\n    -e      events and actions, see (2)\n    -m      menu mode, see (3)\n    -u      update contents of title and \n            slave window simultaneously, see (4)\n    -p      persist EOF (optional timeout in seconds)\n    -x      x position\n    -y      y position\n    -h      line height (default: fontheight + 2 pixels)\n    -w      width\n    -xs     number of Xinerama screen\n    -v      version information\n\n    see (5) for the in-text formating language.\n\n\n\nX resources\n-----------\n\nDzen is able to read font and color setting from X resources.\nAs an example you can add following lines to ~/.Xresources\n\ndzen2.font:       -*-fixed-*-*-*-*-*-*-*-*-*-*-*-*\ndzen2.foreground: #22EE11\ndzen2.background: black\n\n\n\nWindow layout\n-------------\n\nDzen's window layout is as follows:\n\n     ------------------------------------------\n    |        Title window, single line         |\n    `------------------------------------------´\n    |                                          |\n    |               scrollable                 |\n    |              Slave window                |\n    |             multiple lines               |\n    |     lines to display simultaneously      |\n    |           controlled with the            |\n    |              '-l' option                 |\n    |                                          |\n    |                                          |\n    `------------------------------------------´\n\nThe first line you provide to dzen always goes to the title window, \nall other consecutive lines will be drawn to the slave window unless\nyou explicitly overide this with the (5) In-text formating language\ncommand ^tw().\n\n\nQA:\n---\n\nQ1:  I don't want a slave window, what to do?\n\nA1:  Do not provide the '-l' option, all lines will be displayed\n     in the title window, this is the default behaviour.\n\n\nQ2:  I used the '-l' option but no slave window appears.\n\nA2:  With the default event/action handling the slave window will\n     only be displayed if you hoover with the mouse over the title\n     window. See \"(2) Events and actions\" if you'd like to change\n     this.\n\n\nQ3:  If I echo some text or cat a file dzen closes itself imediatelly.\n\nA3:  There are 2 different approaches dzen uses to terminate itself, \n     see next section \"Termination\".\n\n\nQ4:  Ok, the title and slave thing works, can I update the\n     contents of both windows at the same time?\n\nA4:  Sure, see \"(4) Simultaneous updates\" or use the in-text \n     command \"^tw()\" to explicitly draw to the title windwow.\n     See section (5) for further details\n\n\nQ5:  Can i chnage color of my input at runtime?\n\nA5:  Yes, you can change both background and foreground colors and \n     much more See \"(5) In-Text formating language\"\n\n\nQ6:  Can I use dzen as a menu?\n\nA6:  Yes, both vertical and horizontal menus are supported. \n     See \"(3) Menu\" for further details.\n\n\n\n\nTermination:\n------------\ndzen uses two different approaches to terminate itself:\n\n    * Timed termination: if EOF is received -\u003e terminate\n        - unless the '-p' option is set\n            · '-p' without argument persist forever\n            · '-p' with argument n  persist for n seconds\n\n    * Interactive termination: if mouse button3 is clicked -\u003e terminate\n        - this is the default behaviour, see (2)\n        - in some modes the Escape key terminates too, see (2)\n\n\n\nReturn values:\n--------------\n0               -   dzen received EOF\n1               -   some error occured, inspect the error message\nuser defined    -   set with 'exit:retval' action, see (2)\n\n\n\n(1) Option \"-l\": Slave window\n--------------------------------\n\nEnables support for displaying multiple lines. The parameter to \"-l\"\nspecifies the number of lines to be displayed.\n\nThese lines of input are held in the slave window which becomes active as soon\nas the pointer enters the title (default action) window.\n\nIf the mouse leaves the slave window it will be hidden unless it is set\nsticky by clicking with Button2 into it (default action).\n\nButton4 and Button5 (mouse wheel) will scroll the slave window up\nand down if the content exceeds the window height (default action).\n\n\n\n(2) Option '-e': Events and actions\n-----------------------------------\n\ndzen allows the user to associate actions to events.\n\nThe command line syntax is as follows:\n-e 'event1=action1:option1:...option\u003cn\u003e,...,action\u003cm\u003e;...;event\u003cl\u003e'\n\nEvery event can take any number of actions and every action can take any number\nof options. (By default limited to 64 each, easily changable in action.h)\n\nAn example:\n    -e 'button1=exec:xterm:firefox;entertitle=uncollapse,unhide;button3=exit'\n\n    Meaning:\n\n    button1=exec:xterm:firefox;\n    on Button1 event (Button1 press on the mouse) execute xterm and\n    firefox. \n    Note: xterm and firefox are options to the exec action\n\n    entertitle=uncollapse,unhide;\n    on entertitle (mouse pointer enters the title window) uncollapse\n    slave window and unhide the title window\n\n    button3=exit\n    on button3 event exit dzen\n\n\nSupported events:\n-----------------\n\n    onstart             Perform actions right after startup\n    onexit              Perform actions just before exiting\n    onnewinput          Perform actions if there is new input for the slave window\n    button1             Mouse button1 released \n    button2             Mouse button2 released\n    button3             Mouse button3 released\n    button4             Mouse button4 released (usually scrollwheel)\n    button5             Mouse button5 released (usually scrollwheel)\n    button6             Mouse button6 released\n    button7             Mouse button7 released\n    entertitle          Mouse enters the title window\n    leavetitle          Mouse leaves the title window\n    enterslave          Mouse enters the slave window\n    leaveslave          Mouse leaves the slave window\n    sigusr1             SIGUSR1 received \n    sigusr2             SIGUSR2 received\n    key_KEYNAME         Keyboard events (*)\n\n\n    (*) Keyboard events:\n    --------------------\n\n    Every key can be bound to an action (see below). The format is:\n    key_KEYNAME where KEYNAME is the name of the key as defined in\n    keysymdef.h (usually: /usr/include/X11/keysymdef.h).  The part \n    after 'XK_' in keysymdef.h must be used for KEYNAME.\n\n\n\nSupported actions:\n------------------\n\n    exec:command1:..:n  execute all given options\n    menuexec            executes selected menu entry\n    exit:retval         exit dzen and return 'retval'\n    print:str1:...:n    write all given options to STDOUT\n    menuprint           write selected menu entry to STDOUT\n    xevent:TYPE:l0:..:n send XEvent TYPE with long arguments (e.g., for XMonad's ServerMode)\n    collapse            collapse (roll-up) slave window\n    uncollapse          uncollapse (roll-down) slave window\n    togglecollapse      toggle collapsed state\n    stick               stick slave window\n    unstick             unstick slave window\n    togglestick         toggle sticky state\n    hide                hide title window\n    unhide              unhide title window\n    togglehide          toggle hide state\n    raise               raise window to view (above all others)\n    lower               lower window (behind all others)\n    scrollhome          show head of input\n    scrollend           show tail of input\n    scrollup:n          scroll slave window n lines up   (default n=1)\n    scrolldown:n        scroll slave window n lines down (default n=1)\n    grabkeys            enable keyboard support\n    ungrabkeys          disable keyboard support\n    grabmouse           enable mouse support \n                        only needed with specific windowmanagers, such as fluxbox\n    ungrabmouse         release mouse\n                        only needed with specific windowmanagers, such as fluxbox\n\n\nNote:   If no events/actions are specified dzen defaults to:\n\n        Title only mode:\n        ----------------\n\n        -e 'button3=exit:13'\n\n\n        Multiple lines and vertical menu mode:\n        --------------------------------------\n\n        -e 'entertitle=uncollapse,grabkeys;\n            enterslave=grabkeys;leaveslave=collapse,ungrabkeys;\n            button1=menuexec;button2=togglestick;button3=exit:13;\n            button4=scrollup;button5=scrolldown;\n            key_Escape=ungrabkeys,exit'\n\n\n        Horizontal menu mode:\n        ---------------------\n\n        -e 'enterslave=grabkeys;leaveslave=ungrabkeys;\n            button4=scrollup;button5=scrolldown;\n            key_Left=scrollup;key_Right=scrolldown;\n            button1=menuexec;button3=exit:13;\n            key_Escape=ungrabkeys,exit'\n\n\n        If you define any events/actions, there is no default behaviour,\n        i.e. you will have to specify _all_ events/actions you want to\n        use.\n\n\n\n(3) Option '-m', Menu\n---------------------\n\nDzen provides two menu modes, vertical and horizontal menus. You can\naccess these modes by adding 'v'(ertical) or 'h'(horizontal) to the \n'-m' option. If nothing is specified dzen defaults to vertical menus.\n\nVertical menu, both invocations are equivalent:\n    dzen2 -p -l 4 -m \u003c file\n    dzen2 -p -l 4 -m v \u003c file\n\nHorizontal menu:\n    dzen2 -p -l 4 -m h \u003c file\n\n\nAll actions beginning with \"menu\" work on the selected menu entry.\n\nNote:   Menu mode only makes sense if '-l \u003cn\u003e' is specified!\n\n        Horizontal menus have no title window, so all actions\n        affecting the title window will be silently discarded\n        in this mode.\n\n\n\n(4) Option '-u', Simultaneous updates\n-------------------------------------\n\n** DEPRECATED **\n\nThis option provides facilities to update the title and slave window at\nthe same time.\n\nThe way it works is best described by an example:\n\n  Motivation:\n\n  We want to display an updating clock in the title and some log\n  output in the slave window.\n\n  Solution:\n\n  while true; do\n        date                # output goes to the title window\n        dmesg | tail -n 10  # output goes to the slave window\n        sleep 1\n  done | dzen2 -l 10 -u\n\nFor this to work correctly it is essential to provide exactly the number\nof lines to the slave window as defined by the parameter to '-l'.\n\n\n\n(5) In-text formating \u0026 control language:\n-----------------------------------------\n\nThis feature allows to dynamically (at runtime) format the text dzen\ndisplays and control its behaviour.\n\nCurrently the following commands are supported:\n\n\nNote:  Doubling the '^' character ('^^') will remove the special meaning from it.\n\n\nColors:\n-------\n\n    ^fg(color)         set foreground color\n    ^fg()              without arguments, sets default fg color\n    ^bg(color)         set background color\n    ^bg()              without arguments, sets default bg color\n\nGraphics:\n---------\n\n    ^i(path)           draw icon specified by path\n                       Supported formats: XBM and optionally XPM\n\n    ^r(WIDTHxHEIGHT)   draw a rectangle with the dimensions \n                       WIDTH and HEIGHT\n    ^ro(WIDTHxHEIGHT)  rectangle outline\n\n    ^c(RADIUS)         draw a circle with size RADIUS pixels\n    ^co(RADIUS)        circle outline\n\nPositioning:\n------------\n\n    ^p(ARGUMENT)       position next input amount of PIXELs to the right\n                       or left of the current position\n                       a.k.a. relative positioning\n\n    ^pa(ARGUMENT)      position next input at PIXEL\n                       a.k.a. absolute positioning\n\n     ARGUMENT:\n\n     ^p(+-X)          move X pixels to the right or left of the current position (on the X axis) \n\n     ^p(+-X;+-Y)      move X pixels to the right or left and Y pixels up or down of the current \n                      position (on the X and Y axis) \n\n     ^p(;+-Y)         move Y pixels up or down of the current position (on the Y axis)\n\n     ^p()             without parameters resets the Y position to its default \n\n     ^pa()            takes the same parameters as described above but positions at\n                      the absolute X and Y coordinates \n\n     Further ^p() also takes some symbolic names as argument:\n\n     _LOCK_X          Lock the current X position, useful if you want to\n                      align things vertically\n     _UNLOCK_X        Unlock the X position \n     _LEFT            Move current x-position to the left edge \n     _RIGHT           Move current x-position to the right edge \n     _TOP             Move current y-position to the top edge \n     _CENTER          Move current x-position to center of the window \n     _BOTTOM          Move current y-position to the bottom edge \n\nInteraction:\n------------\n\n    ^ca(BTN, ACT) ... ^ca()      \n\n                       Used to define 'clickable areas'.\n                       - 'BTN' denotes the mouse button (1=left, 2=right, 3=middle, etc.) \n                       - 'ACT' denotes the action that should be executed when the specific\n                         area has been clicked with the defined button\n                       - '...' denotes any text or formating commands dzen accepts\n                       - '^ca()' without arguments denotes the end of this clickable area\n\n                       Example:\n                         foo ^ca(1, print:one)^fg(red)click me and i'll echo one^fg()^ca() bar\n                        \nActions as commands:\n--------------------\n\n    ^togglecollapse()\n    ^collapse()\n    ^uncollapse()\n    ^togglestick()\n    ^stick()            See section (2) 'Events and actions' for a detailed description \n    ^unstick()          of each command.\n    ^togglehide()\n    ^hide()\n    ^unhide()\n    ^raise()\n    ^lower()\n    ^scrollhome()\n    ^scrollend()\n    ^exit()  \n\nOther:\n------\n\n    ^tw()              draw to title window\n                       This command has some annoyances, as only \n                       the input after the command will be drawn\n                       to the title window, so it is best used \n                       only once and as first command per line.\n                       It will also reset all clickable areas, even those in the slave.\n\n    ^cs()              clear slave window\n                       This command must be the first and only command\n                       per line.  If you use clickable areas in the slave \n                       window, you'll need to follow this with a ^tw().\n\n    ^ib(VALUE)         ignore background setting, VALUE can be either\n                       1 to ignore or 0 to not ignore the bg color set\n                       with ^bg(color).\n                       This command is useful in combination with ^p()\n                       and ^pa() in order to position the input inside \n                       other already drawn input.\n\n                       Example: \n                         ^ib(1)^fg(red)^ro(100x15)^p(-98)^fg(blue)^r(20x10)^fg(orange)^p(3)^r(40x10)^p(4)^fg(darkgreen)^co(12)^p(2)^c(10)\n\n\n\nThese commands can appear anywhere and in any combination in dzen's\ninput. \n\nThe color can be specified either as symbolic name (e.g. red,\ndarkgreen, etc.) or as #rrggbb hex-value (e.g. #ffffaa).\n\nIcons must be in the XBM or optionally XPM format, see the \"bitmaps\"\ndirectory for some sample icons. With the standard \"bitmap\" application\nyou can easily draw your own icons.\n\n\n\nSome examples:\n\n   Input:  \n          ^fg(red)I'm red text ^fg(blue)I am blue\n\n\n   Input:\n          ^bg(#ffaaaa)The ^fg(yellow)text to ^bg(blue)^fg(orange)colorize\n\n\n   Input:\n          ^fg(grey70)Some text containing ^^ characters\n\n\n   Input for icons:\n          ^i(bitmaps/envelope.xbm) I am an envelope ^fg(yellow)and ^i(bitmaps/battery.xbm) I'm a baterry.\n\n\n   Input for rectangles:\n          6x4 rectangle ^r(6x4) ^fg(red)12x8 ^r(12x8) ^fg(yellow)and finally 100x15 ^r(100x15)\n\n\n   Input for relative positioning:\n          Some text^p(100)^fg(yellow)100 pixels to the right^p(50)^fg(red)50 more pixels to the right\n\n\n\n\nExamples:\n---------\n\n* Display message and timeout after 10 seconds:\n    (echo \"This is a message\"; sleep 10) | dzen2 -bg darkred -fg grey80 -fn fixed \n\n\n* Display message and never timeout:\n    echo \"This is a message\"| dzen2 -p\n\n\n* Display updating single line message:\n    for i in $(seq 1 20); do A=${A}'='; print $A; sleep 1; done | dzen2\n\n\n* Display header and a message with multiple lines:\n    (echo Header; cal; sleep 20) | dzen2 -l 8\n\n    Displays \"Header\" in the title window and the output of cal in the 8\n    lines high slave window.\n\n\n* Display updating messages:\n    (echo Header; while true; do echo test$((i++)); sleep 1; done) | dzen2 -l 12\n\n    The slave window will update contents if new input has arrived.\n\n\n* Display log files:\n    (su -c \"echo LOGFILENAME; tail -f /var/log/messages\") | dzen2 -l 20 -x 100 -y 300 -w 500\n\n\n* Monthly schedule with remind:\n    (echo Monthly Schedule; remind -c1 -m) | dzen2 -l 52 -w 410 -p -fn lime -bg '#e0e8ea' -fg black -x 635\n\n\n* Simple menu:\n    echo \"Applications\" | dzen2 -l 4 -p -m \u003c menufile\n\n\n* Horizontal menu without any files:\n    {echo Menu; echo -e \"xterm\\nxclock\\nxeyes\\nxfontsel\"} | dzen2 -l 4 -m h -p\n\n\n* Extract PIDs from the process table:\n\n    {echo Procs; ps -a} | dzen2 -m -l 12 -p \\\n    -e 'button1=menuprint;button3=exit;button4=scrollup:3;button5=scrolldown:3;entertitle=uncollapse;leaveslave=collapse' \\\n            | awk '{print $1}'\n\n\n* Dzen as xmonad (see http://xmonad.org) statusbar:\n\n    status.sh | dzen2 -ta r -fn '-*-profont-*-*-*-*-11-*-*-*-*-*-iso8859' -bg '#aecf96' -fg black \\\n        -p -e 'sigusr1=raise;sigusr2=lower;onquit=exec:rm /tmp/dzen2-pid;button3=exit' \u0026 echo $! \u003e /tmp/dzen2-pid\n\n\n\n\nHave fun.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylex%2Fdzen-old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylex%2Fdzen-old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylex%2Fdzen-old/lists"}