From f9e933bebf48759ad8ca0ae515514837b3caf68d Mon Sep 17 00:00:00 2001 From: Yessiest Date: Wed, 16 Aug 2023 23:40:39 +0400 Subject: [PATCH] Fixed README.md, fixed multiple typos, set sensible defaults for desktop.conf --- README.md | 10 ++++++++-- desktop.conf | 15 ++++++++++----- libs/awmtk2.lua | 4 ++-- modules/powermanX.lua | 2 +- themes/reno98/theme.lua | 2 +- themes/unity_mate/theme.lua | 3 --- widgets/base/systray.lua | 2 +- widgets/desktop/battery.lua | 4 ++-- widgets/desktop/tasklist.lua | 17 +++++++++++------ widgets/lock/clock.lua | 4 ++-- widgets/rootmenu.lua | 2 +- 11 files changed, 39 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index c5d7af4..e6debf1 100644 --- a/README.md +++ b/README.md @@ -16,18 +16,24 @@ Thanks to the ethically questionable decision of employing JSON to Widget Layout ## Installation -The installation process is not much different from the previous iteration, except this time the window manager does not crash if you don't install luapam. Instead, the lock widget will simply refuse to operate. +Reno internally requires [ImageMagick](https://imagemagick.org/) to generate thumbnails for images. Please consider installing ImageMagick for things to function correctly. 1. `git clone` the repository to your .config folder 2. Rename `reno` folder to `awesome` 3. Install AwesomeWM (version 4.3 as of right now) -4. (Optional) Read additional installation steps in `extra/README.md` +4. Change your shell, terminal emulator, browser, keybindings and other settings in `desktop.conf` +5. (Optional) Read additional installation steps in `extra/README.md` +6. Reload your awesomewm if you have already loaded it. ## Keybindings and user guide - press win+s - read extra/README.md - enjoy +## Feedback + +Your feedback would be highly appreciated. However, please understand that I may not be able to answer all of your issues in a timely manner. + ## Roadmap - [x] Port widgets from original config to AWMTK2 diff --git a/desktop.conf b/desktop.conf index 3e09cc4..8696533 100644 --- a/desktop.conf +++ b/desktop.conf @@ -1,10 +1,15 @@ # Global variables [global] -terminal = "st" -browser = "librewolf" +# Your preferred terminal emulator +terminal = "xterm" +# Your preferred browser (opens the first one available by default) +browser = "xdg-open about:blank" +# Your modkey (Mod4 = Super key (Win key)) modkey = "Mod4" +# Your theme (one of the themes available in ./themes/) theme = "unity" -shell = "zsh" +# Your shell (currently doesn't do much, preferrably should remain the same) +shell = "bash" # Keybindings # Format: (++...)+ = "" @@ -77,9 +82,9 @@ KP_Delete = ":macro.loop" # Power manager module [powerman] -# Bad battery condition warning threshold +# Bad battery condition warning threshold (in %) battery_quality_min = 33 -# Low battery warning threshold +# Low battery warning threshold (in %) battery_capacity_min = 15 # Process to execute on low battery on_low_battery = "" diff --git a/libs/awmtk2.lua b/libs/awmtk2.lua index e4bf819..f2eac81 100644 --- a/libs/awmtk2.lua +++ b/libs/awmtk2.lua @@ -143,7 +143,7 @@ awmtk.proto_style = { -- } -- { callbacks -- a tiny bit more complex thing to account for more extensibility - -- the stub functions do nothing - you should implement functionality inside theme + -- the stub functions do nothing - you should implement functionality inside the theme onpress = function() end, onrelease = function() end, -- } @@ -463,7 +463,7 @@ awmtk.proto_templates = { end, wibar = function(style) - -- just you regular old wibar, but as a style template. + -- just your regular old wibar, but as a style template. return function(layout,options) local margins = style.wibar.margins if (style.wibar.left or diff --git a/modules/powermanX.lua b/modules/powermanX.lua index d8d5d9a..b2549ff 100644 --- a/modules/powermanX.lua +++ b/modules/powermanX.lua @@ -5,7 +5,7 @@ -- Reno desktop is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License along with Reno desktop. If not, see . --- Powerman X - second generation of the power management daemon +-- Powerman X - second generation of the power management module local awful = require("awful") local sysctl = require("syscontrol") local naughty = require("naughty") diff --git a/themes/reno98/theme.lua b/themes/reno98/theme.lua index 553db11..e2648c1 100644 --- a/themes/reno98/theme.lua +++ b/themes/reno98/theme.lua @@ -494,7 +494,7 @@ theme.widgets = { }, -- awesomewm: yo pass me that pango markup -- pango: you better not make unintuitive cryptic shit - -- awesomewm: *attach foreground setting to drawable container* + -- awesomewm: *attaches foreground text color setting to container* fg_normal = "#FAFAFA" } }, diff --git a/themes/unity_mate/theme.lua b/themes/unity_mate/theme.lua index 195fae1..765ac05 100644 --- a/themes/unity_mate/theme.lua +++ b/themes/unity_mate/theme.lua @@ -636,9 +636,6 @@ theme.widgets = { return gears.shape.rounded_rect(cr,width,height,0) end, margins = 0, - -- WARNING: Change this to true only if you're wiliing to take - -- the visual performance impact from cairo re-rendering the - -- canvas a lot! transparent = true }, icon = { diff --git a/widgets/base/systray.lua b/widgets/base/systray.lua index e4e0dee..68e9007 100644 --- a/widgets/base/systray.lua +++ b/widgets/base/systray.lua @@ -21,7 +21,7 @@ return function(args) if args.vertical then widget:get_children_by_id("systray")[1]:set_horizontal(false) end - -- Part of a private API + -- Stolen from the API. Apparently this function is entirely undocumented. if awesome.systray() == 0 then widget.visible = false end diff --git a/widgets/desktop/battery.lua b/widgets/desktop/battery.lua index e8dcf68..4a45a07 100644 --- a/widgets/desktop/battery.lua +++ b/widgets/desktop/battery.lua @@ -15,7 +15,7 @@ local syscontrol = require("syscontrol") local ask = require("asckey") local function get_virtual_icon(data) - -- Get an icon from a cumulative total of battery percentages and current charging state + -- Get an icon from average of total battery percentage and current charging state local count = 0 local cumulative = 0 local name = "battery-" @@ -142,7 +142,7 @@ return function(args) percentage_map["charge"] = data.online end end - -- "Virtual" here means a battery that displays the state of a cumulative total of all attached batteries (as if there are any devices that even have more than 1 battery) + -- "Virtual" here means an abstract icon that represents the average state of all batteries. local function update_virtual_battery() local icon = battery_widget:get_children_by_id("virtual_id")[1] local percentage = battery_widget:get_children_by_id("percentage_id")[1] diff --git a/widgets/desktop/tasklist.lua b/widgets/desktop/tasklist.lua index 74f842d..2947875 100644 --- a/widgets/desktop/tasklist.lua +++ b/widgets/desktop/tasklist.lua @@ -60,13 +60,17 @@ return function(args) return end local textbox = self:get_children_by_id("text_role")[1] or {} - -- Apparently the original system for changing bgimage is + -- Apparently the original system for changing + -- the bgimage of a tasklist is -- 1) broken -- 2) uses deprecated functions (nice code practices awesomewm) -- Solution: write my own. I blame material design for all this. - -- (P.S: Not to bullshit you, check it yourself - replicatable - -- by adding theme.tasklist_bg_image_normal or - -- theme.tasklist_bg_image_focus in current beautiful theme.) + -- (P.S: Not to bullshit you, check it yourself: + -- you can replicate this by adding + -- ``theme.tasklist_bg_image_normal`` + -- or + -- ``theme.tasklist_bg_image_focus`` + -- in the default awesomewm config.) local onfocus = function() self.bgimage = style.button.bgimage_focus self.bg = style.button.bg_focus @@ -105,13 +109,14 @@ return function(args) c:connect_signal("unfocus",onunfocus) c:connect_signal("property::urgent",onurgent) c:connect_signal("property::minimized",onminimize) - if client.focus == c then + if client.focus == c then onfocus() else onunfocus() end end, - -- Uncomment this only, and **ONLY** if you actually need it. + -- Uncomment this only, and **ONLY** if you actually need it. + -- (P.S: you don't need it.) --id = "background_role" }) return awful.widget.tasklist { diff --git a/widgets/lock/clock.lua b/widgets/lock/clock.lua index bbd852d..956e056 100644 --- a/widgets/lock/clock.lua +++ b/widgets/lock/clock.lua @@ -20,14 +20,14 @@ return function(args) awmtk2.generic.status_widget,args.style,args.vertical) local templates = awmtk2.create_template_lib("lock_clock",awmtk2.templates,args.templates) local t = awmtk2.build_templates(templates,style,args.vertical) - -- Don't mind me just stealing default library code + -- Don't mind me just stealing standard library code local format = args.format or "%a %b %d, %H:%M" local refresh = args.refresh or 60 local tzid = args.tzid local timezone = (tzid and TimeZone.new(tzid)) or TimeZone.new_local() -- Seriously, was it so hard to add a font parameter for textclock? - -- Do you actually expect of nobody to change the font to something like + -- Do you actually expect nobody to change the font to something like -- idk, 7-segment display? Goddamnit awesome. I trusted you. local widget = wibox.widget(t.container(t.textbox({ id = "clocktext" diff --git a/widgets/rootmenu.lua b/widgets/rootmenu.lua index 4fe14e8..94a4b1c 100644 --- a/widgets/rootmenu.lua +++ b/widgets/rootmenu.lua @@ -77,7 +77,7 @@ return function(args) end end end) - -- If any of the menus emits cascade::kill, close the menu + -- If any of the menus emit cascade::kill, close the menu for _,v in pairs(menus) do v:connect_signal("cascade::kill",function() root_menu.visible = false