tdy and add passwurrd
This commit is contained in:
parent
079c5d9526
commit
1ff912edff
6 changed files with 15 additions and 90 deletions
70
README.MD
70
README.MD
|
@ -1,70 +0,0 @@
|
|||
# A selection of information output tools for dmenu
|
||||
|
||||
These are a selection of independant tools for displaying various information
|
||||
about system status in dmenu. Some of them i.e. `volurrme` have options (up, down, mute...)
|
||||
which are selectable options in dmenu.
|
||||
|
||||
## Tools
|
||||
- `pingclurrk` performs a single `ping` to a server and returns the response time
|
||||
- `batturry` shows the current battery level
|
||||
- `brightnurrs` shows the current backlight level and gives options to adjust it
|
||||
- `volurrme` shows the current volume level and gives options to adjust and manage it
|
||||
- `calendurr` shows the date
|
||||
- `furrytime` shows the fuzzytime clock
|
||||
- `wirelurrs` shows the state of the wireless network interface. SSID connected to and signal level.
|
||||
- `netwurrk` shows the status and/or the ip address of the network interface card
|
||||
- `temperaturr` shows the current CPU temperature
|
||||
- `noteurr` a simple one liner note taking tool, displaying notes in `dmenu`/`rofi`
|
||||
- `calculaturr` a calculator, utilising `qalculate` - inspired by [@fedops](https://codeberg.org/fedops/scripts)
|
||||
- `emurrji` an emoji picker
|
||||
- `remmina_choosurr` reads the files in your remmina config directory and allows you to connect to and edit them
|
||||
- `translaturr` utilises libretranslate (you'll need and API key or your own instance) to translate test. Prefix the text with `en>de`, `de>en`, `en>fr`, etc. as you need. Must be compiled with `-d:ssl`
|
||||
- `clipurr` clipboard manager
|
||||
- `passwuurd` a passmenu clone, that works in rofi too
|
||||
- `cmd_wrappurr` a basic tool to run other `dmenu` related tools with uniform styling.
|
||||
- For example: `dmenu_run`, `clipmenu`, `passmenu` etc.
|
||||
|
||||
### Why do all the tools have "urr" in them?
|
||||
This is something I was inspired to do after writing `clipurr`… "purr", like a cat... see?
|
||||
So I thought I'd rename everything else to conform to this amazing naming convention… cool eh‽
|
||||
|
||||
|
||||
## How to compile
|
||||
There are some configuration variables explicit to me, you'll need to change them for you for them to be useful I imagine.
|
||||
Configuration variables are compile - there are no config files or runtime parameters
|
||||
|
||||
Each tool is compiled separately, for example:
|
||||
```sh
|
||||
nimble install
|
||||
or
|
||||
nim c pingclurrk
|
||||
```
|
||||
|
||||
and then run with
|
||||
```sh
|
||||
./pingclurrk
|
||||
or
|
||||
./pingclurrk rofi
|
||||
```
|
||||
|
||||
## How to use
|
||||
Personally, I have these bound to key combinations in i3 and sway.
|
||||
In fact, I have a seperate `bindsym` mode in which all these
|
||||
tools are accessible i.e. `$mod+i` to get to "info" mode then `p` to show pingclock.
|
||||
It's completely up to you how to run them, they're just simple CLI tools.
|
||||
|
||||
### You can also set the volume and brightness levels by typing a numeric figure into the dmenu/rofi input box
|
||||
|
||||
## Dependencies
|
||||
- `dmenu` or `rofi`
|
||||
- `yad` for calendar
|
||||
- basically any tool that's used to gather the information.
|
||||
- "tools" for audio etc. (`pamixer`, `ncpamixer`, etc.) can be set in the source
|
||||
|
||||
## Full disclosure
|
||||
I'm aware my code is messy.
|
||||
I'm aware my code is mostly undocumented.
|
||||
But hopefully these things are simple enough to work out.
|
||||
|
||||
|
||||
<a href="https://notnull.click/users/paul" rel="me">Fediverse</a>
|
|
@ -8,6 +8,7 @@ import util/netwurrk
|
|||
import util/emurrji
|
||||
import util/calendurr
|
||||
import util/remminurr
|
||||
import util/passwurrd
|
||||
|
||||
proc dispatch*(cfg: Config) =
|
||||
case cfg.run
|
||||
|
@ -27,5 +28,7 @@ proc dispatch*(cfg: Config) =
|
|||
calendurr.go()
|
||||
of Remminurr:
|
||||
remminurr.go()
|
||||
of Passwurrd:
|
||||
passwurrd.go()
|
||||
else:
|
||||
echo "No valid run command given"
|
||||
|
|
|
@ -9,4 +9,5 @@ type
|
|||
Netwurrk,
|
||||
Emurrji,
|
||||
Calendurr,
|
||||
Remminurr
|
||||
Remminurr,
|
||||
Passwurrd
|
||||
|
|
|
@ -29,6 +29,8 @@ proc parseArgs*() =
|
|||
myConfig.run = Calendurr
|
||||
of "remminurr", "remmina", "rdp", "rem":
|
||||
myConfig.run = Remminurr
|
||||
of "passwurrd", "password", "pw":
|
||||
myConfig.run = Passwurrd
|
||||
else:
|
||||
echo p.help
|
||||
quit(1)
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
import ../../globurrl.nim
|
||||
import std/[os,osproc,re,strutils]
|
||||
import os
|
||||
import osproc
|
||||
import re
|
||||
import strutils
|
||||
|
||||
import ../common
|
||||
import ../output
|
||||
|
||||
const pw_store = getHomeDir() & ".password-store/"
|
||||
var passwords: seq[string] = @[]
|
||||
|
@ -20,12 +25,9 @@ proc getPasswords(): seq[string] =
|
|||
proc passwordToClipboard(password: string) =
|
||||
discard execCmd("pass show -c " & password)
|
||||
|
||||
proc main() =
|
||||
proc go*() =
|
||||
var info = newInfo("Passwurrd")
|
||||
var pws = getPasswords()
|
||||
let output = outputData(info,pws)
|
||||
if output in passwords:
|
||||
passwordToClipboard(output)
|
||||
|
||||
when isMainModule:
|
||||
main()
|
|
@ -1,13 +0,0 @@
|
|||
# Package
|
||||
|
||||
version = "0.1.0"
|
||||
author = "Paul Wilde"
|
||||
description = "A new awesome nimble package"
|
||||
license = "MIT"
|
||||
srcDir = "src"
|
||||
bin = @["passwurrd"]
|
||||
|
||||
|
||||
# Dependencies
|
||||
|
||||
requires "nim >= 1.6.6"
|
Loading…
Reference in a new issue