diff --git a/conf/awesome/awesome/lib/brightness.lua b/conf/awesome/awesome/lib/brightness.lua deleted file mode 100644 index 91cdb9b..0000000 --- a/conf/awesome/awesome/lib/brightness.lua +++ /dev/null @@ -1,21 +0,0 @@ -local awful = require "awful" - -local brightness = {} - -brightness.increase = function() - local script = [[ - brightnessctl set 3%+ - ]] - - awful.spawn.with_shell(script) -end - -brightness.decrease = function() - local script = [[ - brightnessctl set 3%- - ]] - - awful.spawn.with_shell(script) -end - -return brightness diff --git a/conf/awesome/awesome/lib/rubato b/conf/awesome/awesome/lib/rubato deleted file mode 160000 index 7ed12e1..0000000 --- a/conf/awesome/awesome/lib/rubato +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7ed12e183583a7ce3b59714452217af9a1f02ce6 diff --git a/conf/awesome/awesome/lib/screenshot.lua b/conf/awesome/awesome/lib/screenshot.lua deleted file mode 100644 index ff55a83..0000000 --- a/conf/awesome/awesome/lib/screenshot.lua +++ /dev/null @@ -1,43 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local naughty = require "naughty" - -local notify = require "misc.notif.notify" - -local screenshot = {} - -screenshot.now = function() - local time = os.date("%y-%m-%d_%H:%M:%S") - local location = "/tmp/"..time..".png" - - local script = [[ - maim | tee ]]..location..[[ | xclip -selection clipboard -t image/png - ]] - - awful.spawn.with_shell(script) - notify.screenshot(location) -end - -screenshot.later = function() - local time = os.date("%y-%m-%d_%H:%M:%S") - local location = "/tmp/"..time..".png" - - local script = [[ - maim -d 5 | tee ]]..location..[[ | xclip -selection clipboard -t image/png - ]] - - awful.spawn.with_shell(script) - - gears.timer { - timeout = 6, - autostart = false, - call_now = false, - single_shot = true, - callback = function() - notify.screenshot(location) - end - }:start() - -end - -return screenshot diff --git a/conf/awesome/awesome/lib/volume.lua b/conf/awesome/awesome/lib/volume.lua deleted file mode 100644 index 00bcc2d..0000000 --- a/conf/awesome/awesome/lib/volume.lua +++ /dev/null @@ -1,117 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - -local volume = {} - --- Popup ----------- - -volume.popup = wibox { - visible = false, - ontop = true, - width = dpi(300), - height = dpi(70), - bg = beautiful.transparent -} - -awful.placement.bottom(volume.popup, { margins = {bottom = dpi(100)}}) - --- Popup Widget ------------------ - -local indicator = wibox.widget { - background_color = beautiful.bg, - color = beautiful.blue, - shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,8) end, - max_value = 100, - widget = wibox.widget.progressbar, -} - -volume.popup : setup { - indicator, - { - { - font = "Roboto 24", - align = "left", - markup = "󰕾", - widget = wibox.widget.textbox, - }, - margins = {left = dpi(20)}, - widget = wibox.container.margin, - }, - layout = wibox.layout.stack, -} - -volume.lifespan = gears.timer { - timeout = 1, - call_now = false, - autostart = false, - single_shot = true, - callback = function() - volume.popup.visible = false - end -} - --- Get Vol -function volume.get_vol() - script = 'pamixer --get-volume' - script2 = 'pamixer --get-mute' - awful.spawn.easy_async_with_shell(script, function(vol) - awful.spawn.easy_async_with_shell(script2, function(is_mute) - if is_mute:match("true") then muted = true else - muted = false - end - - if muted then indicator.color = beautiful.red else - indicator.color = beautiful.blue - end - vol = tonumber(vol:match("(%d+)")) - indicator.value = tonumber(vol) - end) - end) -end - -function volume.changed() - volume.popup.visible = true - if not volume.popup.visible then volume.lifespan:start() else - volume.lifespan:again() - end -end - --- Control Room ------------------ - -volume.increase = function() - local script = [[ - pamixer -i 3 - ]] - - awful.spawn(script, false) - volume.get_vol() - volume.changed() -end - -volume.decrease = function() - local script = [[ - pamixer -d 3 - ]] - - awful.spawn(script, false) - volume.get_vol() - volume.changed() -end - -volume.mute = function() - local script = [[ - pamixer -t - ]] - - awful.spawn(script, false) - volume.get_vol() - volume.changed() -end - -return volume diff --git a/conf/awesome/awesome/main/apps.lua b/conf/awesome/awesome/main/apps.lua deleted file mode 100644 index c00ad02..0000000 --- a/conf/awesome/awesome/main/apps.lua +++ /dev/null @@ -1,9 +0,0 @@ -local apps = { - terminal = "wezterm", - launcher = "rofi -show drun", - browser = "firefox", - picture = "feh", - fileManager = "thunar", -} - -return apps diff --git a/conf/awesome/awesome/main/autorun.sh b/conf/awesome/awesome/main/autorun.sh deleted file mode 100644 index 02ce6b8..0000000 --- a/conf/awesome/awesome/main/autorun.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -picom --config .config/picom/picom.conf diff --git a/conf/awesome/awesome/main/bindings/bindings.lua b/conf/awesome/awesome/main/bindings/bindings.lua deleted file mode 100644 index 90c4f1d..0000000 --- a/conf/awesome/awesome/main/bindings/bindings.lua +++ /dev/null @@ -1,242 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local naughty = require "naughty" -local beautiful = require "beautiful" - -local apps = require "main.apps" - -modkey = "Mod4" - --- General awesome keybindings -awful.keyboard.append_global_keybindings({ - awful.key({ modkey, "Control" }, "r", awesome.restart, - {description = "reload awesome", group = "awesome"}), - awful.key({ modkey, "Shift" }, "q", awesome.quit, - {description = "quit awesome", group = "awesome"}), - awful.key({ modkey }, "x", - function () - awful.prompt.run { - prompt = "Run Lua code: ", - textbox = awful.screen.focused().mypromptbox.widget, - exe_callback = awful.util.eval, - history_path = awful.util.get_cache_dir() .. "/history_eval" - } - end, - {description = "lua execute prompt", group = "awesome"}), - awful.key({ modkey, }, "Return", function () awful.spawn(apps.terminal) end, - {description = "open a terminal", group = "launcher"}), - awful.key({ modkey }, "p", function() menubar.show() end, - {description = "show the menubar", group = "launcher"}), -}) - --- Tag bindings -awful.keyboard.append_global_keybindings({ - awful.key({ modkey, }, "Left", awful.tag.viewprev, - {description = "view previous", group = "tag"}), - awful.key({ modkey, }, "Right", awful.tag.viewnext, - {description = "view next", group = "tag"}), - awful.key({ modkey, }, "Escape", awful.tag.history.restore, - {description = "go back", group = "tag"}), -}) - -awful.keyboard.append_global_keybindings({ - awful.key { - modifiers = { modkey }, - keygroup = "numrow", - description = "only view tag", - group = "tag", - on_press = function (index) - local screen = awful.screen.focused() - local tag = screen.tags[index] - if tag then - tag:view_only() - end - end, - }, - awful.key { - modifiers = { modkey, "Control" }, - keygroup = "numrow", - description = "toggle tag", - group = "tag", - on_press = function (index) - local screen = awful.screen.focused() - local tag = screen.tags[index] - if tag then - awful.tag.viewtoggle(tag) - end - end, - }, - awful.key { - modifiers = { modkey, "Shift" }, - keygroup = "numrow", - description = "move focused client to tag", - group = "tag", - on_press = function (index) - if client.focus then - local tag = client.focus.screen.tags[index] - if tag then - client.focus:move_to_tag(tag) - end - end - end, - }, - awful.key { - modifiers = { modkey, "Control", "Shift" }, - keygroup = "numrow", - description = "toggle focused client on tag", - group = "tag", - on_press = function (index) - if client.focus then - local tag = client.focus.screen.tags[index] - if tag then - client.focus:toggle_tag(tag) - end - end - end, - }, - awful.key { - modifiers = { modkey }, - keygroup = "numpad", - description = "select layout directly", - group = "layout", - on_press = function (index) - local t = awful.screen.focused().selected_tag - if t then - t.layout = t.layouts[index] or t.layout - end - end, - } -}) - --- Focus bindings -awful.keyboard.append_global_keybindings({ - awful.key({ modkey, }, "j", - function () - awful.client.focus.byidx( 1) - end, - {description = "focus next by index", group = "client"} - ), - awful.key({ modkey, }, "k", - function () - awful.client.focus.byidx(-1) - end, - {description = "focus previous by index", group = "client"} - ), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end, - {description = "go back", group = "client"}), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, - {description = "focus the next screen", group = "screen"}), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, - {description = "focus the previous screen", group = "screen"}), - awful.key({ modkey, "Control" }, "n", - function () - local c = awful.client.restore() - -- Focus restored client - if c then - c:activate { raise = true, context = "key.unminimize" } - end - end, - {description = "restore minimized", group = "client"}), -}) - --- Layout bindings -awful.keyboard.append_global_keybindings({ - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, - {description = "swap with next client by index", group = "client"}), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, - {description = "swap with previous client by index", group = "client"}), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto, - {description = "jump to urgent client", group = "client"}), - awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, - {description = "increase master width factor", group = "layout"}), - awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, - {description = "decrease master width factor", group = "layout"}), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, - {description = "increase the number of master clients", group = "layout"}), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, - {description = "decrease the number of master clients", group = "layout"}), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, - {description = "increase the number of columns", group = "layout"}), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, - {description = "decrease the number of columns", group = "layout"}), - awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, - {description = "select next", group = "layout"}), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, - {description = "select previous", group = "layout"}), -}) - --- Client bindings -client.connect_signal("request::default_keybindings", function() - awful.keyboard.append_client_keybindings({ - awful.key({ modkey, }, "f", - function (c) - c.fullscreen = not c.fullscreen - c:raise() - end, - {description = "toggle fullscreen", group = "client"}), - awful.key({ modkey }, "q", function (c) c:kill() end, - {description = "close", group = "client"}), - awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , - {description = "toggle floating", group = "client"}), - awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, - {description = "move to master", group = "client"}), - awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, - {description = "move to screen", group = "client"}), - awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, - {description = "toggle keep on top", group = "client"}), - awful.key({ modkey, }, "n", - function (c) - -- The client currently has the input focus, so it cannot be - -- minimized, since minimized clients can't have the focus. - c.minimized = true - end , - {description = "minimize", group = "client"}), - awful.key({ modkey, }, "m", - function (c) - c.maximized = not c.maximized - c:raise() - end , - {description = "(un)maximize", group = "client"}), - awful.key({ modkey, "Control" }, "m", - function (c) - c.maximized_vertical = not c.maximized_vertical - c:raise() - end , - {description = "(un)maximize vertically", group = "client"}), - awful.key({ modkey, "Shift" }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c:raise() - end , - {description = "(un)maximize horizontally", group = "client"}), - }) -end) - --- Mouse bindings -awful.mouse.append_global_mousebindings({ - awful.button({ }, 3, function () mainmenu:toggle() return end), - awful.button({ }, 4, awful.tag.viewprev), - awful.button({ }, 5, awful.tag.viewnext), -}) - -client.connect_signal("request::default_mousebindings", function() - awful.mouse.append_client_mousebindings({ - awful.button({ }, 1, function (c) - c:activate { context = "mouse_click" } - end), - awful.button({ modkey }, 1, function (c) - c:activate { context = "mouse_click", action = "mouse_move" } - end), - awful.button({ modkey }, 3, function (c) - c:activate { context = "mouse_click", action = "mouse_resize"} - end), - }) -end) - - diff --git a/conf/awesome/awesome/main/bindings/custom_bindings.lua b/conf/awesome/awesome/main/bindings/custom_bindings.lua deleted file mode 100644 index fd0e819..0000000 --- a/conf/awesome/awesome/main/bindings/custom_bindings.lua +++ /dev/null @@ -1,27 +0,0 @@ -local awful = require "awful" - -local apps = require "main.apps" -local volume = require "lib.volume" -local brightness = require "lib.brightness" - -modkey = "Mod4" -alt = "Mod1" - -awful.keyboard.append_global_keybindings({ - awful.key({modkey}, "r", function() awful.spawn(apps.launcher, false) end), -- Rofi - awful.key({alt}, "c", function() awesome.emit_signal("sidebar::toggle") end), -- Sidebar - awful.key({alt}, "t", function() awful.titlebar.toggle(client.focus) end), -- Toggle titlebar -}) - --- Volume -awful.keyboard.append_global_keybindings({ - awful.key({ }, "XF86AudioRaiseVolume", function() volume.increase() end), - awful.key({ }, "XF86AudioLowerVolume", function() volume.decrease() end), - awful.key({ }, "XF86AudioMute", function() volume.mute() end) -}) - --- Brightness -awful.keyboard.append_global_keybindings({ - awful.key({ }, "XF86MonBrightnessUp", function() brightness.increase() end), - awful.key({ }, "XF86MonBrightnessDown", function() brightness.decrease() end) -}) diff --git a/conf/awesome/awesome/main/error_handling.lua b/conf/awesome/awesome/main/error_handling.lua deleted file mode 100644 index 8e2f91c..0000000 --- a/conf/awesome/awesome/main/error_handling.lua +++ /dev/null @@ -1,9 +0,0 @@ -local naughty = require "naughty" - -naughty.connect_signal("request::display_error", function(message, startup) - naughty.notification { - urgency = "critical", - title = "Oops, an error happened"..(startup and " during startup!" or "!"), - message = message - } -end) diff --git a/conf/awesome/awesome/main/layout.lua b/conf/awesome/awesome/main/layout.lua deleted file mode 100644 index c36704c..0000000 --- a/conf/awesome/awesome/main/layout.lua +++ /dev/null @@ -1,93 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local beautiful = require "beautiful" - --- Layout -awful.layout.layouts = { - awful.layout.suit.floating, - awful.layout.suit.tile, -} - --- Client rules -client.connect_signal("mouse::enter", function(c) - c:activate {context = "mouse_enter", raise = false} -end) - -client.connect_signal("request::manage", function (c) - if awesome.startup then awful.client.setslave(c) end -end) - --- Rounded Corners (I use picom so didn't need those btw) ---[[ -client.connect_signal("request::manage", function(c) - if c.fullscreen or c.maximized then - c.shape = function(cr,w,h) gears.shape.rectangle(cr,w,h) end - else - c.shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,8) end - end -end) - --- Disable Rounded Corners when fullscreen or maximized -local function disable_rounded(c) - if c.fullscreen or c.maximized then - c.shape = function(cr,w,h) gears.shape.rectangle(cr,w,h) end - else - c.shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,8) end - end -end - -client.connect_signal("property::maximized", function(c) - disable_rounded(c) -end) - -client.connect_signal("property::fullscreen", function(c) - disable_rounded(c) -end) ---]] - --- Restore client after tiling layout -tag.connect_signal('property::layout', function(t) - for k, c in ipairs(t:clients()) do - if awful.layout.get(mouse.screen) == awful.layout.suit.floating then - local cgeo = awful.client.property.get(c, 'floating_geometry') - if cgeo then - c:geometry(awful.client.property.get(c, 'floating_geometry')) - end - end - end -end) - -client.connect_signal('manage', function(c) - if awful.layout.get(mouse.screen) == awful.layout.suit.floating then - awful.client.property.set(c, 'floating_geometry', c:geometry()) - end -end) - -client.connect_signal('property::geometry', function(c) - if awful.layout.get(mouse.screen) == awful.layout.suit.floating then - awful.client.property.set(c, 'floating_geometry', c:geometry()) - end -end) - --- Disable titlebar when tiled -local disable_titlebar = function(t) - for k, c in ipairs(t:clients()) do - if awful.layout.get(mouse.screen) ~= awful.layout.suit.floating then - awful.titlebar.hide(c) - else - awful.titlebar.show(c) - end - end -end - -tag.connect_signal('property::layout', function(t) - disable_titlebar(t) -end) - -client.connect_signal("request::manage", function(c) - if awful.layout.get(mouse.screen) ~= awful.layout.suit.floating then - awful.titlebar.hide(c) - else - awful.titlebar.show(c) - end -end) diff --git a/conf/awesome/awesome/main/menu.lua b/conf/awesome/awesome/main/menu.lua deleted file mode 100644 index c3c769d..0000000 --- a/conf/awesome/awesome/main/menu.lua +++ /dev/null @@ -1,31 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local gears = require "gears" - -local apps = require "main.apps" -local screenshot = require "lib.screenshot" - -screenshotMenu = { - { "Screenshot Now", function() screenshot.now() end}, - { "Screenshot Later", function() screenshot.later() end} -} - -powerMenu = { - { "Poweroff", function() awful.spawn("poweroff", false) end}, - { "Reboot", function() awful.spawn("reboot", false) end} -} - -mainmenu = awful.menu { - items = { - { "Refresh", awesome.restart }, - { "Terminal", apps.terminal }, - { "Browser", apps.browser }, - { "File Manager", apps.fileManager }, - { "Screenshot", screenshotMenu }, - { "Power Options", powerMenu } - } -} - -mainmenu.wibox.shape = function(cr,w,h) - gears.shape.rounded_rect(cr,w,h,8) -end diff --git a/conf/awesome/awesome/main/rules.lua b/conf/awesome/awesome/main/rules.lua deleted file mode 100644 index 2e278f5..0000000 --- a/conf/awesome/awesome/main/rules.lua +++ /dev/null @@ -1,36 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local ruled = require "ruled" - -local apps = require "main.apps" - -ruled.client.connect_signal("request::rules", function() - ruled.client.append_rule { - id = "global", - rule = {}, - properties = { - focus = awful.client.focus.filter, - raise = true, - screen = awful.screen.preferred, - placement = awful.placement.no_overlap+awful.placement.no_offscreen, - }, - } - - ruled.client.append_rule { - id = "titlebars", - rule_any = { - type = {"normal", "dialog"}, - }, - properties = { - titlebars_enabled = true - } - } - - -- Apps Rules - ruled.client.append_rule { - rule = { class = apps.picture }, - properties = { - titlebars_enabled = false - }, - } -end) diff --git a/conf/awesome/awesome/main/tags.lua b/conf/awesome/awesome/main/tags.lua deleted file mode 100644 index 040980b..0000000 --- a/conf/awesome/awesome/main/tags.lua +++ /dev/null @@ -1,5 +0,0 @@ -local awful = require "awful" - -screen.connect_signal("request::desktop_decoration", function(s) - awful.tag({"1", "2", "3", "4"}, s, awful.layout.layouts[1]) -end) diff --git a/conf/awesome/awesome/main/wallpaper.lua b/conf/awesome/awesome/main/wallpaper.lua deleted file mode 100644 index db12f53..0000000 --- a/conf/awesome/awesome/main/wallpaper.lua +++ /dev/null @@ -1,31 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local beautiful = require "beautiful" - -local use_feh = true -- True/False - -local function set_wall(s) - awful.wallpaper { - screen = s, - widget = { - { - image = beautiful.wallpaper, - upscale = true, - downscale = true, - widget = wibox.widget.imagebox, - }, - valign = "center", - halign = "center", - tiled = false, - widget = wibox.container.tile, - } - } -end - -screen.connect_signal("request::wallpaper", function(s) - if not use_feh then - set_wall(s) - else - awful.spawn("feh --bg-fill "..beautiful.wallpaper, false) - end -end) diff --git a/conf/awesome/awesome/misc/bar/clock.lua b/conf/awesome/awesome/misc/bar/clock.lua deleted file mode 100644 index a7b0fbb..0000000 --- a/conf/awesome/awesome/misc/bar/clock.lua +++ /dev/null @@ -1,19 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" - --- Clock -local clock = wibox.widget.textbox() -clock.font = "Roboto Medium 14" - -gears.timer { - timeout = 60, - autostart = true, - call_now = true, - callback = function() - clock.markup = os.date("%a %H:%M") - end -} - -return clock diff --git a/conf/awesome/awesome/misc/bar/init.lua b/conf/awesome/awesome/misc/bar/init.lua deleted file mode 100644 index 041ea7a..0000000 --- a/conf/awesome/awesome/misc/bar/init.lua +++ /dev/null @@ -1,94 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" - -local dpi = beautiful.xresources.apply_dpi - --- Get widgets -local clock = require "misc.bar.clock" -local wifi = require "misc.bar.wifi" -local volume = require "misc.bar.volume" -local launcher = require "misc.bar.launcher" -local menu = require "misc.bar.menu" -local tag = require "misc.bar.tag" -local task = require "misc.bar.task" - --- Info Icon -local info = wibox.widget { - { - { - { - volume, - wifi, - spacing = dpi(6), - layout = wibox.layout.fixed.horizontal, - }, - margins = {top = dpi(2), bottom = dpi(2), left = dpi(6), right = dpi(6)}, - widget = wibox.container.margin, - }, - shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,8) end, - bg = beautiful.bg_alt, - widget = wibox.container.background, - }, - margins = {top = dpi(6), bottom = dpi(6)}, - widget = wibox.container.margin, -} - --- Right -local right = wibox.widget { - { - info, - clock, - launcher, - spacing = dpi(20), - layout = wibox.layout.fixed.horizontal, - }, - margins = {top = dpi(4), bottom = dpi(4), right = dpi(20)}, - widget = wibox.container.margin, -} - --- Left -local function left(s) - return wibox.widget { - { - tag(s), - spacing = dpi(20), - layout = wibox.layout.fixed.horizontal, - }, - margins = {top = dpi(4), bottom = dpi(4), left = dpi(20)}, - widget = wibox.container.margin, - } -end - --- Bar -local function get_bar(s) - - local bar = wibox { - visible = true, - ontop = false, - width = s.geometry.width, - height = dpi(60), - y = s.geometry.height - dpi(60), - bg = beautiful.bg, - type = 'dock' - } - - bar:struts { bottom = dpi(60), top = dpi(20), left = dpi(20), right = dpi(20) } - - bar : setup { - left(s), - { - nil, - --task(s), - expand = 'none', - layout = wibox.layout.align.horizontal, - }, - right, - layout = wibox.layout.align.horizontal, - } -end - -awful.screen.connect_for_each_screen(function(s) - get_bar(s) -end) diff --git a/conf/awesome/awesome/misc/bar/launcher.lua b/conf/awesome/awesome/misc/bar/launcher.lua deleted file mode 100644 index d452945..0000000 --- a/conf/awesome/awesome/misc/bar/launcher.lua +++ /dev/null @@ -1,27 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - -local apps = require "main.apps" - -local launcher = wibox.widget.textbox() -launcher.font = "Roboto 16" -launcher.markup = "󰍉" - -launcher:connect_signal("mouse::enter", function() - launcher.markup = "󰍉" -end) - -launcher:connect_signal("mouse::leave", function() - launcher.markup = "󰍉" -end) - -launcher:buttons(gears.table.join( - awful.button({ }, 1, function() - awful.spawn(apps.launcher, false) - end) -)) - -return launcher diff --git a/conf/awesome/awesome/misc/bar/menu.lua b/conf/awesome/awesome/misc/bar/menu.lua deleted file mode 100644 index a4d77a5..0000000 --- a/conf/awesome/awesome/misc/bar/menu.lua +++ /dev/null @@ -1,26 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local gears = require "gears" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Menu -local menu = wibox.widget.textbox() -menu.font = "Roboto 16" -menu.markup = "󰍜" - -menu:connect_signal("mouse::enter", function() - menu.markup = "󰍜" -end) - -menu:connect_signal("mouse::leave", function() - menu.markup = "󰍜" -end) - -menu:buttons(gears.table.join( - awful.button({ }, 1, function() - awesome.emit_signal("sidebar::toggle") - end) -)) - -return menu diff --git a/conf/awesome/awesome/misc/bar/tag.lua b/conf/awesome/awesome/misc/bar/tag.lua deleted file mode 100644 index f0afca9..0000000 --- a/conf/awesome/awesome/misc/bar/tag.lua +++ /dev/null @@ -1,60 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local naughty = require "naughty" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Colors -local colors = { - beautiful.magenta, - beautiful.red, - beautiful.yellow, - beautiful.green, - beautiful.blue -} - -local function update_tag(item, tag, index) - if tag.selected then - item:get_children_by_id("tag")[1].markup = "" - elseif #tag:clients() > 0 then - item:get_children_by_id("tag")[1].markup = "" - else - item:get_children_by_id("tag")[1].markup = "" - end -end - -local button = awful.button({ }, 1, function(t) t:view_only() end) - -return function(s) - local tag = awful.widget.taglist { - screen = s, - filter = awful.widget.taglist.filter.all, - buttons = button, - layout = { - spacing = dpi(4), - layout = wibox.layout.fixed.horizontal, - }, - style = { - spacing = dpi(10), --[[ - fg_focus = beautiful.red, - fg_empty = beautiful.bg_alt, - fg_occupied = beautiful.fg --]] - }, - widget_template = { - id = "tag", - font = "Roboto Medium 14", - widget = wibox.widget.textbox, - - create_callback = function(self, c3, index, object) - update_tag(self, c3, index) - end, - - update_callback = function(self, c3, index, object) - update_tag(self, c3, index) - end - } - } - - return tag -end diff --git a/conf/awesome/awesome/misc/bar/task.lua b/conf/awesome/awesome/misc/bar/task.lua deleted file mode 100644 index 6144749..0000000 --- a/conf/awesome/awesome/misc/bar/task.lua +++ /dev/null @@ -1,60 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - -local apps = require "main.apps" - --- Create tasklist -return function(s) - - local update_task = function(self, c) - if c.active then - self:get_children_by_id("bg")[1].bg = beautiful.bg_alt - return - elseif c.minimized then - self:get_children_by_id("bg")[1].bg = beautiful.bg_alt .. "4d" - return - else - self:get_children_by_id("bg")[1].bg = beautiful.bg - end - end - - local task = awful.widget.tasklist { - screen = s, - filter = awful.widget.tasklist.filter.currenttags, - buttons = { - awful.button({ }, 1, function(c) c:activate {context = "tasklist", action = "toggle_minimization"} end) - }, - layout = { - spacing = dpi(0), - layout = wibox.layout.fixed.horizontal, - }, - widget_template = { - { - { - id = "client", - widget = awful.widget.clienticon, - }, - margins = dpi(12), - widget = wibox.container.margin, - }, - id = "bg", - bg = beautiful.bg_alt, - widget = wibox.container.background, - - create_callback = function(self, c, _, __) - self:get_children_by_id("client")[1].client = c - update_task(self, c) - end, - - update_callback = function(self, c, _, __) - self:get_children_by_id("client")[1].client = c - update_task(self, c) - end - }, - } - - return task -end diff --git a/conf/awesome/awesome/misc/bar/volume.lua b/conf/awesome/awesome/misc/bar/volume.lua deleted file mode 100644 index 5ac8c83..0000000 --- a/conf/awesome/awesome/misc/bar/volume.lua +++ /dev/null @@ -1,38 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Volume -local volume = wibox.widget.textbox() -volume.font = "Roboto Medium 18" - -local percentage = wibox.widget.textbox() -percentage.font = "Roboto Medium 14" - -awesome.connect_signal("signal::volume", function(vol, mute) - vol = tonumber(vol) - if mute or vol == 0 then - volume.markup = "󰸈" - percentage.markup = "Muted" - else - if vol < 20 then - volume.markup = "󰕿" - percentage.markup = vol .. "%" - elseif vol < 60 then - volume.markup = "󰖀" - percentage.markup = vol .. "%" - else - volume.markup = "󰕾" - percentage.markup = vol .. "%" - end - end -end) - -return { - volume, - --percentage, - spacing = dpi(4), - layout = wibox.layout.fixed.horizontal, -} diff --git a/conf/awesome/awesome/misc/bar/wifi.lua b/conf/awesome/awesome/misc/bar/wifi.lua deleted file mode 100644 index 6a56558..0000000 --- a/conf/awesome/awesome/misc/bar/wifi.lua +++ /dev/null @@ -1,50 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Wifi -local wifi = wibox.widget.textbox() -wifi.font = "Roboto Medium 16" - -local function get_wifi() - local script = [[ - nmcli g | tail -1 | awk '{printf $1}' - ]] - - awful.spawn.easy_async_with_shell(script, function(stdout) - local status = tostring(stdout) - if not status:match("disconnected") then - local get_strength = [[ - awk '/^\s*w/ { print int($3 * 100 / 70) }' /proc/net/wireless - ]] - - awful.spawn.easy_async_with_shell(get_strength, function(stdout) - local strength = tonumber(stdout) - if strength < 20 then - wifi.markup = "󰤯" - elseif strength < 40 then - wifi.markup = "󰤟" - elseif strength < 60 then - wifi.markup = "󰤢" - elseif strength < 80 then - wifi.markup = "󰤥" - else - wifi.markup = "󰤨" - end - end) - else - wifi.markup = "󰤭" - end - end) -end - -gears.timer { - timeout = 5, - autostart = true, - call_now = true, - callback = function() get_wifi() end -} - -return wifi diff --git a/conf/awesome/awesome/misc/init.lua b/conf/awesome/awesome/misc/init.lua deleted file mode 100644 index adee9d3..0000000 --- a/conf/awesome/awesome/misc/init.lua +++ /dev/null @@ -1,4 +0,0 @@ -require "misc.titlebar" -require "misc.bar" -require "misc.sidebar" -require "misc.notif" diff --git a/conf/awesome/awesome/misc/notif/init.lua b/conf/awesome/awesome/misc/notif/init.lua deleted file mode 100644 index 6b1877d..0000000 --- a/conf/awesome/awesome/misc/notif/init.lua +++ /dev/null @@ -1,145 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local gears = require "gears" -local beautiful = require "beautiful" -local ruled = require "ruled" -local naughty = require "naughty" -local dpi = beautiful.xresources.apply_dpi - -naughty.config.defaults.ontop = true -naughty.config.defaults.screen = awful.screen.focused() -naughty.config.defaults.timeout = 5 -naughty.config.defaults.title = "Notification" -naughty.config.defaults.position = "top_right" -naughty.config.defaults.border_width = 0 - -local function create_notif(n) - local time = os.date "%H:%M" - local icon_visibility - - if n.icon == nil then - icon_visibility = false - else - icon_visibility = true - end - - -- Action widget - local action_widget = { - { - { - id = "text_role", - align = "center", - font = "Roboto Mono 10", - widget = wibox.widget.textbox, - }, - margins = {left = dpi(6), right = dpi(6)}, - widget = wibox.container.margin, - }, - widget = wibox.container.background, - } - - -- Apply action widget ^ - local actions = wibox.widget { - notification = n, - base_layout = wibox.widget { - spacing = dpi(8), - layout = wibox.layout.flex.horizontal, - }, - widget_template = action_widget, - widget = naughty.list.actions, - } - - local function space_h(length, circumstances) - return wibox.widget { - forced_width = length, - visible = circumstances, - layout = wibox.layout.fixed.horizontal, - } - end - - -- Make other widgets - local title = wibox.widget.textbox() - title.font = "Roboto bold 14" - title.align = 'left' - title.markup = n.title - - local message = wibox.widget.textbox() - message.font = "Roboto Mono 12" - message.align = 'left' - message.markup = n.message - - local icon = wibox.widget { - nil, - { - { - image = n.icon, - visible = icon_visibility, - widget = wibox.widget.imagebox, - }, - strategy = "max", - width = dpi(60), - height = dpi(60), - widget = wibox.container.constraint, - }, - expand = 'none', - layout = wibox.layout.align.vertical, - } - - local container = wibox.widget { - { - title, - { - icon, - space_h(dpi(10), icon_visibility), - message, - layout = wibox.layout.fixed.horizontal, - }, - actions, - spacing = dpi(10), - layout = wibox.layout.fixed.vertical, - }, - margins = dpi(20), - widget = wibox.container.margin, - } - - naughty.layout.box { - notification = n, - type = "notification", - bg = beautiful.bg, - border_width = 0, - shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,5) end, - widget_template = { - { - { - { - widget = container, - }, - strategy = "max", - width = dpi(620), - widget = wibox.container.constraint, - }, - strategy = "min", - width = dpi(160), - height = dpi(80), - widget = wibox.container.constraint, - }, - bg = beautiful.bg, - widget = wibox.container.background, - } - } -end - -naughty.connect_signal("request::display", function(n) - create_notif(n) -end) - -ruled.notification.connect_signal("request::rules", function() - ruled.notification.append_rule { - rule = {}, - properties = { - screen = awful.screen.focused(), - implicit_timeout = 5, - } - } -end) - diff --git a/conf/awesome/awesome/misc/notif/notify.lua b/conf/awesome/awesome/misc/notif/notify.lua deleted file mode 100644 index 174cc70..0000000 --- a/conf/awesome/awesome/misc/notif/notify.lua +++ /dev/null @@ -1,32 +0,0 @@ -local awful = require "awful" -local naughty = require "naughty" - --- Some more notif function -local notify = {} - --- Notify after screenshot -notify.screenshot = function(location) - local open = naughty.action { - name = "Open" - } - - open:connect_signal("invoked", function(n) - awful.spawn("feh "..location, false) - end) - - local show = naughty.action { - name = "Show" - } - - show:connect_signal("invoked", function(n) - awful.spawn("thunar "..location, false) - end) - - naughty.notification { - title = "Screenshot", - message = "Smile!", - actions = { open, show }, - } -end - -return notify diff --git a/conf/awesome/awesome/misc/sidebar/calendar.lua b/conf/awesome/awesome/misc/sidebar/calendar.lua deleted file mode 100644 index a724a5c..0000000 --- a/conf/awesome/awesome/misc/sidebar/calendar.lua +++ /dev/null @@ -1,79 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Creating Calendar ----------------------- - --- copied from awesome doc and adjusted a bit -local styles = {} - -styles.month = { bg_color = beautiful.bg_alt} -styles.normal = { - bg_color = beautiful.bg_alt, - padding = dpi(6), - fg_color = beautiful.fg, -} -styles.focus = { - fg_color = beautiful.yellow, - padding = dpi(6), - markup = function(t) return '' .. t .. '' end, -} -styles.header = { - fg_color = beautiful.blue, - markup = function(t) return '' .. t .. '' end, -} -styles.weekday = { - fg_color = beautiful.fg, - markup = function(t) return '' .. t .. '' end, -} - --- The Function -local function decorate_cell(widget, flag, date) - if flag=="monthheader" and not styles.monthheader then - flag = "header" - end - - local props = styles[flag] or {} - - if props.markup and widget.get_text and widget.set_markup then - widget:set_markup(props.markup(widget:get_text())) - end - -- Change bg color for weekends - local d = {year=date.year, month=(date.month or 1), day=(date.day or 1)} - local weekday = tonumber(os.date("%w", os.time(d))) - local ret = wibox.widget { - { - widget, - margins = props.padding, - widget = wibox.container.margin - }, - fg = props.fg_color, - bg = props.bg_color, - widget = wibox.container.background - } - - return ret -end - -local calendar = wibox.widget { - date = os.date("*t"), - font = "Roboto Mono 14", - fn_embed = decorate_cell, - widget = wibox.widget.calendar.month, -} - - -return wibox.widget { - nil, - { - nil, - calendar, - expand = 'none', - layout = wibox.layout.align.horizontal, - }, - expand = 'none', - layout = wibox.layout.align.vertical, -} diff --git a/conf/awesome/awesome/misc/sidebar/clock.lua b/conf/awesome/awesome/misc/sidebar/clock.lua deleted file mode 100644 index 4470f87..0000000 --- a/conf/awesome/awesome/misc/sidebar/clock.lua +++ /dev/null @@ -1,32 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local gears = require "gears" -local beautiful = require "beautiful" - -local dpi = beautiful.xresources.apply_dpi - --- Day -local day = wibox.widget.textbox() -day.font = "Roboto bold 32" -day.align = 'center' - -local date = wibox.widget.textbox() -date.font = "Roboto bold 14" -date.align = 'center' - -gears.timer { - timeout = 60, - call_now = true, - autostart = true, - callback = function() - day.markup = ""..os.date("%A").."" - date.markup = os.date("%d %B %Y") - end -} - -return wibox.widget { - day, - date, - spacing = dpi(4), - layout = wibox.layout.fixed.vertical, -} diff --git a/conf/awesome/awesome/misc/sidebar/init.lua b/conf/awesome/awesome/misc/sidebar/init.lua deleted file mode 100644 index 43ffa81..0000000 --- a/conf/awesome/awesome/misc/sidebar/init.lua +++ /dev/null @@ -1,139 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - -local rubato = require "lib.rubato" - --- Var -local width = dpi(420) -local height = awful.screen.focused().geometry.height - dpi(100) - --- Helper ------------ - -local function round_widget(radius) - return function(cr,w,h) - gears.shape.rounded_rect(cr,w,h,radius) - end -end - -local function center_widget(widgets) - return wibox.widget { - nil, - { - nil, - widgets, - expand = 'none', - layout = wibox.layout.align.horizontal, - }, - expand = 'none', - layout = wibox.layout.align.vertical, - } -end - -local function box_widget(widgets, width, height) - --local centered_widget = center_widget(widgets) - - return wibox.widget { - { - { - widgets, - margins = dpi(16), - widget = wibox.container.margin, - }, - forced_width = dpi(width), - forced_height = dpi(height), - shape = round_widget(8), - bg = beautiful.bg_alt, - widget = wibox.container.background, - }, - margins = {left = dpi(20), right = dpi(20)}, - widget = wibox.container.margin, - } -end - -local aa = wibox.widget.textbox() - --- Get widgets -local profile_widget = require "misc.sidebar.profile" -local player_widget = require "misc.sidebar.player" -local stats_widget = require "misc.sidebar.stats" -local calendar_widget = require "misc.sidebar.calendar" - --- Combine some widgets -local profile = box_widget(profile_widget, 380, 210) -local player = box_widget(player_widget, 380, 150) -local stats = box_widget(stats_widget, 380, 180) -local calendar = box_widget(calendar_widget, 380, 330) - --- Spacing -local space = function(height) - return wibox.widget { - forced_height = dpi(height), - layout = wibox.layout.align.horizontal - } -end - --- Sidebar -local sidebar = wibox { - visible = false, - ontop = true, - width = width, - height = height, - y = dpi(20), - bg = beautiful.bg, -} - --- Sidebar widget setup -sidebar : setup { - { - profile, - player, - stats, - calendar, - spacing = dpi(20), - layout = wibox.layout.fixed.vertical, - }, - margins = { top = dpi(20), bottom = dpi(20)}, - widget = wibox.container.margin, -} - --- Slide animation -local slide = rubato.timed { - pos = awful.screen.focused().geometry.x - sidebar.width, - rate = 60, - intro = 0.2, - duration = 0.4, - subscribed = function(pos) - sidebar.x = awful.screen.focused().geometry.x + pos - end -} - --- Timer of sidebar's death -sidebar.timer = gears.timer { - timeout = 0.5, - single_shot = true, - callback = function() - sidebar.visible = not sidebar.visible - end -} - --- Toggle function -sidebar.toggle = function() - if sidebar.visible then - slide.target = awful.screen.focused().geometry.x - sidebar.width - sidebar.timer:start() - else - slide.target = awful.screen.focused().geometry.x + dpi(20) - sidebar.visible = not sidebar.visible - end -end - --- Get signal to execute the function (if that makes sense) -awesome.connect_signal("sidebar::toggle", function() - sidebar.toggle() -end) - -return sidebar diff --git a/conf/awesome/awesome/misc/sidebar/player.lua b/conf/awesome/awesome/misc/sidebar/player.lua deleted file mode 100644 index f76d618..0000000 --- a/conf/awesome/awesome/misc/sidebar/player.lua +++ /dev/null @@ -1,112 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Make Widgets ------------------ - --- Song's Title -local title = wibox.widget.textbox() -title.font = "Roboto Medium 16" -title.align = "left" -title.valign = "bottom" - --- Song's Artist -local artist = wibox.widget.textbox() -artist.font = "Roboto Regular 16" -artist.align = "left" -artist.valign = "bottom" - --- Song's Length -local length = wibox.widget.textbox() -length.font = "Roboto Mono Regular 14" -length.align = "center" -length.valign = "center" - --- Player's Button -local toggle = wibox.widget.textbox() -toggle.font = "Roboto 26" - -toggle:buttons(gears.table.join( - awful.button({}, 1, function() - awful.spawn("playerctl -i firefox play-pause", false) - if toggle.markup:match("󰐊") then - toggle.markup = "󰏤" - else - toggle.markup = "󰐊" - end - end) -)) - -local next = wibox.widget.textbox() -next.font = "Roboto 26" -next.markup = "󰒭" - -next:buttons(gears.table.join( - awful.button({}, 1, function() awful.spawn("playerctl next", false) end) -)) - -local back = wibox.widget.textbox() -back.font = "Roboto 26" -back.markup = "󰒮" - -back:buttons(gears.table.join( - awful.button({}, 1, function() awful.spawn("playerctl previous", false) end) -)) - --- Get data -awesome.connect_signal("signal::player", function(t, a, l, s) - if not s:match("Playing") then - toggle.markup = "󰐊" - else - toggle.markup = "󰏤" - end - - title.markup = t - artist.markup = a - length.markup = l -end) - --- Grouping Widgets ---------------------- - -local buttons = wibox.widget { - back, - toggle, - next, - spacing = dpi(8), - layout = wibox.layout.fixed.horizontal, -} - -return wibox.widget { - { - nil, - { - title, - artist, - spacing = dpi(12), - layout = wibox.layout.fixed.vertical, - }, - expand = 'none', - layout = wibox.layout.align.vertical, - }, - { - nil, - nil, - { - length, - { - nil, - buttons, - expand = 'none', - layout = wibox.layout.align.horizontal, - }, - spacing = dpi(12), - layout = wibox.layout.fixed.vertical, - }, - layout = wibox.layout.align.vertical, - }, - layout = wibox.layout.flex.horizontal, -} diff --git a/conf/awesome/awesome/misc/sidebar/profile.lua b/conf/awesome/awesome/misc/sidebar/profile.lua deleted file mode 100644 index d9bcc03..0000000 --- a/conf/awesome/awesome/misc/sidebar/profile.lua +++ /dev/null @@ -1,142 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local gears = require "gears" -local beautiful = require "beautiful" - -local dpi = beautiful.xresources.apply_dpi - --- Helper ------------ - -local function round_widget(radius) - return function(cr,w,h) - gears.shape.rounded_rect(cr,w,h,radius) - end -end - --- Create Widgets -------------------- - --- Pfp -local pfp = wibox.widget.imagebox() -pfp.image = beautiful.pfp -pfp.clip_shape = gears.shape.circle -pfp.forced_width = dpi(130) -pfp.forced_height = dpi(130) - --- User -local user = wibox.widget.textbox() -user.font = "Roboto SemiBold 18" -user.align = 'left' -user.markup = ""..beautiful.user.."" - --- Hostname -local hostname = wibox.widget.textbox() -hostname.font = "Roboto Regular 14" -hostname.align = 'left' - -awful.spawn.easy_async_with_shell("echo $HOST", function(stdout) - hostname.markup = "@"..tostring(stdout) -end) - --- Weather Icon -local weather_icon = wibox.widget.imagebox() -weather_icon.image = beautiful.weather_icon -weather_icon.forced_width = dpi(70) -weather_icon.forced_height = dpi(47) - --- Temperature -local temperature = wibox.widget.textbox() -temperature.font = "Roboto Medium 20" -temperature.align = 'left' - --- How's the weather? -local the_weather = wibox.widget.textbox() -the_weather.font = "Roboto Medium 14" -the_weather.align = "left" - --- Battery -local bat_desc = wibox.widget.textbox() -bat_desc.font = "Roboto Medium 12" -bat_desc.align = "center" - -local battery = wibox.widget { - { - id = "bat_val", - forced_width = dpi(130), - forced_height = dpi(22), - background_color = "#4B6133", - color = beautiful.green, - shape = round_widget(12), - bar_shape = round_widget(12), - max_value = 100, - widget = wibox.widget.progressbar, - }, - { - widget = bat_desc, - }, - layout = wibox.layout.stack, -} - --- Get data 4 widgets! -awesome.connect_signal("signal::bat", function(bat_value, bat_preview) - battery.bat_val.value = bat_value - bat_desc.markup = ""..bat_preview.."" -end) - -awesome.connect_signal("signal::weather", function(hows_weather, feels_like) - hows_weather = string.gsub(hows_weather, "'", "") - feels_like = string.gsub(feels_like, "\n", "") - the_weather.markup = hows_weather - temperature.markup = feels_like:match("%d%d").."°C" -end) - --- Spacing horizontally -local space = wibox.widget { - forced_height = dpi(6), - layout = wibox.layout.align.horizontal -} - --- Grouping widgets ---------------------- - -local name = wibox.widget { - user, - hostname, - spacing = dpi(4), - layout = wibox.layout.fixed.vertical, -} - -local weather = wibox.widget { - { - weather_icon, - temperature, - spacing = dpi(20), - layout = wibox.layout.fixed.horizontal, - }, - { - widget = the_weather, - }, - spacing = dpi(8), - layout = wibox.layout.fixed.vertical, -} - --- The Profile Widget -return wibox.widget { - { - { - pfp, - battery, - spacing = dpi(20), - layout = wibox.layout.fixed.vertical, - }, - layout = wibox.layout.fixed.vertical, - }, - { - name, - weather, - layout = wibox.layout.fixed.vertical, - }, - spacing = dpi(30), - layout = wibox.layout.fixed.horizontal, -} diff --git a/conf/awesome/awesome/misc/sidebar/sliders.lua b/conf/awesome/awesome/misc/sidebar/sliders.lua deleted file mode 100644 index 6aeed1b..0000000 --- a/conf/awesome/awesome/misc/sidebar/sliders.lua +++ /dev/null @@ -1,110 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Create volume slider -local volume_icon = wibox.widget.textbox() -volume_icon.font = "Roboto Medium 16" -volume_icon.align = 'center' -volume_icon.markup = "󰕾" - -local volume_slider = wibox.widget { - forced_width = dpi(220), - forced_height = dpi(30), - bar_shape = gears.shape.rounded_bar, - bar_height = dpi(14), - bar_color = beautiful.bg_alt, - bar_active_color = beautiful.blue, - handle_shape = gears.shape.circle, - handle_color = beautiful.blue, - handle_width = dpi(20), - widget = wibox.widget.slider -} - -local volume = wibox.widget { - nil, - { - volume_icon, - volume_slider, - spacing = dpi(20), - layout = wibox.layout.fixed.horizontal, - }, - expand = "none", - layout = wibox.layout.align.vertical, -} - -local update_volume = function() - awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout) - volume_slider.value = tonumber(stdout:match("%d+")) - end) -end - -volume_slider:connect_signal("property::value", function(_, vol) - awful.spawn("pamixer --set-volume ".. vol, false) -end) - --- Create brightness slider -local bright_icon = wibox.widget.textbox() -bright_icon.font = "Roboto Medium 16" -bright_icon.align = 'center' -bright_icon.markup = "󰃟" - -local bright_slider = wibox.widget { - forced_width = dpi(220), - forced_height = dpi(30), - bar_shape = gears.shape.rounded_bar, - bar_height = dpi(14), - bar_color = beautiful.bg_alt, - bar_active_color = beautiful.yellow, - handle_shape = gears.shape.circle, - handle_color = beautiful.yellow, - handle_width = dpi(20), - widget = wibox.widget.slider -} - -bright_slider:connect_signal("property::value", function(_, bri) - awful.spawn("brightnessctl set "..bri.."%", false) -end) - -local update_brightness = function() - awful.spawn.easy_async_with_shell("brightnessctl g", function(stdout) - val = tonumber(stdout) - awful.spawn.easy_async_with_shell("brightnessctl max", function(stdout) - bri = val/tonumber(stdout) * 100 - bright_slider.value = bri - end) - end) -end - -local brightness = wibox.widget { - nil, - { - bright_icon, - bright_slider, - spacing = dpi(20), - layout = wibox.layout.fixed.horizontal, - }, - expand = "none", - layout = wibox.layout.align.vertical, -} - -gears.timer { - timeout = 10, - autostart = true, - call_now = true, - callback = function() - update_volume() - update_brightness() - end -} - -local all_slider = wibox.widget { - volume, - brightness, - spacing = dpi(20), - layout = wibox.layout.fixed.vertical, -} - -return all_slider diff --git a/conf/awesome/awesome/misc/sidebar/stats.lua b/conf/awesome/awesome/misc/sidebar/stats.lua deleted file mode 100644 index 2323656..0000000 --- a/conf/awesome/awesome/misc/sidebar/stats.lua +++ /dev/null @@ -1,135 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local gears = require "gears" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Helper ------------ - -local function round_widget(radius) - return function(cr,w,h) - gears.shape.rounded_rect(cr,w,h,radius) - end -end - -local function grouping_widget(w1,w2) - local container = wibox.widget { - w1, - { - nil, - w2, - expand = 'none', - layout = wibox.layout.align.vertical, - }, - spacing = dpi(18), - layout = wibox.layout.fixed.horizontal, - } - - return container -end - -local function center_widget(widget) - return wibox.widget { - nil, - { - nil, - widget, - expand = 'none', - layout = wibox.layout.align.horizontal, - }, - expand = 'none', - layout = wibox.layout.align.vertical, - } -end - --- Create_widgets -------------------- - --- Disk -local d_icon = wibox.widget.textbox() -d_icon.font = "Roboto Medium 20" -d_icon.align = "left" -d_icon.markup = "󱂵" - -local d_slider = wibox.widget { - forced_width = dpi(220), - forced_height = dpi(10), - color = beautiful.red, - background_color = "#663D3D", - shape = round_widget(12), - bar_shape = round_widget(12), - max_value = 100, - value = 20, - widget = wibox.widget.progressbar, -} - -local disk = grouping_widget(d_icon, d_slider) - --- Vol -local v_icon = wibox.widget.textbox() -v_icon.font = "Roboto Medium 20" -v_icon.align = "left" -v_icon.markup = "󰕾" - -local v_slider = wibox.widget { - forced_width = dpi(220), - forced_height = dpi(10), - color = beautiful.blue, - background_color = "#3D4B66", - shape = round_widget(12), - bar_shape = round_widget(12), - max_value = 100, - widget = wibox.widget.progressbar, -} - -local volume = grouping_widget(v_icon, v_slider) - --- Brightness -local b_icon = wibox.widget.textbox() -b_icon.font = "Roboto Medium 20" -b_icon.align = "left" -b_icon.markup = "󰃟" - -local b_slider = wibox.widget { - forced_width = dpi(220), - forced_height = dpi(10), - color = beautiful.yellow, - background_color = "#66523D", - shape = round_widget(12), - bar_shape = round_widget(12), - max_value = 100, - widget = wibox.widget.progressbar, -} - -local brightness = grouping_widget(b_icon, b_slider) - --- Getting Value for These Widgets ------------------------------------- - -local function get_val() - awesome.connect_signal("signal::volume", function(vol, muted) - if muted then v_slider.value = 0 else - v_slider.color = beautiful.blue - v_slider.value = tonumber(vol) - end - end) - - awesome.connect_signal("signal::brightness", function(bri) - b_slider.value = tonumber(bri) - end) - - awesome.connect_signal("signal::disk", function(disk_perc) - d_slider.value = tonumber(disk_perc) - end) -end - -get_val() - -return center_widget(wibox.widget { - disk, - volume, - brightness, - spacing = dpi(18), - layout = wibox.layout.fixed.vertical, -}) diff --git a/conf/awesome/awesome/misc/sidebar/uptime.lua b/conf/awesome/awesome/misc/sidebar/uptime.lua deleted file mode 100644 index e06dd1b..0000000 --- a/conf/awesome/awesome/misc/sidebar/uptime.lua +++ /dev/null @@ -1,43 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local gears = require "gears" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Icon -local icon = wibox.widget.textbox() -icon.font = "Roboto Medium 24" -icon.align = 'center' -icon.markup = "󰍹" - --- Uptime -local uptime = wibox.widget.textbox() -uptime.font = "Roboto Medium 16" -uptime.align = 'center' - -local function get_uptime() - local script = [[ - uptime -p - ]] - - awful.spawn.easy_async_with_shell(script, function(stdout) - stdout = string.gsub(stdout, "\n", "") - uptime.markup = stdout - end) -end - -gears.timer { - timeout = 60, - autostart = true, - call_now = true, - callback = function() - get_uptime() - end -} - -return wibox.widget { - icon, - uptime, - spacing = dpi(10), - layout = wibox.layout.fixed.horizontal, -} diff --git a/conf/awesome/awesome/misc/sidebar/wifi.lua b/conf/awesome/awesome/misc/sidebar/wifi.lua deleted file mode 100644 index f61fb79..0000000 --- a/conf/awesome/awesome/misc/sidebar/wifi.lua +++ /dev/null @@ -1,35 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local gears = require "gears" -local beautiful = require "beautiful" -local dpi = beautiful.xresources.apply_dpi - --- Icon -local icon = wibox.widget.textbox() -icon.font = "Roboto Medium 24" -icon.align = 'center' - --- Wifi Name -local wifi = wibox.widget.textbox() -wifi.font = "Roboto Medium 16" -wifi.align = 'center' -wifi.markup = "Connecting.." -- In case it's still fetching wifi name - -awesome.connect_signal("signal::wifi", function(connected, ssid) - if connected then - ssid = tostring(ssid) - ssid = ssid:match("(.-)[:]") - icon.markup = "󰤨" - wifi.markup = ssid - else - icon.markup = "󰤭" - wifi.markup = "Not Connected ;-;" - end -end) - -return wibox.widget { - icon, - wifi, - spacing = dpi(10), - layout = wibox.layout.fixed.horizontal -} diff --git a/conf/awesome/awesome/misc/titlebar.lua b/conf/awesome/awesome/misc/titlebar.lua deleted file mode 100644 index ca25f71..0000000 --- a/conf/awesome/awesome/misc/titlebar.lua +++ /dev/null @@ -1,79 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" -local beautiful = require "beautiful" - -local dpi = beautiful.xresources.apply_dpi - ------ Titlebar -local get_titlebar = function(c) - -- Button - local buttons = gears.table.join({ - awful.button({ }, 1, function() - c:activate {context = "titlebar", action = "mouse_move"} - end), - awful.button({ }, 3, function() - c:activate {context = "titlebar", action = "mouse_resize"} - end) - }) - - -- Titlebar's decorations - local left = wibox.widget { - awful.titlebar.widget.closebutton(c), - awful.titlebar.widget.maximizedbutton(c), - awful.titlebar.widget.minimizebutton(c), - spacing = dpi(6), - layout = wibox.layout.fixed.horizontal, - } - - local middle = wibox.widget { - buttons = buttons, - layout = wibox.layout.fixed.horizontal, - } - - local right = wibox.widget { - buttons = buttons, - layout = wibox.layout.fixed.horizontal, - } - - local container = wibox.widget { - bg = beautiful.bg, - widget = wibox.container.background, - } - - c:connect_signal("focus", function() container.bg = beautiful.bg end) - c:connect_signal("unfocus", function() container.bg = beautiful.bg end) - - return wibox.widget { - { - { - left, - middle, - right, - layout = wibox.layout.align.horizontal, - }, - margins = {top = dpi(12), bottom = dpi(12), left = dpi(10), right = dpi(10)}, - widget = wibox.container.margin, - }, - widget = container, - } -end - -local function top(c) - local titlebar = awful.titlebar(c, { - position = 'top', - size = dpi(50), - }) - - titlebar : setup { - widget = get_titlebar(c) - } -end - -client.connect_signal("request::titlebars", function(c) - if c.class == "feh" then - awful.titlebar.hide(c) - else - top(c) - end -end) diff --git a/conf/awesome/awesome/rc.lua b/conf/awesome/awesome/rc.lua deleted file mode 100644 index 1a22e57..0000000 --- a/conf/awesome/awesome/rc.lua +++ /dev/null @@ -1,36 +0,0 @@ ---[[ - ______ __ __ ______ ______ ______ __ __ ______ __ __ __ __ -/\ __ \ /\ \ _ \ \ /\ ___\ /\ ___\ /\ __ \ /\ "-./ \ /\ ___\ /\ \ _ \ \ /\ "-./ \ -\ \ __ \ \ \ \/ ".\ \ \ \ __\ \ \___ \ \ \ \/\ \ \ \ \-./\ \ \ \ __\ \ \ \/ ".\ \ \ \ \-./\ \ - \ \_\ \_\ \ \__/".~\_\ \ \_____\ \/\_____\ \ \_____\ \ \_\ \ \_\ \ \_____\ \ \__/".~\_\ \ \_\ \ \_\ - \/_/\/_/ \/_/ \/_/ \/_____/ \/_____/ \/_____/ \/_/ \/_/ \/_____/ \/_/ \/_/ \/_/ \/_/ - - --]] - -pcall(require, "luarocks.loader") - -local awful = require "awful" -local gears = require "gears" -local beautiful = require "beautiful" - -require "main.error_handling" - -beautiful.init(gears.filesystem.get_configuration_dir() .. "theme/theme.lua") - --- init config -require "main.wallpaper" -require "main.layout" -require "main.rules" -require "main.bindings.bindings" -require "main.bindings.custom_bindings" -require "main.tags" -require "main.menu" - -require "awful.autofocus" - --- init widget -require "misc" -require "signals" - --- Autorun at startup -awful.spawn.with_shell("bash ~/.config/awesome/main/autorun.sh") diff --git a/conf/awesome/awesome/signals/battery.lua b/conf/awesome/awesome/signals/battery.lua deleted file mode 100644 index 99f82f8..0000000 --- a/conf/awesome/awesome/signals/battery.lua +++ /dev/null @@ -1,35 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local beautiful = require "beautiful" - -local have_battery = [[ - bash -c ' - cat /sys/class/power_supply/BAT?/capacity 2>/dev/null | head -1 - ' -]] - -local bat_value -local bat_desc - -local function get_bat() - awful.spawn.easy_async(have_battery, function(stdout) - if not stdout:match("BAT") then - bat_value = 0 - bat_desc = "No Battery" - awesome.emit_signal("signal::bat", bat_value, bat_desc) - else - bat_value = tonumber(stdout) - bat_desc = bat_value.."% left" - awesome.emit_signal("signal::bat", bat_value, bat_desc) - end - end) -end - -gears.timer { - timeout = 5, - call_now = true, - autostart = true, - callback = function() - get_bat() - end -} diff --git a/conf/awesome/awesome/signals/brightness.lua b/conf/awesome/awesome/signals/brightness.lua deleted file mode 100644 index eeaa98b..0000000 --- a/conf/awesome/awesome/signals/brightness.lua +++ /dev/null @@ -1,49 +0,0 @@ --- Copy cat from --> Elena - --- Provides: --- signal::brightness --- percentage (integer) -local awful = require("awful") - --- Subscribe to backlight changes --- Requires inotify-tools -local brightness_subscribe_script = [[ - bash -c " - while (inotifywait -e modify /sys/class/backlight/?**/brightness -qq) do echo; done -"]] - -local brightness_script = [[ - sh -c " - brightnessctl g -"]] - -local brightness_max = [[ - sh -c " - brightnessctl m -"]] - -local emit_brightness_info = function() - awful.spawn.with_line_callback(brightness_script, { - stdout = function(value) - awful.spawn.with_line_callback(brightness_max, { - stdout = function(max) - percentage = tonumber(value)/tonumber(max) * 100 - percentage = tonumber(percentage) or 0 - awesome.emit_signal("signal::brightness", percentage) - end}) - end - }) -end - --- Run once to initialize widgets -emit_brightness_info() - --- Kill old inotifywait process -awful.spawn.easy_async_with_shell("ps x | grep \"inotifywait -e modify /sys/class/backlight\" | grep -v grep | awk '{print $1}' | xargs kill", function () - -- Update brightness status with each line printed - awful.spawn.with_line_callback(brightness_subscribe_script, { - stdout = function(_) - emit_brightness_info() - end - }) -end) diff --git a/conf/awesome/awesome/signals/disk.lua b/conf/awesome/awesome/signals/disk.lua deleted file mode 100644 index d6d3caa..0000000 --- a/conf/awesome/awesome/signals/disk.lua +++ /dev/null @@ -1,24 +0,0 @@ -local awful = require "awful" -local gears = require "gears" - -local which_disk = "/dev/sda2" - -local function get_disk() - local script = [[ - df -kH -B 1MB ]]..which_disk..[[ | tail -1 | awk '{printf $5}' - ]] - - awful.spawn.easy_async_with_shell(script, function(disk_perc) - disk_perc = disk_perc:match("%d+") - awesome.emit_signal("signal::disk", disk_perc) - end) -end - -gears.timer { - timeout = 2000, - call_now = true, - autostart = true, - callback = function() - get_disk() - end -} diff --git a/conf/awesome/awesome/signals/init.lua b/conf/awesome/awesome/signals/init.lua deleted file mode 100644 index 54a32d9..0000000 --- a/conf/awesome/awesome/signals/init.lua +++ /dev/null @@ -1,13 +0,0 @@ -req = { - "volume", - "brightness", - "wifi", - "weather", - "battery", - "player", - "disk" -} - -for _, x in pairs(req) do - require("signals."..x) -end diff --git a/conf/awesome/awesome/signals/player.lua b/conf/awesome/awesome/signals/player.lua deleted file mode 100644 index bfd5d8e..0000000 --- a/conf/awesome/awesome/signals/player.lua +++ /dev/null @@ -1,34 +0,0 @@ -local awful = require "awful" -local gears = require "gears" - --- Script -local title_sc = 'playerctl -i firefox metadata xesam:title' -local artist_sc = 'playerctl -i firefox metadata xesam:artist' -local length_sc = 'playerctl -i firefox metadata --format "{{duration(position)}}/{{duration(mpris:length)}}"' -local status_sc = 'playerctl -i firefox status' - --- function -local function get_player() - awful.spawn.easy_async_with_shell(title_sc, function(title) - awful.spawn.easy_async_with_shell(artist_sc, function(artist) - awful.spawn.easy_async_with_shell(length_sc, function(length) - awful.spawn.easy_async_with_shell(status_sc, function(status) - title = string.gsub(title, "\n", "") - artist = string.gsub(artist, "\n", "") - length = string.gsub(length, "\n", "") - status = string.gsub(status, "\n", "") - awesome.emit_signal("signal::player", title, artist, length, status) - end) - end) - end) - end) -end - -gears.timer { - timeout = 5, - call_now = true, - autostart = true, - callback = function() - get_player() - end -} diff --git a/conf/awesome/awesome/signals/volume.lua b/conf/awesome/awesome/signals/volume.lua deleted file mode 100644 index baa24a8..0000000 --- a/conf/awesome/awesome/signals/volume.lua +++ /dev/null @@ -1,31 +0,0 @@ -local awful = require "awful" -local gears = require "gears" -local wibox = require "wibox" - -local vol_sc = 'pamixer --get-volume' -local mute_sc = 'pamixer --get-mute' - -local function get_vol() - awful.spawn.easy_async_with_shell(vol_sc, function(vol) - awful.spawn.easy_async_with_shell(mute_sc, function(mute) - if mute:match("false") then - muted = false - else - muted = true - end - - awesome.emit_signal("signal::volume", vol, muted) - end) - end) -end - -gears.timer { - timeout = 2, - call_now = true, - autostart = true, - callback = function() - get_vol() - end -} - - diff --git a/conf/awesome/awesome/signals/weather.lua b/conf/awesome/awesome/signals/weather.lua deleted file mode 100644 index f135c21..0000000 --- a/conf/awesome/awesome/signals/weather.lua +++ /dev/null @@ -1,30 +0,0 @@ -local awful = require "awful" -local gears = require "gears" - -local city = "Jeram+Malaysia" -- Ex. London or Salt+Lake+City - -local get_weather = function() - local script = [[ - weather=$(curl -sf "wttr.in/]] .. city .. [[?format='%C:%f'") - if [ ! -z $weather ]; then - echo $weather - else - echo "Weather unavailable" - fi - ]] - - awful.spawn.easy_async_with_shell(script, function(stdout) - local weather = stdout:match("(.+):") - local feels_like = stdout:match(".+[:](.+)") - awesome.emit_signal('signal::weather', weather, feels_like) - end) -end - -gears.timer { - timeout = 1200, - call_now = true, - autostart = true, - callback = function() - get_weather() - end -} diff --git a/conf/awesome/awesome/signals/wifi.lua b/conf/awesome/awesome/signals/wifi.lua deleted file mode 100644 index 20258f1..0000000 --- a/conf/awesome/awesome/signals/wifi.lua +++ /dev/null @@ -1,41 +0,0 @@ -local awful = require "awful" -local gears = require "gears" - -local old_net_ssid = "Reconnect" -local old_net_stat = false - -local check_wifi = function() - local script = [[ - nmcli -t connection show --active - ]] - - awful.spawn.easy_async_with_shell( - script, - function(stdout) - local net_ssid = stdout - local net_stat = true - - if net_ssid == "" then - net_stat = false - net_ssid = "Not Connected" - end - - if net_ssid ~= old_net_ssid then -- Emit signal if there was a change - awesome.emit_signal("signal::wifi", net_stat, net_ssid) - old_net_ssid = net_ssid - old_net_stat = net_stat - end - end - ) -end - -check_wifi() - -gears.timer { - timeout = 3, - autostart = true, - call_now = true, - callback = function() - check_wifi() - end, -} diff --git a/conf/awesome/awesome/theme/assets/notif.png b/conf/awesome/awesome/theme/assets/notif.png deleted file mode 100644 index 204aeda..0000000 Binary files a/conf/awesome/awesome/theme/assets/notif.png and /dev/null differ diff --git a/conf/awesome/awesome/theme/assets/pfp.jpg b/conf/awesome/awesome/theme/assets/pfp.jpg deleted file mode 100644 index ed70d5d..0000000 Binary files a/conf/awesome/awesome/theme/assets/pfp.jpg and /dev/null differ diff --git a/conf/awesome/awesome/theme/assets/rklyz.png b/conf/awesome/awesome/theme/assets/rklyz.png deleted file mode 100644 index f1d2f8e..0000000 Binary files a/conf/awesome/awesome/theme/assets/rklyz.png and /dev/null differ diff --git a/conf/awesome/awesome/theme/assets/titlebar/close_1.png b/conf/awesome/awesome/theme/assets/titlebar/close_1.png deleted file mode 100644 index 772462b..0000000 Binary files a/conf/awesome/awesome/theme/assets/titlebar/close_1.png and /dev/null differ diff --git a/conf/awesome/awesome/theme/assets/titlebar/close_2.png b/conf/awesome/awesome/theme/assets/titlebar/close_2.png deleted file mode 100644 index 1f3db05..0000000 Binary files a/conf/awesome/awesome/theme/assets/titlebar/close_2.png and /dev/null differ diff --git a/conf/awesome/awesome/theme/assets/titlebar/minimize_1.png b/conf/awesome/awesome/theme/assets/titlebar/minimize_1.png deleted file mode 100644 index 4f5a7f0..0000000 Binary files a/conf/awesome/awesome/theme/assets/titlebar/minimize_1.png and /dev/null differ diff --git a/conf/awesome/awesome/theme/assets/titlebar/minimize_2.png b/conf/awesome/awesome/theme/assets/titlebar/minimize_2.png deleted file mode 100644 index 400aba1..0000000 Binary files a/conf/awesome/awesome/theme/assets/titlebar/minimize_2.png and /dev/null differ diff --git a/conf/awesome/awesome/theme/assets/wall.jpg b/conf/awesome/awesome/theme/assets/wall.jpg deleted file mode 100644 index a64a464..0000000 Binary files a/conf/awesome/awesome/theme/assets/wall.jpg and /dev/null differ diff --git a/conf/awesome/awesome/theme/assets/wall.png b/conf/awesome/awesome/theme/assets/wall.png deleted file mode 100644 index 546b753..0000000 Binary files a/conf/awesome/awesome/theme/assets/wall.png and /dev/null differ diff --git a/conf/awesome/awesome/theme/assets/weather_icon.png b/conf/awesome/awesome/theme/assets/weather_icon.png deleted file mode 100644 index 5e7cdc9..0000000 Binary files a/conf/awesome/awesome/theme/assets/weather_icon.png and /dev/null differ diff --git a/conf/awesome/awesome/theme/dark.lua b/conf/awesome/awesome/theme/dark.lua deleted file mode 100644 index aae234f..0000000 --- a/conf/awesome/awesome/theme/dark.lua +++ /dev/null @@ -1,18 +0,0 @@ -local dark = {} - -dark.black = "#212126" -dark.red = "#cc7a7a" -dark.green = "#b1cc7a" -dark.yellow = "#cca37a" -dark.blue = "#7a96cc" -dark.magenta = "#b886d1" -dark.pink = "#7ab1cc" -dark.white = "#f2e0ce" -dark.transparent = "#00000000" - -dark.fg = "#f2f2e9" - -dark.bg = "#17171C" -dark.bg_alt = "#212126" - -return dark diff --git a/conf/awesome/awesome/theme/light.lua b/conf/awesome/awesome/theme/light.lua deleted file mode 100644 index d565f4c..0000000 --- a/conf/awesome/awesome/theme/light.lua +++ /dev/null @@ -1,17 +0,0 @@ -local light = {} - -light.black = "#323333" -light.red = "#D96C6C" -light.green = "#B5D96C" -light.yellow = "#D9A36C" -light.blue = "#6C90D9" -light.magenta = "#B56CD9" -light.pink = "#E8B2C0" -light.white = "#E0DEDC" - -light.fg = "#33374c" - -light.bg = "#F2F2E9" -light.bg_alt = "#E1E4E6" - -return light diff --git a/conf/awesome/awesome/theme/theme.lua b/conf/awesome/awesome/theme/theme.lua deleted file mode 100644 index 814b5ee..0000000 --- a/conf/awesome/awesome/theme/theme.lua +++ /dev/null @@ -1,127 +0,0 @@ ---[[ - ______ ______ ______ __ __ ______ __ ______ __ __ __ -/\ == \ /\ ___\ /\ __ \ /\ \/\ \ /\__ _\ /\ \ /\ ___\ /\ \/\ \ /\ \ -\ \ __< \ \ __\ \ \ __ \ \ \ \_\ \ \/_/\ \/ \ \ \ \ \ __\ \ \ \_\ \ \ \ \____ - \ \_____\ \ \_____\ \ \_\ \_\ \ \_____\ \ \_\ \ \_\ \ \_\ \ \_____\ \ \_____\ - \/_____/ \/_____/ \/_/\/_/ \/_____/ \/_/ \/_/ \/_/ \/_____/ \/_____/ - - --]] - --- Requirement -local xresources = require "beautiful.xresources" -local rnotification = require "ruled.notification" -local dpi = xresources.apply_dpi -local gears = require "gears" -local gfs = require "gears.filesystem" - --- Var -local themes_path = gfs.get_configuration_dir() .. "theme/" -local walls_path = "~/.local/pictures/Walls/" -local home = os.getenv 'HOME' - -local theme = {} - ------ User Preferences ----- - -theme.wallpaper = themes_path.."assets/wall.jpg" -- Comment this to use feh - -theme.pfp = themes_path .. "assets/pfp.jpg" -theme.user = string.gsub(os.getenv('USER'), '^%l', string.upper) -theme.hostname = "@Neptune" - -theme.weather_icon = themes_path.."assets/weather_icon.png" - ------ Font ----- - -theme.font = "Roboto Medium 14" - ------ Colors ----- - -local light = require "theme.light" -local dark = require "theme.dark" - -local colors = dark -- Dark / Light - -theme.black = colors.black -theme.red = colors.red -theme.green = colors.green -theme.yellow = colors.yellow -theme.blue = colors.blue -theme.magenta = colors.magenta -theme.pink = colors.pink -theme.white = colors.white -theme.transparent = "#00000000" - -theme.fg = colors.fg - -theme.bg = colors.bg -theme.bg_alt = colors.bg_alt - ------ General/default Settings ----- - -theme.bg_normal = theme.bg -theme.bg_focus = "#e8e9ec" -theme.bg_urgent = "#e8e9ec" -theme.bg_minimize = "#e8e9ec" -theme.bg_systray = "#e8e9ec" - -theme.fg_normal = theme.fg -theme.fg_focus = theme.fg_normal -theme.fg_urgent = theme.fg_normal -theme.fg_minimize = theme.fg_normal - -theme.useless_gap = dpi(10) -theme.border_width = dpi(0) - --- Menu - -theme.menu_height = dpi(35) -theme.menu_width = dpi(200) -theme.menu_border_width = dpi(10) -theme.menu_border_color = theme.bg -theme.menu_fg_focus = theme.fg_normal -theme.menu_fg_normal = theme.taglist_fg_empty -theme.menu_bg_focus = theme.bg_alt -theme.menu_bg_normal = theme.bg -theme.submenu = ">" - --- titlebar's buttons -theme.titlebar_close_button_normal = gears.color.recolor_image(themes_path .. "assets/titlebar/close_1.png", theme.bg_alt) -theme.titlebar_close_button_focus = gears.color.recolor_image(themes_path .. "assets/titlebar/close_2.png", theme.red) - -theme.titlebar_minimize_button_normal = gears.color.recolor_image(themes_path .. "assets/titlebar/minimize_1.png", theme.bg_alt) -theme.titlebar_minimize_button_focus = gears.color.recolor_image(themes_path .. "assets/titlebar/minimize_2.png", theme.green) - -theme.titlebar_maximized_button_normal_inactive = gears.color.recolor_image(themes_path .. "assets/titlebar/close_1.png", theme.bg_alt) -theme.titlebar_maximized_button_focus_inactive = gears.color.recolor_image(themes_path .. "assets/titlebar/close_1.png", theme.yellow) -theme.titlebar_maximized_button_normal_active = gears.color.recolor_image(themes_path .. "assets/titlebar/close_1.png", theme.bg_alt) -theme.titlebar_maximized_button_focus_active = gears.color.recolor_image(themes_path .. "assets/titlebar/close_1.png", theme.yellow) - --- You can use your own layout icons like this: -theme.layout_fairh = themes_path.."layouts/fairhw.png" -theme.layout_fairv = themes_path.."layouts/fairvw.png" -theme.layout_floating = themes_path.."layouts/floatingw.png" -theme.layout_magnifier = themes_path.."layouts/magnifierw.png" -theme.layout_max = themes_path.."layouts/maxw.png" -theme.layout_fullscreen = themes_path.."layouts/fullscreenw.png" -theme.layout_tilebottom = themes_path.."layouts/tilebottomw.png" -theme.layout_tileleft = themes_path.."layouts/tileleftw.png" -theme.layout_tile = themes_path.."layouts/tilew.png" -theme.layout_tiletop = themes_path.."layouts/tiletopw.png" -theme.layout_spiral = themes_path.."default/layouts/spiralw.png" -theme.layout_dwindle = themes_path.."default/layouts/dwindlew.png" -theme.layout_cornernw = themes_path.."default/layouts/cornernww.png" -theme.layout_cornerne = themes_path.."default/layouts/cornernew.png" -theme.layout_cornersw = themes_path.."default/layouts/cornersww.png" -theme.layout_cornerse = themes_path.."default/layouts/cornersew.png" - -theme.icon_theme = nil - -rnotification.connect_signal('request::rules', function() - rnotification.append_rule { - rule = { urgency = 'critical' }, - properties = { bg = '#ff0000', fg = '#ffffff' } - } -end) - -return theme