added urrl in prompt
This commit is contained in:
parent
1fa63c2839
commit
d88e57f367
17 changed files with 24 additions and 23 deletions
|
@ -88,7 +88,7 @@ proc getDesign(charge: int, state: bool): (string, string, string, string, strin
|
||||||
|
|
||||||
proc getOutput(charge: int, state: bool): Info =
|
proc getOutput(charge: int, state: bool): Info =
|
||||||
let (html_text,main_text,col,bg_col,highlight_col) = get_design(charge, state)
|
let (html_text,main_text,col,bg_col,highlight_col) = get_design(charge, state)
|
||||||
var data = newInfo("Battery")
|
var data = newInfo("Batturry")
|
||||||
data.full_text = main_text
|
data.full_text = main_text
|
||||||
data.selected_bg = highlight_col
|
data.selected_bg = highlight_col
|
||||||
data.selected_fg = col # may just want `black` here
|
data.selected_fg = col # may just want `black` here
|
||||||
|
|
|
@ -59,7 +59,7 @@ proc getBrightness*(run_once: bool = false) =
|
||||||
let pcnt = (current/limit)*100
|
let pcnt = (current/limit)*100
|
||||||
if pcnt != last_pcnt:
|
if pcnt != last_pcnt:
|
||||||
let text = getDesign(pcnt)
|
let text = getDesign(pcnt)
|
||||||
var data = newInfo("Brightness")
|
var data = newInfo("Brightnurrs")
|
||||||
data.full_text = text
|
data.full_text = text
|
||||||
data.selected_bg = default_fg
|
data.selected_bg = default_fg
|
||||||
data.selected_fg = default_bg
|
data.selected_fg = default_bg
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import ../../globurrl
|
import ../../globurrl
|
||||||
import std/[osproc,strutils,sequtils]
|
import std/[osproc,strutils,sequtils]
|
||||||
|
|
||||||
#using qalc as it has a lot of nice inbuilt features
|
# using qalc as it has a lot of nice inbuilt features
|
||||||
#
|
# may be nice to make it totally non-dependant on other things though
|
||||||
|
|
||||||
proc doCalculation(calc: string) =
|
proc doCalculation(calc: string) =
|
||||||
var info = newInfo("Calculator")
|
var info = newInfo("Calculaturr")
|
||||||
let ans_cmd_terse = "echo \"" & calc & "\" | qalc +u8 -terse -color=never | awk '!/^>/ && !/^$/ {gsub(/^[ \\t]+|[ \\t]+$/, \"\", $0); print}'"
|
let ans_cmd_terse = "echo \"" & calc & "\" | qalc +u8 -terse -color=never | awk '!/^>/ && !/^$/ {gsub(/^[ \\t]+|[ \\t]+$/, \"\", $0); print}'"
|
||||||
let ans_cmd_full = "echo \"" & calc & "\" | qalc +u8 -color=never | awk '!/^>/ && !/^$/ {gsub(/^[ \\t]+|[ \\t]+$/, \"\", $0); print}'"
|
let ans_cmd_full = "echo \"" & calc & "\" | qalc +u8 -color=never | awk '!/^>/ && !/^$/ {gsub(/^[ \\t]+|[ \\t]+$/, \"\", $0); print}'"
|
||||||
var ans_full = execCmdEx(ans_cmd_full)
|
var ans_full = execCmdEx(ans_cmd_full)
|
||||||
|
@ -24,7 +25,7 @@ proc doCalculation(calc: string) =
|
||||||
doCalculation(cmd)
|
doCalculation(cmd)
|
||||||
|
|
||||||
proc main() =
|
proc main() =
|
||||||
var info = newInfo("Calculator")
|
var info = newInfo("Calculaturr")
|
||||||
let args = @["exit"]
|
let args = @["exit"]
|
||||||
let cmd = outputData(info, args)
|
let cmd = outputData(info, args)
|
||||||
if cmd != "":
|
if cmd != "":
|
||||||
|
|
|
@ -8,7 +8,7 @@ const cal_pos_x = "20"
|
||||||
const cal_pos_y = "20"
|
const cal_pos_y = "20"
|
||||||
|
|
||||||
proc getObject(date: string): Info =
|
proc getObject(date: string): Info =
|
||||||
var data = newInfo("Date")
|
var data = newInfo("Calendurr")
|
||||||
data.full_text = date
|
data.full_text = date
|
||||||
data.border = default_bg
|
data.border = default_bg
|
||||||
data.selected_bg = default_bg
|
data.selected_bg = default_bg
|
||||||
|
|
|
@ -3,7 +3,7 @@ import lib/emurrjilist
|
||||||
import std/[re]
|
import std/[re]
|
||||||
|
|
||||||
proc main() =
|
proc main() =
|
||||||
var info = newInfo("Emoji Picker")
|
var info = newInfo("Emurrji")
|
||||||
var args = getEmoji()
|
var args = getEmoji()
|
||||||
args.add("exit")
|
args.add("exit")
|
||||||
let output = outputData(info,args)
|
let output = outputData(info,args)
|
||||||
|
|
|
@ -73,7 +73,7 @@ proc getMinute(min: int): string =
|
||||||
return "error"
|
return "error"
|
||||||
|
|
||||||
proc getObject(time: string): Info =
|
proc getObject(time: string): Info =
|
||||||
var data = newInfo("Fuzzy Time")
|
var data = newInfo("Furry Time")
|
||||||
data.full_text = time
|
data.full_text = time
|
||||||
data.selected_bg = default_bg
|
data.selected_bg = default_bg
|
||||||
data.selected_fg = default_fg
|
data.selected_fg = default_fg
|
||||||
|
|
|
@ -185,7 +185,7 @@ proc getWorkspaces(): seq[Workspace] =
|
||||||
proc showWorkspaces() =
|
proc showWorkspaces() =
|
||||||
my_workspaces = @[]
|
my_workspaces = @[]
|
||||||
getTree()
|
getTree()
|
||||||
var info = newInfo("Workspaces")
|
var info = newInfo("Wurrkspaces")
|
||||||
var args: seq[string] = @[]
|
var args: seq[string] = @[]
|
||||||
for ws in my_workspaces:
|
for ws in my_workspaces:
|
||||||
args.add(ws.display_string)
|
args.add(ws.display_string)
|
||||||
|
|
|
@ -28,7 +28,7 @@ proc getConnState(nic: string): (string, string) =
|
||||||
return (ip, state)
|
return (ip, state)
|
||||||
|
|
||||||
proc getObject(): Info =
|
proc getObject(): Info =
|
||||||
var data = newInfo("IP")
|
var data = newInfo("Netwurrk")
|
||||||
data.selected_bg = default_bg
|
data.selected_bg = default_bg
|
||||||
data.selected_fg = default_fg
|
data.selected_fg = default_fg
|
||||||
# i3bar stuff
|
# i3bar stuff
|
||||||
|
|
|
@ -64,7 +64,7 @@ proc writeNote(note: Note, is_new: bool = false) =
|
||||||
echo "write_note, Unable to write note : ", note.id, " : ", getCurrentExceptionMsg()
|
echo "write_note, Unable to write note : ", note.id, " : ", getCurrentExceptionMsg()
|
||||||
|
|
||||||
proc getNotes(): (Info, seq[string]) =
|
proc getNotes(): (Info, seq[string]) =
|
||||||
var info = newInfo("Notes")
|
var info = newInfo("Noteurr")
|
||||||
info.selected_bg = default_bg
|
info.selected_bg = default_bg
|
||||||
info.selected_fg = default_fg
|
info.selected_fg = default_fg
|
||||||
let notes = getNoteStrings()
|
let notes = getNoteStrings()
|
||||||
|
@ -115,7 +115,7 @@ proc replaceNote(new_text: string, old_text: string) =
|
||||||
return
|
return
|
||||||
|
|
||||||
proc displayOptionMenu(option: string) =
|
proc displayOptionMenu(option: string) =
|
||||||
var select = newInfo("Note")
|
var select = newInfo("Noteurr")
|
||||||
select.selected_bg = default_bg
|
select.selected_bg = default_bg
|
||||||
select.selected_fg = default_fg
|
select.selected_fg = default_fg
|
||||||
let note_choices = @["rm","back"]
|
let note_choices = @["rm","back"]
|
||||||
|
|
|
@ -44,7 +44,7 @@ proc getObject(ping: float): Info =
|
||||||
else:
|
else:
|
||||||
state = 9
|
state = 9
|
||||||
|
|
||||||
var data = newInfo("Ping Clock")
|
var data = newInfo("Ping Clurrk")
|
||||||
data.full_text = text
|
data.full_text = text
|
||||||
# i3bar stuff
|
# i3bar stuff
|
||||||
data.color = default_fg
|
data.color = default_fg
|
||||||
|
|
|
@ -39,7 +39,7 @@ proc startRemmina(conn: string) =
|
||||||
discard execCmd("remmina -c " & quote(session))
|
discard execCmd("remmina -c " & quote(session))
|
||||||
|
|
||||||
proc selectRemmina(conn: string) =
|
proc selectRemmina(conn: string) =
|
||||||
var info = newInfo("Remmina : " & conn)
|
var info = newInfo("Remmina Choosurr : " & conn)
|
||||||
let args = @["connect", "edit", "back"]
|
let args = @["connect", "edit", "back"]
|
||||||
let output = outputData(info,args)
|
let output = outputData(info,args)
|
||||||
if output in args:
|
if output in args:
|
||||||
|
@ -56,7 +56,7 @@ proc selectRemmina(conn: string) =
|
||||||
|
|
||||||
|
|
||||||
proc main() =
|
proc main() =
|
||||||
var info = newInfo("Remmina")
|
var info = newInfo("Remmina Choosurr")
|
||||||
var args: seq[string] = getRemminaFiles()
|
var args: seq[string] = getRemminaFiles()
|
||||||
args.add("new")
|
args.add("new")
|
||||||
args.add("exit")
|
args.add("exit")
|
||||||
|
|
|
@ -40,7 +40,7 @@ proc openFile(filename: string) =
|
||||||
return
|
return
|
||||||
|
|
||||||
proc showScreenshotSaveSel(filename: string) =
|
proc showScreenshotSaveSel(filename: string) =
|
||||||
let info = newInfo("Save Screenshot")
|
let info = newInfo("Screenshurrt")
|
||||||
let args = @["clipboard", "save", "open", "---", "exit"]
|
let args = @["clipboard", "save", "open", "---", "exit"]
|
||||||
let choice = outputData(info,args)
|
let choice = outputData(info,args)
|
||||||
if choice == "---":
|
if choice == "---":
|
||||||
|
@ -58,7 +58,7 @@ proc showScreenshotSaveSel(filename: string) =
|
||||||
return
|
return
|
||||||
|
|
||||||
proc showScreenshotTypeSel() =
|
proc showScreenshotTypeSel() =
|
||||||
let info = newInfo("Screenshot type")
|
let info = newInfo("Screenshurrt type")
|
||||||
let args = concat(TYPES,@["---","exit"])
|
let args = concat(TYPES,@["---","exit"])
|
||||||
let choice = outputData(info,args)
|
let choice = outputData(info,args)
|
||||||
if choice in TYPES:
|
if choice in TYPES:
|
||||||
|
|
|
@ -49,7 +49,7 @@ proc getObject(temp: int): Info =
|
||||||
icon = ""
|
icon = ""
|
||||||
let text = "<span foreground='" & bg_col & "'>" & icon & "</span> " & $temp & "°C"
|
let text = "<span foreground='" & bg_col & "'>" & icon & "</span> " & $temp & "°C"
|
||||||
let main_text = icon & " " & $temp & "°C"
|
let main_text = icon & " " & $temp & "°C"
|
||||||
var data = newInfo("Temperature")
|
var data = newInfo("Temperaturr")
|
||||||
data.full_text = main_text
|
data.full_text = main_text
|
||||||
data.selected_bg = bg_col
|
data.selected_bg = bg_col
|
||||||
data.selected_fg = fg_col
|
data.selected_fg = fg_col
|
||||||
|
|
|
@ -71,7 +71,7 @@ proc getDesign(tides: seq[Tide]): Info =
|
||||||
for tide in tides:
|
for tide in tides:
|
||||||
let str = icon & tide.State[0] & " " & tide.Time & " " & tide.Height
|
let str = icon & tide.State[0] & " " & tide.Time & " " & tide.Height
|
||||||
my_tides.add(str)
|
my_tides.add(str)
|
||||||
var data = newInfo("Tides")
|
var data = newInfo("Tideurrl")
|
||||||
data.border = black
|
data.border = black
|
||||||
data.args = my_tides
|
data.args = my_tides
|
||||||
return data
|
return data
|
||||||
|
|
|
@ -92,7 +92,7 @@ proc detectLanguage(str: string) =
|
||||||
return
|
return
|
||||||
|
|
||||||
proc main(messages:varargs[string] = @[]) =
|
proc main(messages:varargs[string] = @[]) =
|
||||||
var info = newInfo("Translate")
|
var info = newInfo("Translaturr")
|
||||||
info.selected_bg = green
|
info.selected_bg = green
|
||||||
var args: seq[string] = @[]
|
var args: seq[string] = @[]
|
||||||
for msg in messages:
|
for msg in messages:
|
||||||
|
|
|
@ -66,7 +66,7 @@ proc volumeMute() =
|
||||||
proc getVolume*(run_once: bool = false) =
|
proc getVolume*(run_once: bool = false) =
|
||||||
let vol = getCurrentVolume()
|
let vol = getCurrentVolume()
|
||||||
let (text, main_text) = getDesign(vol)
|
let (text, main_text) = getDesign(vol)
|
||||||
var data = newInfo("Volume")
|
var data = newInfo("Volurrme")
|
||||||
data.full_text = main_text
|
data.full_text = main_text
|
||||||
data.selected_bg = default_bg
|
data.selected_bg = default_bg
|
||||||
data.selected_fg = default_fg
|
data.selected_fg = default_fg
|
||||||
|
|
|
@ -27,7 +27,7 @@ proc getWifi(nic: string): (string, string) =
|
||||||
return (ssid, quality)
|
return (ssid, quality)
|
||||||
|
|
||||||
proc getObject(): Info =
|
proc getObject(): Info =
|
||||||
var data = newInfo("WiFi")
|
var data = newInfo("Wirelurrs")
|
||||||
data.border = purple
|
data.border = purple
|
||||||
data.selected_bg = default_bg
|
data.selected_bg = default_bg
|
||||||
data.selected_fg = default_fg
|
data.selected_fg = default_fg
|
||||||
|
|
Loading…
Reference in a new issue