added emurrji

This commit is contained in:
Paul Wilde 2023-11-23 09:41:16 +00:00
parent d0142a966b
commit c341c9242a
9 changed files with 28 additions and 26 deletions

View file

@ -1,8 +1,10 @@
import model/config
import model/tool
import model/info
import model/extraargs
export config
export tool
export info
export extraargs

View file

@ -5,6 +5,7 @@ import util/pingclock
import util/batturry
import util/volurrme
import util/netwurrk
import util/emurrji
proc dispatch*(cfg: Config) =
case cfg.run
@ -18,5 +19,7 @@ proc dispatch*(cfg: Config) =
volurrme.go()
of Netwurrk:
netwurrk.go()
of Emurrji:
emurrji.go()
else:
echo "No valid run command given"

View file

@ -1,6 +1,8 @@
import os
import parsetoml
import extraargs
import tool
type
Config* = ref object
@ -9,13 +11,6 @@ type
max_lines*: int
prepend*: bool
extra_args*: seq[ExtraArg]
Tool* = enum
None,
FurryTime,
PingClock,
Batturry,
Volurrme,
Netwurrk
let config_dir* = getHomeDir() & ".config/wm_tools/"
let config_file* = config_dir & "config.toml"

10
src/model/tool.nim Normal file
View file

@ -0,0 +1,10 @@
type
Tool* = enum
None,
FurryTime,
PingClock,
Batturry,
Volurrme,
Netwurrk,
Emurrji

View file

@ -21,6 +21,9 @@ proc markup(str: string): string =
var text = stripQuotes(str)
return text
proc copyToClipboard*(str: string): bool {.discardable.} =
return false
proc genMenuCmd(data: Info, opts: varargs[string]): string =
var cmd = ""
var x_lines = len(opts) + 1

View file

@ -23,6 +23,8 @@ proc parseArgs*() =
myConfig.run = Volurrme
of "netwurrk", "network", "net":
myConfig.run = Netwurrk
of "emurrji", "emoji":
myConfig.run = Emurrji
else:
echo p.help
quit(1)

View file

@ -1,8 +1,10 @@
import ../../globurrl
import lib/emurrjilist
import std/[re]
import ../lib/emurrjilist
import ../common
import ../output
proc main() =
import re
proc go*() =
var info = newInfo("Emurrji")
var args = getEmoji()
args.add("exit")
@ -16,5 +18,3 @@ proc main() =
copyToClipboard(emoji)
return
if isMainModule:
main()

View file

@ -1,13 +0,0 @@
# Package
version = "0.1.0"
author = "Paul Wilde"
description = "An emoji picker for dmenu/rofi"
license = "MIT"
srcDir = "src"
bin = @["emurrji"]
# Dependencies
requires "nim >= 1.6.6"