From 11b53c95c96b7f50cea42e45f1811610514573c7 Mon Sep 17 00:00:00 2001 From: zachir Date: Sun, 12 Feb 2023 01:36:54 -0600 Subject: awesome move crcparse defs in rc.lua to one group --- awesome/rc.lua | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'awesome/rc.lua') diff --git a/awesome/rc.lua b/awesome/rc.lua index 41c8332..28ed104 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -80,11 +80,6 @@ local inertmode = false local spawnatbottom = true --- This is used later as the default terminal and editor to run. -terminal = "alacritty" -editor = os.getenv("EDITOR") or "nvim" -editor_cmd = terminal .. " -e " .. editor - -- Default modkey. -- Usually, Mod4 is the key with a logo between Control and Alt. -- If you do not like this or do not have such a key, @@ -126,14 +121,6 @@ function crcparse(substr) until not line end -function is_linux () - return crcparse("OS") == "Linux" -end - -function is_obsd () - return crcparse("OS") == "OpenBSD" -end - function terminal_sp_cmd (spc, cmd) if terminal == "st" then cflag = "-c" @@ -154,6 +141,25 @@ end -- }}} +-- {{{ crcparse Definitions + +-- terminal +terminal=crcparse("term") +editor = os.getenv("EDITOR") or "nvim" +editor_cmd = terminal .. " -e " .. editor + +-- is linux +function is_linux () + return crcparse("OS") == "Linux" +end + +-- is openbsd +function is_obsd () + return crcparse("OS") == "OpenBSD" +end + +-- }}} + -- {{{ Menu -- Create a launcher widget and a main menu myawesomemenu = { -- cgit v1.2.3