From 2528abf865dd51499480083388d9679a8102a5aa Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 25 Aug 2022 15:07:44 +1000 Subject: [PATCH] import-ish? --- init.lua | 63 +++++++ keyboard.svg | 214 ++++++++++++++++++++++ launcher.svg | 357 ++++++++++++++++++++++++++++++++++++ switcher.svg | 503 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1137 insertions(+) create mode 100644 init.lua create mode 100644 keyboard.svg create mode 100644 launcher.svg create mode 100644 switcher.svg diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..457a8dd --- /dev/null +++ b/init.lua @@ -0,0 +1,63 @@ +local navbar = { + iconSize = 96, + iconPath = gears.filesystem.get_configuration_dir() .. "/awesome-navbar/", + navbar.launcher = "xfce4-appfinder" +} +function navbar.new(s) + local landscape = s.geometry.width > s.geometry.height + local portrait = not landscape + local tasklist = switcherpopup.new(s) + local launcher = launcherpopup.new(s) + local switcher_button = wibox.container.place(awful.widget.button({image = navbar.iconPath .. "/switcher.svg"}), "center", "center") + switcher_button:buttons(gears.table.join( + switcher_button:buttons(), + awful.button({}, 1, nil, function() + launcher:hide() + tasklist:toggle() + end) + )) + local kb_button = wibox.container.place(awful.widget.button({image = navbar.iconPath .. "/keyboard.svg"}), "center", "center") + kb_button:buttons(gears.table.join( + kb_button:buttons(), + awful.button({}, 1, nil, function() + s.keyboard.visible = not s.keyboard.visible + end) + )) + local launcher_button = wibox.container.place(awful.widget.button({image = navbar.iconPath .. "/launcher.svg"}), "center", "center") + longpress.add(launcher_button,function() + tasklist:hide() + launcher:toggle() + end, + function() + awful.spawn(navbar.launcher) + end) + + local navbar = awful.wibar({ + ontop = true, + screen = s + }) + function navbar.reflow() + position = landscape and "left" or "bottom", + height = (portrait and navbar.iconSize) or nil, + width = (landscape and navbar.iconSize) or nil, + navbar:setup({ + layout = landscape and wibox.layout.ratio.vertical or wibox.layout.ratio.horizontal, launcher_button, switcher_button, kb_button + }) + end + navbar.reflow() + + s.keyboard = awful.wibar({ + height = s.geometry.height * 0.25, + opacity = 0.75, + position = "bottom", + visible = false, + ontop = true, + screen = s + }) + + s.keyboard:setup ({ + layout = wibox.layout.ratio.horizontal, + vkbd + }) + return navbar +end diff --git a/keyboard.svg b/keyboard.svg new file mode 100644 index 0000000..7b77a56 --- /dev/null +++ b/keyboard.svg @@ -0,0 +1,214 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/launcher.svg b/launcher.svg new file mode 100644 index 0000000..1c4afbf --- /dev/null +++ b/launcher.svg @@ -0,0 +1,357 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/switcher.svg b/switcher.svg new file mode 100644 index 0000000..8063043 --- /dev/null +++ b/switcher.svg @@ -0,0 +1,503 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +