diff options
author | zachir <zachir@librem.one> | 2023-02-12 01:36:54 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-02-12 01:37:07 -0600 |
commit | 11b53c95c96b7f50cea42e45f1811610514573c7 (patch) | |
tree | 17c5eda383741a85d9ac178bc8a197aa0a04bf46 /awesome | |
parent | 5b7230433e9c173062d571aac34917222500dc62 (diff) |
awesome move crcparse defs in rc.lua to one group
Diffstat (limited to 'awesome')
-rw-r--r-- | awesome/rc.lua | 32 |
1 files changed, 19 insertions, 13 deletions
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 = { |