aboutsummaryrefslogtreecommitdiffstats
path: root/.config/luastatus-scripts-dwm/tor.lua
blob: db972258a9a0615ce7502e6194eafb206efab4dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- Trivial but somewhat useful widget showing if the Tor daemon is running.

widget = {
    plugin = 'timer',
    opts = {period = 5},
    cb = function()
        local f = io.open('/var/run/tor/tor.pid', 'r')
        if f then
            f:close()
            return '[TOR]'
        end
    end,
}