Skip to content

d2718/dmxtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dmxtools

Some Rust utilities that use dmenu, interfacing with it through the dm_x crate.

This crate contains:

dmxcm

A command-line clipboard manager:

usage: dmxcm [ OPERATION ]
where OPERATION is one of the following:
  -s, --save      save the contents of the X clipboard
  -r, --recall    recall a saved clip into the X clipboard
  -d, --delete    delete a saved clip
  -x, --expunge   delete all saved clipboard values

I bind $mod-c and $mod-v to dmxcm -s and dmxcm -r in i3 as a textual copy-paste on steroids.

dmxlaunch

A program-launcher. Parses a nested JSON file to present a series of hierarchical menus. I have $mod-z bound to dmxlaunch /home/dan/.config/dmxlaunch_menu.json in i3.

Her is an abriged launcher menu file example:

[
{
    "key":"apps",
    "desc": "Heavyweight System Applications",
    "entries": [
        {
            "key": "ff",
            "desc": "Firefox ESR (Debian Package)",
            "exec": ["/usr/bin/firefox"]
        },
        {
            "key": "gftp",
            "desc": "gFTP FTP Client",
            "exec": ["/usr/bin/gftp-gtk"]
        },
        {
            "key": "soffice",
            "desc": "LibreOffice Suite",
            "exec": ["/usr/bin/soffice"]
        }
    ]
},
{
    "key": "sys",
    "desc": "System Utilities",
    "entries": [
        { 
            "key": "arandr",
            "desc": "Visual Frontend to XRandR",
            "exec": ["/usr/bin/arandr"]
        },
        {
            "key": "sshot",
            "desc": "Take a Screenshot (5 sec delay)",
            "exec": ["/usr/bin/lua", "home/dan/.config/i3/aux_scripts/sshot.lua", "5"]
        }
    ]
},
{
    "key": "wx",
    "desc": "Current Local Weather",
    "exec": ["/usr/bin/luajit", "/home/dan/dev/wx/wx.lua", "-b"]
},
{
    "key": "wifi",
    "desc": "Wireless Network Selector",
    "exec": ["/home/dan/.local/bin/dmxwifi"]
}
]

Entries with an "entries" key will themselves be submenus, and selecting them will present a selection of the items contained in the "entries" list. Entries with an "exec" key will have the values in that list executed; the first item being the path to the program, and subsequent items being the command line arguments.

dmxwifi

A frontend and librarian for wpa_supplicant. (I don't use Arch, btw, but its wiki is the best.)

Running

dmxwifi

by itself will display a menu of detectable wifi ESSIDs; entries beginning with a * have saved passwords and can be selected and joined.

dmxwifi -p "wifi_password_here"

will present a menu of detectable wifi ESSIDs and allow you to select which one you want to associate the provided password with. You can then run dmxwifi again and select it from the list (it should have an asterisk now) to join it.

About

Some tools that use dmenu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages