diff --git a/home.nix b/home.nix index 91283de..e3d2bac 100644 --- a/home.nix +++ b/home.nix @@ -14,13 +14,6 @@ let "Alaska" ]; - awesome-wm-widgets = pkgs.fetchFromGitHub { - owner = "streetturtle"; - repo = "awesome-wm-widgets"; - rev = "ef70d16c43c2f566a4fe2955b8d6c08f6c185af8"; - sha256 = "td9uE+b3DrE+JJ3NCmIkQAuxJLJCGd79J5LZLqBw9KI="; - }; - install_packages = with pkgs; [ # (pkgs.callPackage ./modules/minecraft-bedrock/minecraft-bedrock-server.nix {}) # the possible minecraft-bedrock-server package for testing # utilities @@ -117,17 +110,6 @@ in programs.direnv.nix-direnv.enable = true; home = { - file = { - ".config/awesome" = { - source = ./rsrcs/awesome; - recursive = true; - }; - ".config/awesome/cpu-widget.lua".source = "${awesome-wm-widgets}/cpu-widget/cpu-widget.lua"; - ".config/awesome/ram-widget.lua".source = "${awesome-wm-widgets}/ram-widget/ram-widget.lua"; - ".config/awesome/batteryarc.lua".source = "${awesome-wm-widgets}/batteryarc-widget/batteryarc.lua"; - ".config/awesome/awesome-wm-widgets/spaceman.jpg".source = "${awesome-wm-widgets}/batteryarc-widget/spaceman.jpg"; - ".config/awesome/calendar.lua".source = "${awesome-wm-widgets}/calendar-widget/batteryarc.lua"; - }; # Home Manager needs a bit of information about you and the # paths it should manage. diff --git a/hosts/configuration.nix b/hosts/configuration.nix index 06a28e2..9fdd1d6 100644 --- a/hosts/configuration.nix +++ b/hosts/configuration.nix @@ -37,13 +37,6 @@ desktopManager.plasma5.enable = true; displayManager.defaultSession = "plasma"; - windowManager.awesome = { - enable = true; - luaModules = with pkgs.luaPackages; [ - vicious - luarocks # is the package manager for Lua modules - ]; - }; displayManager.sddm.enable = true; diff --git a/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-high-symbolic.svg b/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-high-symbolic.svg deleted file mode 100644 index 985c107..0000000 --- a/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-high-symbolic.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-low-symbolic.svg b/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-low-symbolic.svg deleted file mode 100644 index 7eb4531..0000000 --- a/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-low-symbolic.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-medium-symbolic.svg b/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-medium-symbolic.svg deleted file mode 100644 index 11e44fe..0000000 --- a/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-medium-symbolic.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-muted-symbolic.svg b/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-muted-symbolic.svg deleted file mode 100644 index e577d05..0000000 --- a/rsrcs/awesome/awesome-wm-widgets/icons/audio-volume-muted-symbolic.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/rsrcs/awesome/convert ffmmpeg in a folder.sh b/rsrcs/awesome/convert ffmmpeg in a folder.sh deleted file mode 100644 index 3dab010..0000000 --- a/rsrcs/awesome/convert ffmmpeg in a folder.sh +++ /dev/null @@ -1,2 +0,0 @@ -for i in *.jpg; do ffmpeg -i "$i" "${i%.*}.png"; done -for i in *.png; do ffmpeg -i "$i" -map_metadata -1 "${i%.*}.jpg"; done \ No newline at end of file diff --git a/rsrcs/awesome/dbus.lua b/rsrcs/awesome/dbus.lua deleted file mode 100644 index 1d8a8e4..0000000 --- a/rsrcs/awesome/dbus.lua +++ /dev/null @@ -1,17 +0,0 @@ -local p = require 'dbus_proxy' - -local dbus = {} - -dbus.proxy = p.Proxy:new( - { - bus = p.Bus.SESSION, - name = "org.awesome.galaxymenu", - interface = "org.awsome.galaxymenu", - path = "/org/awsome/galaxymenu/Main" - } -) - - -dbus.callback = function () { - -} diff --git a/rsrcs/awesome/key_conf.lua b/rsrcs/awesome/key_conf.lua deleted file mode 100644 index 0a729cc..0000000 --- a/rsrcs/awesome/key_conf.lua +++ /dev/null @@ -1,240 +0,0 @@ - -local awful = require("awful") -local gears = require("gears") - -local hotkeys_popup = require("awful.hotkeys_popup") --- Enable hotkeys help widget for VIM and other apps --- when client with a matching name is opened: -require("awful.hotkeys_popup.keys") - --- 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, --- I suggest you to remap Mod4 to another key using xmodmap or other tools. --- However, you can use another modifier like Mod1, but it may interact with others. -modkey = "Mod4" - -local key_conf = {} - --- {{{ Key bindings -key_conf.globalkeys = gears.table.join( - - -- misc hotkeys - awful.key({modkey, }, "z", function() awful.spawn.with_shell("rofi -show run") end, - {description = "launch rofi run window", group="launcher"}), - awful.key({ modkey, }, "s", hotkeys_popup.show_help, - {description="show help", group="awesome"}), - 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.key({ modkey, "Control" }, "l", function() awful.spawn.with_shell("/usr/bin/i3lock-fancy") end, - {description = "Lock the computer with i3lock-fancy", group="awesome"}), - - -- focusing hotkeys - 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, }, "w", function () mymainmenu:show() end, - {description = "show main menu", group = "awesome"}), - - -- Layout manipulation - 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, "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, }, "u", awful.client.urgent.jumpto, - {description = "jump to urgent client", 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"}), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, - {description = "open a terminal", group = "launcher"}), - 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, }, "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"}), - - awful.key({ modkey, "Control" }, "n", - function () - local c = awful.client.restore() - -- Focus restored client - if c then - c:emit_signal( - "request::activate", "key.unminimize", {raise = true} - ) - end - end, - {description = "restore minimized", group = "client"}), - - -- Prompt - awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, - {description = "run prompt", group = "launcher"}), - - 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"}) - -- Menubar - --awful.key({ modkey }, "p", function() menubar.show() end, - -- {description = "show the menubar", group = "launcher"}) -) - -key_conf.clientkeys = gears.table.join( - awful.key({ modkey, }, "f", - function (c) - c.fullscreen = not c.fullscreen - c:raise() - end, - {description = "toggle fullscreen", group = "client"}), - awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end, - {description = "defenstrate", 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"}) -) - --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it work on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - key_conf.globalkeys = gears.table.join(key_conf.globalkeys, - -- View tag only. - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = awful.screen.focused() - local tag = screen.tags[i] - if tag then - tag:view_only() - end - end, - {description = "view tag #"..i, group = "tag"}), - -- Toggle tag display. - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = awful.screen.focused() - local tag = screen.tags[i] - if tag then - awful.tag.viewtoggle(tag) - end - end, - {description = "toggle tag #" .. i, group = "tag"}), - -- Move client to tag. - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - if client.focus then - local tag = client.focus.screen.tags[i] - if tag then - client.focus:move_to_tag(tag) - end - end - end, - {description = "move focused client to tag #"..i, group = "tag"}), - -- Toggle tag on focused client. - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - if client.focus then - local tag = client.focus.screen.tags[i] - if tag then - client.focus:toggle_tag(tag) - end - end - end, - {description = "toggle focused client on tag #" .. i, group = "tag"}) - ) -end - -key_conf.clientbuttons = gears.table.join( - awful.button({ }, 1, function (c) - c:emit_signal("request::activate", "mouse_click", {raise = true}) - end), - awful.button({ modkey }, 1, function (c) - c:emit_signal("request::activate", "mouse_click", {raise = true}) - awful.mouse.client.move(c) - end), - awful.button({ modkey }, 3, function (c) - c:emit_signal("request::activate", "mouse_click", {raise = true}) - awful.mouse.client.resize(c) - end) -) - --- Set keys -root.keys(key_conf.globalkeys) --- }}} - -return key_conf diff --git a/rsrcs/awesome/menu_conf.lua b/rsrcs/awesome/menu_conf.lua deleted file mode 100644 index 2ff46c3..0000000 --- a/rsrcs/awesome/menu_conf.lua +++ /dev/null @@ -1,290 +0,0 @@ - -local awful = require("awful") -local gears = require("gears") -local beautiful = require("beautiful") -local wibox = require("wibox") -local menubar = require("menubar") -local cpu_widget = require("cpu-widget") -local battery_widget = require("batteryarc") -local ram_widget = require("ram-widget") - --- Mod+p for a simple .desktop thing, probably not going to use -local vicious = require("vicious") - -local hotkeys_popup = require("awful.hotkeys_popup") --- Enable hotkeys help widget for VIM and other apps --- when client with a matching name is opened: -require("awful.hotkeys_popup.keys") - -local menu_conf = {} - -menu_conf.init = function( - theme_dir, terminal, editor, editor_cmd) - - beautiful.init(theme_dir) - - -- {{{ Menu - -- Create a launcher widget and a main menu - myawesomemenu = { - { "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, - { "manual", terminal .. " -e man awesome" }, - { "edit config", editor_cmd .. " " .. awesome.conffile }, - { "restart", awesome.restart }, - { "quit", function() awesome.quit() end }, - } - - mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, - { "open terminal", terminal } - } - }) - - mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, - menu = mymainmenu }) - - -- Menubar configuration - menubar.utils.terminal = terminal -- Set the terminal for applications that require it - -- }}} - - -- {{{ Wibar - -- Create a textclock widget - mytextclock = wibox.widget.background() - mytextclock:set_widget(awful.widget.textclock()) - mytextclock:set_bg(beautiful.bg_normal) - - - -- Create a wibox for each screen and add it - local taglist_buttons = gears.table.join( - awful.button({ }, 1, function(t) t:view_only() end), - awful.button({ modkey }, 1, function(t) - if client.focus then - client.focus:move_to_tag(t) - end - end), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, function(t) - if client.focus then - client.focus:toggle_tag(t) - end - end), - awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) - ) - - local tasklist_buttons = gears.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - c:emit_signal( - "request::activate", - "tasklist", - {raise = true} - ) - end - end), - awful.button({ }, 3, function() - awful.menu.client_list({ theme = { width = 250 } }) - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - end)) - - local function set_wallpaper(s) - -- Wallpaper - if beautiful.wallpaper then - local wallpaper = beautiful.wallpaper - -- If wallpaper is a function, call it with the screen - if type(wallpaper) == "function" then - wallpaper = wallpaper(s) - end - gears.wallpaper.maximized(wallpaper, s, true) - end - end - - -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) - screen.connect_signal("property::geometry", set_wallpaper) - - awful.screen.connect_for_each_screen(function(s) - -- Wallpaper - set_wallpaper(s) - - -- Each screen has its own tag table. - awful.tag({ "1", "2", "3", "4", "5" }, s, awful.layout.layouts[1]) - - -- Create an imagebox widget which will contain an icon indicating which layout we're using. - -- We need one layoutbox per screen. - local layoutbox = awful.widget.layoutbox(s) - layoutbox:buttons(gears.table.join( - awful.button({ }, 1, function () awful.layout.inc( 1) end), - awful.button({ }, 3, function () awful.layout.inc(-1) end), - awful.button({ }, 4, function () awful.layout.inc( 1) end), - awful.button({ }, 5, function () awful.layout.inc(-1) end))) - - s.mylayoutbox = wibox.widget.background() - s.mylayoutbox:set_widget(layoutbox) - s.mypromptbox = awful.widget.prompt() - - -- Create a taglist widget - s.mytaglist = awful.widget.taglist { - screen = s, - filter = awful.widget.taglist.filter.all, - buttons = taglist_buttons, - } - - -- Create a tasklist widget - s.mytasklist = awful.widget.tasklist { - screen = s, - filter = awful.widget.tasklist.filter.currenttags, - buttons = tasklist_buttons, - layout = { - spacing = 0, - layout = wibox.layout.flex.horizontal, - }, - widget_template = { - { - { - { - { - id = 'icon_role', - widget = wibox.widget.imagebox, - }, - margins = 0, - widget = wibox.container.margin, - }, - { - id = 'text_role', - widget = wibox.widget.textbox, - }, - layout = wibox.layout.fixed.horizontal, - }, - left = 20, - right = 20, - widget = wibox.container.margin, - }, - id = 'background_role', - widget = wibox.container.background, - }, - } - - s.battery_widget = wibox.widget { - battery_widget({ - show_current_level = true, - bg_color = "#ff0000", - size = 30, - arc_thickness = 3, - }), - bg = beautiful.bg_normal, - widget = wibox.container.background, - } - - s.cpu_widget = cpu_widget({ - width = 70, - step_width = 2, - step_spacing = 0, - color = '#434c9e', - background_color = beautiful.bg_normal, - }) - - s.ram_widget = wibox.widget { - ram_widget({ - --color_used= - --color_buf= - --color_free= - widget_width=35, - widget_height=35, - widget_show_buf=true, - }), - bg = beautiful.bg_normal, - widget = wibox.container.background, - } - - - function left_endpoint_shape(cr, width, height) - -- insert custom shape building here: - gears.shape.transform(gears.shape.rectangular_tag) - : translate(0, -height) - (cr, width, height*2, width) - end - - function right_endpoint_shape(cr, width, height) - -- insert custom shape building here: - gears.shape.transform(gears.shape.rectangular_tag) - : rotate_at(width/2, height, math.pi) - : translate(0, height) - (cr, width, height*2, width) - end - - -- Custom Widget the makes the left-side angle - local left_endpoint = { - { - { - widget = wibox.widget.textbox, - }, - layout = wibox.layout.fixed.horizontal, - }, - bg = beautiful.bg_normal, - forced_width = beautiful.menu_height, - shape = left_endpoint_shape, - widget = wibox.container.background, - } - - -- Custom widget that makes the right-side angle - local right_endpoint = { - { - { - widget = wibox.widget.textbox, - }, - layout = wibox.layout.fixed.horizontal, - }, - bg = beautiful.bg_normal, - forced_width = beautiful.menu_height, - shape = right_endpoint_shape, - widget = wibox.container.background, - } - - -- Create the wibox - s.mywibox = awful.wibar({ - position = "top", - screen = s, - bg = beautiful.bg_systray - }) - - -- Add widgets to the wibox - s.mywibox:setup { - layout = wibox.layout.align.horizontal, - expand = "none", - { -- Left widgets - layout = wibox.layout.fixed.horizontal, - - mylauncher, - s.mytaglist, - s.mypromptbox, - right_endpoint, - }, - { - layout = wibox.layout.fixed.horizontal, - - left_endpoint, - s.mytasklist, -- Middle widget - right_endpoint, - }, - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - - left_endpoint, - s.cpu_widget, - s.ram_widget, - s.battery_widget, - wibox.widget.systray(), - mytextclock, - s.mylayoutbox, - }, - } - end) - -- }}} -end - -return menu_conf diff --git a/rsrcs/awesome/rc.lua b/rsrcs/awesome/rc.lua deleted file mode 100644 index ed93a06..0000000 --- a/rsrcs/awesome/rc.lua +++ /dev/null @@ -1,149 +0,0 @@ -package.path = package.path .. ';/usr/local/share/lua/5.3/?.lua;/usr/share/lua/5.3/?.lua;/usr/share/lua/5.3/?/init.lua;/usr/lib/lua/5.3/?.lua;/usr/lib/lua/5.3/?/init.lua;./?.lua;./?/init.lua;/home/nick/.luarocks/share/lua/5.3/?.lua;/home/nick/.luarocks/share/lua/5.3/?/init.lua;/usr/local/share/lua/5.3/?/init.lua;/home/nicholas/.luarocks/share/lua/5.3/?.lua;/home/nicholas/.luarocks/share/lua/5.3/?/init.lua' -package.cpath = package.cpath .. ';/usr/lib/lua/5.3/?.so;/usr/lib/lua/5.3/loadall.so;./?.so;/home/nick/.luarocks/lib/lua/5.3/?.so;/usr/local/lib/lua/5.3/?.so;/home/nicholas/.luarocks/lib/lua/5.3/?.so' - --- If LuaRocks is installed, make sure that packages installed through it are --- found (e.g. lgi). If LuaRocks is not installed, do nothing. -pcall(require, "luarocks.loader") - --- Standard awesome library -local gears = require("gears") -local awful = require("awful") -require("awful.autofocus") --- Widget and layout library -local wibox = require("wibox") --- Theme handling librarykey -local beautiful = require("beautiful") --- Notification library -local naughty = require("naughty") - -local key_conf = require("key_conf") -local menu_conf = require("menu_conf") -local signals = require("signals") -local rules = require("window_rules") - - --- {{{ Error handling --- Check if awesome encountered an error during startup and fell back to --- another config (This code will only ever execute for the fallback config) -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - --- Handle runtime errors after startup -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - -- Make sure we don't go into an endless error loop - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = tostring(err) }) - in_error = false - end) -end --- }}} - --- {{{ Variable definitions --- Themes define colours, icons, font and wallpapers. -local theme_name = "galaxymenu" -beautiful.init(string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), theme_name )) --- beautiful.wallpaper = string.format("%s/.config/awesome/themes/%s/wallpapers/earth2.png", os.getenv("HOME"), theme_name ) - --- {{{ Function definitions - --- scan directory, and optionally filter outputs -function scandir(directory) - local i, t, popen = 0, {}, io.popen - local pfile = popen('ls -a "'..directory..'"') - for filename in pfile:lines() do - i = i + 1 - t[i] = filename - end - pfile:close() - return t -end --- }}} - --- configuration - edit to your liking -wp_timeout = 180 - --- simply put more pictures in this folder -wp_path = string.format("%s/.config/awesome/themes/%s/wallpapers/", os.getenv("HOME"), theme_name ) -wp_filter = function(s) return string.match(s,"%.png$") end -wp_files = scandir(wp_path) -wp_index = math.random(1, #wp_files) - -local rand_wllppr = function() - - -- set wallpaper to current index for all screens - beautiful.wallpaper = wp_files[wp_index] - gears.wallpaper.maximized(beautiful.wallpaper) - - -- stop the timer (we don't need multiple instances running at the same time) - wp_timer:stop() - - -- get next random index - wp_index = math.random( 1, #wp_files) - - --restart the timer - wp_timer.timeout = wp_timeout - wp_timer:start() -end --- setup the timer -wp_timer = timer { timeout = wp_timeout } -wp_timer:connect_signal("timeout", rand_wllppr) - --- initial start when rc.lua is first run -wp_timer:start() -rand_wllppr() - - --- This is used later as the default terminal and editor to run. -terminal = "wezterm" -editor = os.getenv("EDITOR") or "vim" -editor_cmd = terminal .. " -e " .. editor - - --- Table of layouts to cover with awful.layout.inc, order matters. -awful.layout.layouts = { - awful.layout.suit.tile, - awful.layout.suit.tile.left, - awful.layout.suit.floating, - awful.layout.suit.tile.bottom, - awful.layout.suit.tile.top, - awful.layout.suit.fair, - awful.layout.suit.fair.horizontal, - awful.layout.suit.spiral, - --awful.layout.suit.spiral.dwindle, - awful.layout.suit.max, - -- awful.layout.suit.max.fullscreen, - -- awful.layout.suit.magnifier, - awful.layout.suit.corner.nw, - -- awful.layout.suit.corner.ne, - -- awful.layout.suit.corner.sw, - -- awful.layout.suit.corner.se, -} --- }}} - -menu_conf.init(theme_dir, terminal, editor, editor_cmd) - --- {{{ Mouse bindings -root.buttons(gears.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} ---awful.spawn.with_shell(string.format("%s/.config/autostart.sh", os.getenv("HOME"))) ---awful.spawn.with_shell(string.format("%s/.config/polybar/start_polybar.sh", os.getenv("HOME"))) --- XDG autostart --- awful.spawn.with_shell( --- 'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' .. --- 'xrdb -merge <<< "awesome.started:true";' .. - -- list each of your autostart commands, followed by ; inside single quotes, followed by .. --- 'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' -- https://github.com/jceb/dex --- ) diff --git a/rsrcs/awesome/signals.lua b/rsrcs/awesome/signals.lua deleted file mode 100644 index 89b19a2..0000000 --- a/rsrcs/awesome/signals.lua +++ /dev/null @@ -1,161 +0,0 @@ - -local awful = require("awful") -local gears = require("gears") -local wibox = require("wibox") -local beautiful = require("beautiful") -local naughty = require("naughty") - --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c) - -- Set the windows at the slave, - -- i.e. put it at the end of others instead of setting it master. - -- if not awesome.startup then awful.client.setslave(c) end - - if awesome.startup - and not c.size_hints.user_position - and not c.size_hints.program_position then - -- Prevent clients from being unreachable after screen count changes. - awful.placement.no_offscreen(c) - end -end) - --- Add a titlebar if titlebars_enabled is set to true in the rules. -local create_titlebar = function(c, is_floating) - -- buttons for the titlebar - local buttons = gears.table.join( - awful.button({ }, 1, function() - c:emit_signal("request::activate", "titlebar", {raise = true}) - awful.mouse.client.move(c) - end), - awful.button({ }, 3, function() - c:emit_signal("request::activate", "titlebar", {raise = true}) - awful.mouse.client.resize(c) - end) - ) - - local my_close_btn = awful.titlebar.widget.closebutton(c) - -- The part that actually removes the tooltip - my_close_btn._private.tooltip:remove_from_object(my_close_btn) - - local defenstrate_tooltip = awful.tooltip { } - defenstrate_tooltip:add_to_object(my_close_btn) - my_close_btn:connect_signal('mouse::enter', function() - defenstrate_tooltip.text = "Defenstrate" - end) - - function drag_bar_shape(cr, width, height) - local radius = 10 - gears.shape.rounded_rect(cr, width, height, radius) - end - - if (is_floating) - then - awful.titlebar(c) : setup { - { -- Left - awful.titlebar.widget.iconwidget(c), - buttons = buttons, - layout = wibox.layout.fixed.horizontal - }, - { -- Middle - { -- Title - align = "center", - widget = awful.titlebar.widget.titlewidget(c) - }, - buttons = buttons, - layout = wibox.layout.flex.horizontal - }, - { -- Right - awful.titlebar.widget.floatingbutton (c), - awful.titlebar.widget.maximizedbutton(c), - --awful.titlebar.widget.stickybutton (c), - awful.titlebar.widget.ontopbutton (c), - my_close_btn, - --awful.titlebar.widget.closebutton (c), - layout = wibox.layout.fixed.horizontal() - }, - layout = wibox.layout.align.horizontal - } - else - awful.titlebar(c, { - size = beautiful.tiled_titlebar_height, - bg_normal = beautiful.tiled_titlebar_bg_normal, - bg_focus = beautiful.tiled_titlebar_bg_focus, - }) : setup { - { - layout = wibox.layout.fixed.horizontal - }, - { -- Middle - { - { - { - widget = wibox.widget.textbox, - }, - layout = wibox.layout.flex.horizontal, - }, - bg = beautiful.tiled_titlebar_center, - forced_width = 80, - shape = drag_bar_shape, - widget = wibox.container.background, - }, - layout = wibox.layout.align.horizontal, - buttons = buttons, - }, - { -- Right - layout = wibox.layout.fixed.horizontal() - }, - expand = "outside", - layout = wibox.layout.align.horizontal - } - end -end - -client.connect_signal("request::titlebars", function(c) - create_titlebar(c, true) - end -) - --- Enable sloppy focus, so that focus follows mouse. -client.connect_signal("mouse::enter", function(c) - c:emit_signal("request::activate", "mouse_enter", {raise = false}) -end) - -client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} - -client.connect_signal("property::floating", function(c) - if c.floating then - --awful.titlebar.show(c) - create_titlebar(c, true) - else - --awful.titlebar.hide(c) - create_titlebar(c, false) - end -end) - -function dynamic_title(c) - if c.floating or c.first_tag.layout.name == "floating" then - --awful.titlebar.show(c) - create_titlebar(c, true) - else - --awful.titlebar.hide(c) - create_titlebar(c, false) - end -end - -tag.connect_signal("property::layout", function(t) - local clients = t:clients() - for k,c in pairs(clients) do - if c.floating or c.first_tag.layout.name == "floating" then - --awful.titlebar.show(c) - create_titlebar(c, true) - else - --awful.titlebar.hide(c) - create_titlebar(c, false) - end - end -end) - -client.connect_signal("manage", dynamic_title) -client.connect_signal("tagged", dynamic_title) diff --git a/rsrcs/awesome/themes/galaxymenu/README b/rsrcs/awesome/themes/galaxymenu/README deleted file mode 100644 index 1ddb349..0000000 --- a/rsrcs/awesome/themes/galaxymenu/README +++ /dev/null @@ -1,3 +0,0 @@ -Background images: - Mikael Eriksson - Licensed under CC-BY-SA-3.0 diff --git a/rsrcs/awesome/themes/galaxymenu/background.png b/rsrcs/awesome/themes/galaxymenu/background.png deleted file mode 100644 index 8f52b6b..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/background.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/background_white.png b/rsrcs/awesome/themes/galaxymenu/background_white.png deleted file mode 100644 index bb0c5d0..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/background_white.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/cornerne.png b/rsrcs/awesome/themes/galaxymenu/layouts/cornerne.png deleted file mode 100644 index c85bd56..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/cornerne.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/cornernew.png b/rsrcs/awesome/themes/galaxymenu/layouts/cornernew.png deleted file mode 100644 index c3fd986..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/cornernew.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/cornernw.png b/rsrcs/awesome/themes/galaxymenu/layouts/cornernw.png deleted file mode 100644 index dfe78b3..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/cornernw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/cornernww.png b/rsrcs/awesome/themes/galaxymenu/layouts/cornernww.png deleted file mode 100644 index f489010..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/cornernww.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/cornerse.png b/rsrcs/awesome/themes/galaxymenu/layouts/cornerse.png deleted file mode 100644 index 023ae79..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/cornerse.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/cornersew.png b/rsrcs/awesome/themes/galaxymenu/layouts/cornersew.png deleted file mode 100644 index f7cfa1c..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/cornersew.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/cornersw.png b/rsrcs/awesome/themes/galaxymenu/layouts/cornersw.png deleted file mode 100644 index c1453c9..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/cornersw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/cornersww.png b/rsrcs/awesome/themes/galaxymenu/layouts/cornersww.png deleted file mode 100644 index a65a043..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/cornersww.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/dwindle.png b/rsrcs/awesome/themes/galaxymenu/layouts/dwindle.png deleted file mode 100644 index 9902d22..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/dwindle.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/dwindlew.png b/rsrcs/awesome/themes/galaxymenu/layouts/dwindlew.png deleted file mode 100644 index 9199049..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/dwindlew.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/fairh.png b/rsrcs/awesome/themes/galaxymenu/layouts/fairh.png deleted file mode 100644 index d41deea..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/fairh.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/fairhw.png b/rsrcs/awesome/themes/galaxymenu/layouts/fairhw.png deleted file mode 100644 index bb50e3a..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/fairhw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/fairv.png b/rsrcs/awesome/themes/galaxymenu/layouts/fairv.png deleted file mode 100644 index f5f0288..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/fairv.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/fairvw.png b/rsrcs/awesome/themes/galaxymenu/layouts/fairvw.png deleted file mode 100644 index 4f4ed52..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/fairvw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/floating.png b/rsrcs/awesome/themes/galaxymenu/layouts/floating.png deleted file mode 100644 index b8061a0..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/floating.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/floatingw.png b/rsrcs/awesome/themes/galaxymenu/layouts/floatingw.png deleted file mode 100644 index 4815894..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/floatingw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/fullscreen.png b/rsrcs/awesome/themes/galaxymenu/layouts/fullscreen.png deleted file mode 100644 index d02f6fc..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/fullscreen.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/fullscreenw.png b/rsrcs/awesome/themes/galaxymenu/layouts/fullscreenw.png deleted file mode 100644 index 5c35bfa..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/fullscreenw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/magnifier.png b/rsrcs/awesome/themes/galaxymenu/layouts/magnifier.png deleted file mode 100644 index 2925414..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/magnifier.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/magnifierw.png b/rsrcs/awesome/themes/galaxymenu/layouts/magnifierw.png deleted file mode 100644 index 6209556..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/magnifierw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/max.png b/rsrcs/awesome/themes/galaxymenu/layouts/max.png deleted file mode 100644 index 8d20844..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/max.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/maxw.png b/rsrcs/awesome/themes/galaxymenu/layouts/maxw.png deleted file mode 100644 index 85f5ce3..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/maxw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/spiral.png b/rsrcs/awesome/themes/galaxymenu/layouts/spiral.png deleted file mode 100644 index d9434be..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/spiral.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/spiralw.png b/rsrcs/awesome/themes/galaxymenu/layouts/spiralw.png deleted file mode 100644 index b78dd86..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/spiralw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/tile.png b/rsrcs/awesome/themes/galaxymenu/layouts/tile.png deleted file mode 100644 index 3ede21e..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/tile.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/tilebottom.png b/rsrcs/awesome/themes/galaxymenu/layouts/tilebottom.png deleted file mode 100644 index 6f8c257..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/tilebottom.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/tilebottomw.png b/rsrcs/awesome/themes/galaxymenu/layouts/tilebottomw.png deleted file mode 100644 index a1de7b2..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/tilebottomw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/tileleft.png b/rsrcs/awesome/themes/galaxymenu/layouts/tileleft.png deleted file mode 100644 index 31d6870..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/tileleft.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/tileleftw.png b/rsrcs/awesome/themes/galaxymenu/layouts/tileleftw.png deleted file mode 100644 index cf14c25..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/tileleftw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/tiletop.png b/rsrcs/awesome/themes/galaxymenu/layouts/tiletop.png deleted file mode 100644 index 98cade2..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/tiletop.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/tiletopw.png b/rsrcs/awesome/themes/galaxymenu/layouts/tiletopw.png deleted file mode 100644 index d1d0872..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/tiletopw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/layouts/tilew.png b/rsrcs/awesome/themes/galaxymenu/layouts/tilew.png deleted file mode 100644 index fde2ca4..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/layouts/tilew.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/submenu.png b/rsrcs/awesome/themes/galaxymenu/submenu.png deleted file mode 100644 index b2778e2..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/submenu.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/taglist/squarefw.png b/rsrcs/awesome/themes/galaxymenu/taglist/squarefw.png deleted file mode 100644 index 2a86430..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/taglist/squarefw.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/taglist/squarew.png b/rsrcs/awesome/themes/galaxymenu/taglist/squarew.png deleted file mode 100644 index 913f2ca..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/taglist/squarew.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/theme.lua b/rsrcs/awesome/themes/galaxymenu/theme.lua deleted file mode 100644 index 11cf56e..0000000 --- a/rsrcs/awesome/themes/galaxymenu/theme.lua +++ /dev/null @@ -1,148 +0,0 @@ ---------------------------- --- awesome theme -- ---------------------------- - -local theme_assets = require("beautiful.theme_assets") -local xresources = require("beautiful.xresources") -local dpi = xresources.apply_dpi - -local themes_path = string.format("%s/.config/awesome/themes/galaxymenu", os.getenv("HOME")) - -local theme = {} - -theme.font = "DejaVu Sans Condensed Regular 10" - -theme.bg_normal = "#373B41" -theme.bg_focus = "#004B25" -theme.bg_urgent = "#C41113" -theme.bg_minimize = "#444444" -theme.bg_systray = "#00000000" - -theme.fg_normal = "#43B9EC" -theme.fg_focus = "#ffffff" -theme.fg_urgent = "#ffffff" -theme.fg_minimize = "#ffffff" - -theme.useless_gap = dpi(3) -theme.border_width = dpi(1) -theme.border_normal = "#000000" -theme.border_focus = "#00FF80" -theme.border_marked = "#91231c" - -theme.tiled_titlebar_height = dpi(5) -theme.tiled_titlebar_center = "#CECECE" -theme.tiled_titlebar_bg_normal = theme.bg_systray -theme.tiled_titlebar_bg_focus = "#02709fBB" - - --- overriding the one when --- defined, the sets are: --- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile] --- tasklist_[bg|fg]_[focus|urgent] --- titlebar_[bg|fg]_[normal|focus] -theme.titlebar_bg_focus = "#03723A" --- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color] --- mouse_finder_[color|timeout|animate_timeout|radius|factor] --- prompt_[fg|bg|fg_cursor|bg_cursor|font] --- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font] --- Example: ---theme.taglist_bg_focus = "#ff0000" - --- Generate taglist squares: -local taglist_square_size = dpi(4) -theme.taglist_squares_sel = theme_assets.taglist_squares_sel( - taglist_square_size, theme.fg_normal -) -theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel( - taglist_square_size, theme.fg_normal -) - --- Variables set for theming notifications: --- notification_font --- notification_[bg|fg] --- notification_[width|height|margin] --- notification_[border_color|border_width|shape|opacity] --- Variables set for theming the menu: --- menu_[bg|fg]_[normal|focus] --- menu_[border_color|border_width] -theme.menu_submenu_icon = themes_path.."/submenu.png" -theme.menu_height = dpi(20) -theme.menu_width = dpi(100) -theme.menu_text_color_contrast = "#002477" - -theme.taglist_fg_focus = theme.menu_text_color_contrast -theme.taglist_bg_focus = "#79B7D1" -theme.taglist_fg_urgent = theme.menu_text_color_contrast -theme.taglist_fg_occupied = theme.menu_text_color_contrast -theme.taglist_bg_occupied = "#3286AA" -theme.taglist_bg_empty = theme.bg_normal - - --- You can add as many variables as --- you wish and access them by using --- beautiful.variable in your rc.lua ---theme.bg_widget = "#cc0000" - --- Define the image to load -theme.titlebar_close_button_normal = themes_path.."/titlebar/close_normal.png" -theme.titlebar_close_button_focus = themes_path.."/titlebar/close_focus.png" - -theme.titlebar_minimize_button_normal = themes_path.."/titlebar/minimize_normal.png" -theme.titlebar_minimize_button_focus = themes_path.."/titlebar/minimize_focus.png" - -theme.titlebar_ontop_button_normal_inactive = themes_path.."/titlebar/ontop_normal_inactive.png" -theme.titlebar_ontop_button_focus_inactive = themes_path.."/titlebar/ontop_focus_inactive.png" -theme.titlebar_ontop_button_normal_active = themes_path.."/titlebar/ontop_normal_active.png" -theme.titlebar_ontop_button_focus_active = themes_path.."/titlebar/ontop_focus_active.png" - -theme.titlebar_sticky_button_normal_inactive = themes_path.."/titlebar/sticky_normal_inactive.png" -theme.titlebar_sticky_button_focus_inactive = themes_path.."/titlebar/sticky_focus_inactive.png" -theme.titlebar_sticky_button_normal_active = themes_path.."/titlebar/sticky_normal_active.png" -theme.titlebar_sticky_button_focus_active = themes_path.."/titlebar/sticky_focus_active.png" - -theme.titlebar_floating_button_normal_inactive = themes_path.."/titlebar/floating_normal_inactive.png" -theme.titlebar_floating_button_focus_inactive = themes_path.."/titlebar/floating_focus_inactive.png" -theme.titlebar_floating_button_normal_active = themes_path.."/titlebar/floating_normal_active.png" -theme.titlebar_floating_button_focus_active = themes_path.."/titlebar/floating_focus_active.png" - ---when not focused, but maximized -theme.titlebar_maximized_button_normal_inactive = themes_path.."/titlebar/maximized_normal_inactive.png" ---when focused and not maximized -theme.titlebar_maximized_button_focus_inactive = themes_path.."/titlebar/maximized_focus_inactive.png" ---when not focused or maximized -theme.titlebar_maximized_button_normal_active = themes_path.."/titlebar/maximized_normal_active.png" ---when focused and maximized -theme.titlebar_maximized_button_focus_active = themes_path.."/titlebar/maximized_focus_active.png" - ---theme.wallpaper = themes_path.."/background.png" - --- 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.."/layouts/spiralw.png" -theme.layout_dwindle = themes_path.."/layouts/dwindlew.png" -theme.layout_cornernw = themes_path.."/layouts/cornernww.png" -theme.layout_cornerne = themes_path.."/layouts/cornernew.png" -theme.layout_cornersw = themes_path.."/layouts/cornersww.png" -theme.layout_cornerse = themes_path.."/layouts/cornersew.png" - --- Generate Awesome icon: -theme.awesome_icon = theme_assets.awesome_icon( - theme.menu_height, theme.bg_focus, theme.fg_focus -) - --- Define the icon theme for application icons. If not set then the icons --- from /usr/share/icons and /usr/share/icons/hicolor will be used. -theme.icon_theme = nil - -return theme - --- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/close_focus.png b/rsrcs/awesome/themes/galaxymenu/titlebar/close_focus.png deleted file mode 100644 index 7afb2d9..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/close_focus.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/close_normal.png b/rsrcs/awesome/themes/galaxymenu/titlebar/close_normal.png deleted file mode 100644 index 306482b..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/close_normal.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/floating_focus_active.png b/rsrcs/awesome/themes/galaxymenu/titlebar/floating_focus_active.png deleted file mode 100644 index 82dcc7c..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/floating_focus_active.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/floating_focus_inactive.png b/rsrcs/awesome/themes/galaxymenu/titlebar/floating_focus_inactive.png deleted file mode 100644 index c19ba80..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/floating_focus_inactive.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/floating_normal_active.png b/rsrcs/awesome/themes/galaxymenu/titlebar/floating_normal_active.png deleted file mode 100644 index 62342d1..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/floating_normal_active.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/floating_normal_inactive.png b/rsrcs/awesome/themes/galaxymenu/titlebar/floating_normal_inactive.png deleted file mode 100644 index e2bbdfa..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/floating_normal_inactive.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_focus_active.png b/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_focus_active.png deleted file mode 100644 index 99708e2..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_focus_active.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_focus_inactive.png b/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_focus_inactive.png deleted file mode 100644 index 11aadf6..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_focus_inactive.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_normal_active.png b/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_normal_active.png deleted file mode 100644 index e7ed1c4..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_normal_active.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_normal_inactive.png b/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_normal_inactive.png deleted file mode 100644 index 9b5c810..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/maximized_normal_inactive.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/minimize_focus.png b/rsrcs/awesome/themes/galaxymenu/titlebar/minimize_focus.png deleted file mode 100644 index caaceb2..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/minimize_focus.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/minimize_normal.png b/rsrcs/awesome/themes/galaxymenu/titlebar/minimize_normal.png deleted file mode 100644 index 36621d0..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/minimize_normal.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_focus_active.png b/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_focus_active.png deleted file mode 100644 index 312c00b..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_focus_active.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_focus_inactive.png b/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_focus_inactive.png deleted file mode 100644 index a48e1c5..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_focus_inactive.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_normal_active.png b/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_normal_active.png deleted file mode 100644 index 117a203..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_normal_active.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_normal_inactive.png b/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_normal_inactive.png deleted file mode 100644 index d3a10c8..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/ontop_normal_inactive.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_focus_active.png b/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_focus_active.png deleted file mode 100644 index 814499b..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_focus_active.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_focus_inactive.png b/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_focus_inactive.png deleted file mode 100644 index 21b000d..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_focus_inactive.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_normal_active.png b/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_normal_active.png deleted file mode 100644 index bdb5595..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_normal_active.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_normal_inactive.png b/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_normal_inactive.png deleted file mode 100644 index a96b9b1..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/titlebar/sticky_normal_inactive.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/astronaut1.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/astronaut1.png deleted file mode 100644 index ab03125..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/astronaut1.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/earth1.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/earth1.png deleted file mode 100644 index a812dbd..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/earth1.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/earth2.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/earth2.png deleted file mode 100644 index 904bccc..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/earth2.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/earth3.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/earth3.png deleted file mode 100644 index 896b414..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/earth3.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/space1.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/space1.png deleted file mode 100644 index efaed38..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/space1.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/space2.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/space2.png deleted file mode 100644 index 4f2effa..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/space2.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/space3.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/space3.png deleted file mode 100644 index a969bda..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/space3.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/stars1.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/stars1.png deleted file mode 100644 index 52b87fc..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/stars1.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/stars2.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/stars2.png deleted file mode 100644 index ebd05b2..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/stars2.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/stars3.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/stars3.png deleted file mode 100644 index ed0c6e3..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/stars3.png and /dev/null differ diff --git a/rsrcs/awesome/themes/galaxymenu/wallpapers/stars4.png b/rsrcs/awesome/themes/galaxymenu/wallpapers/stars4.png deleted file mode 100644 index f4bc224..0000000 Binary files a/rsrcs/awesome/themes/galaxymenu/wallpapers/stars4.png and /dev/null differ diff --git a/rsrcs/awesome/volume-widget/README.md b/rsrcs/awesome/volume-widget/README.md deleted file mode 100644 index 4fc7f55..0000000 --- a/rsrcs/awesome/volume-widget/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# Volume widget - -Volume widget based on [amixer](https://linux.die.net/man/1/amixer) (is used for controlling the audio volume) and [pacmd](https://linux.die.net/man/1/pacmd) (is used for selecting a sink/source). Also, the widget provides an easy way to customize how it looks, following types are supported out-of-the-box: - -![types](screenshots/variations.png) - -From left to right: `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` - -A right-click on the widget opens a popup where you can choose a sink/source: -![sink-sources](screenshots/volume-sink-sources.png) - -Left click toggles mute and middle click opens a mixer ([pavucontrol](https://freedesktop.org/software/pulseaudio/pavucontrol/) by default). - -### Features - - - switch between sinks/sources by right click on the widget; - - more responsive than previous versions of volume widget, which were refreshed once a second; - - 5 predefined customizable looks; - -## Installation - -Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**: - -```lua -local volume_widget = require('awesome-wm-widgets.volume-widget.volume') -... -s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - -- default - volume_widget(), - -- customized - volume_widget{ - widget_type = 'arc' - }, -``` - -Note that widget uses following command the get the current volume: `amixer -D pulse sget Master`, so please make sure that it works for you, otherwise you need to set parameter `device = 'default'`. - -### Shortcuts - -To improve responsiveness of the widget when volume level is changed by a shortcut use corresponding methods of the widget: - -```lua -awful.key({ modkey }, "]", function() volume_widget:inc(5) end), -awful.key({ modkey }, "[", function() volume_widget:dec(5) end), -awful.key({ modkey }, "\\", function() volume_widget:toggle() end), -``` - -## Customization - -It is possible to customize the widget by providing a table with all or some of the following config parameters: - -### Generic parameter - -| Name | Default | Description | -|---|---|---| -| `mixer_cmd` | `pavucontrol` | command to run on middle click (e.g. a mixer program) | -| `step` | `5` | How much the volume is raised or lowered at once (in %) | -| `widget_type`| `icon_and_text`| Widget type, one of `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` | -| `device` | `pulse` | Select the device name to control | - -Depends on the chosen widget type add parameters from the corresponding section below: - -#### `icon` parameters - -| Name | Default | Description | -|---|---|---| -| `icon_dir`| `./icons`| Path to the folder with icons | - -_Note:_ if you are changing icons, the folder should contain following .svg images: - - audio-volume-high-symbolic - - audio-volume-medium-symbolic - - audio-volume-low-symbolic - - audio-volume-muted-symbolic - -#### `icon_and_text` parameters - -| Name | Default | Description | -|---|---|---| -| `icon_dir`| `./icons`| Path to the folder with icons | -| `font` | `beautiful.font` | Font name and size, like `Play 12` | - -#### `arc` parameters - -| Name | Default | Description | -|---|---|---| -| `thickness` | 2 | Thickness of the arc | -| `main_color` | `beautiful.fg_color` | Color of the arc | -| `bg_color` | `#ffffff11` | Color of the arc's background | -| `mute_color` | `beautiful.fg_urgent` | Color of the arc when mute | -| `size` | 18 | Size of the widget | - -#### `horizontal_bar` parameters - -| Name | Default | Description | -|---|---|---| -| `main_color` | `beautiful.fg_normal` | Color of the bar | -| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | -| `bg_color` | `'#ffffff11'` | Color of the bar's background | -| `width` | `50` | The bar width | -| `margins` | `10` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) | -| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | -| `with_icon` | `true` | Show volume icon| - -_Note:_ I didn't figure out how does the `forced_height` property of progressbar widget work (maybe it doesn't work at all), thus there is a workaround with margins. - -#### `vertical_bar` parameters - -| Name | Default | Description | -|---|---|---| -| `main_color` | `beautiful.fg_normal` | Color of the bar | -| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | -| `bg_color` | `'#ffffff11'` | Color of the bar's background | -| `width` | `10` | The bar width | -| `margins` | `20` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) | -| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | -| `with_icon` | `true` | Show volume icon| diff --git a/rsrcs/awesome/volume-widget/screenshots/variations.png b/rsrcs/awesome/volume-widget/screenshots/variations.png deleted file mode 100644 index 21d7ead..0000000 Binary files a/rsrcs/awesome/volume-widget/screenshots/variations.png and /dev/null differ diff --git a/rsrcs/awesome/volume-widget/screenshots/volume-sink-sources.png b/rsrcs/awesome/volume-widget/screenshots/volume-sink-sources.png deleted file mode 100644 index 7d010bc..0000000 Binary files a/rsrcs/awesome/volume-widget/screenshots/volume-sink-sources.png and /dev/null differ diff --git a/rsrcs/awesome/volume-widget/utils.lua b/rsrcs/awesome/volume-widget/utils.lua deleted file mode 100644 index 417a666..0000000 --- a/rsrcs/awesome/volume-widget/utils.lua +++ /dev/null @@ -1,105 +0,0 @@ - - -local utils = {} - -local function split(string_to_split, separator) - if separator == nil then separator = "%s" end - local t = {} - - for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do - table.insert(t, str) - end - - return t -end - -function utils.extract_sinks_and_sources(pacmd_output) - local sinks = {} - local sources = {} - local device - local properties - local ports - local in_sink = false - local in_source = false - local in_device = false - local in_properties = false - local in_ports = false - for line in pacmd_output:gmatch("[^\r\n]+") do - if string.match(line, 'source%(s%) available.') then - in_sink = false - in_source = true - end - if string.match(line, 'sink%(s%) available.') then - in_sink = true - in_source = false - end - - if string.match(line, 'index:') then - in_device = true - in_properties = false - device = { - id = line:match(': (%d+)'), - is_default = string.match(line, '*') ~= nil - } - if in_sink then - table.insert(sinks, device) - elseif in_source then - table.insert(sources, device) - end - end - - if string.match(line, '^\tproperties:') then - in_device = false - in_properties = true - properties = {} - device['properties'] = properties - end - - if string.match(line, 'ports:') then - in_device = false - in_properties = false - in_ports = true - ports = {} - device['ports'] = ports - end - - if string.match(line, 'active port:') then - in_device = false - in_properties = false - in_ports = false - device['active_port'] = line:match(': (.+)'):gsub('<',''):gsub('>','') - end - - if in_device then - local t = split(line, ': ') - local key = t[1]:gsub('\t+', ''):lower() - local value = t[2]:gsub('^<', ''):gsub('>$', '') - device[key] = value - end - - if in_properties then - local t = split(line, '=') - local key = t[1]:gsub('\t+', ''):gsub('%.', '_'):gsub('-', '_'):gsub(':', ''):gsub("%s+$", "") - local value - if t[2] == nil then - value = t[2] - else - value = t[2]:gsub('"', ''):gsub("^%s+", ""):gsub(' Analog Stereo', '') - end - properties[key] = value - end - - if in_ports then - local t = split(line, ': ') - local key = t[1] - if key ~= nil then - key = key:gsub('\t+', '') - end - ports[key] = t[2] - end - end - - return sinks, sources -end - -return utils \ No newline at end of file diff --git a/rsrcs/awesome/volume-widget/volume-2.svg b/rsrcs/awesome/volume-widget/volume-2.svg deleted file mode 100644 index 10f1c67..0000000 --- a/rsrcs/awesome/volume-widget/volume-2.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/rsrcs/awesome/volume-widget/volume.lua b/rsrcs/awesome/volume-widget/volume.lua deleted file mode 100644 index 4c44042..0000000 --- a/rsrcs/awesome/volume-widget/volume.lua +++ /dev/null @@ -1,228 +0,0 @@ -------------------------------------------------- --- The Ultimate Volume Widget for Awesome Window Manager --- More details could be found here: --- https://github.com/streetturtle/awesome-wm-widgets/tree/master/volume-widget - --- @author Pavel Makhov --- @copyright 2020 Pavel Makhov -------------------------------------------------- - -local awful = require("awful") -local wibox = require("wibox") -local spawn = require("awful.spawn") -local gears = require("gears") -local beautiful = require("beautiful") -local watch = require("awful.widget.watch") -local utils = require("awesome-wm-widgets.volume-widget.utils") - - -local LIST_DEVICES_CMD = [[sh -c "pacmd list-sinks; pacmd list-sources"]] -local function GET_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sget Master' end -local function INC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%+' end -local function DEC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%-' end -local function TOG_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sset Master toggle' end - - -local widget_types = { - icon_and_text = require("awesome-wm-widgets.volume-widget.widgets.icon-and-text-widget"), - icon = require("awesome-wm-widgets.volume-widget.widgets.icon-widget"), - arc = require("awesome-wm-widgets.volume-widget.widgets.arc-widget"), - horizontal_bar = require("awesome-wm-widgets.volume-widget.widgets.horizontal-bar-widget"), - vertical_bar = require("awesome-wm-widgets.volume-widget.widgets.vertical-bar-widget") -} -local volume = {} - -local rows = { layout = wibox.layout.fixed.vertical } - -local popup = awful.popup{ - bg = beautiful.bg_normal, - ontop = true, - visible = false, - shape = gears.shape.rounded_rect, - border_width = 1, - border_color = beautiful.bg_focus, - maximum_width = 400, - offset = { y = 5 }, - widget = {} -} - -local function build_main_line(device) - if device.active_port ~= nil and device.ports[device.active_port] ~= nil then - return device.properties.device_description .. ' ยท ' .. device.ports[device.active_port] - else - return device.properties.device_description - end -end - -local function build_rows(devices, on_checkbox_click, device_type) - local device_rows = { layout = wibox.layout.fixed.vertical } - for _, device in pairs(devices) do - - local checkbox = wibox.widget { - checked = device.is_default, - color = beautiful.bg_normal, - paddings = 2, - shape = gears.shape.circle, - forced_width = 20, - forced_height = 20, - check_color = beautiful.fg_urgent, - widget = wibox.widget.checkbox - } - - checkbox:connect_signal("button::press", function() - spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function() - on_checkbox_click() - end) - end) - - local row = wibox.widget { - { - { - { - checkbox, - valign = 'center', - layout = wibox.container.place, - }, - { - { - text = build_main_line(device), - align = 'left', - widget = wibox.widget.textbox - }, - left = 10, - layout = wibox.container.margin - }, - spacing = 8, - layout = wibox.layout.align.horizontal - }, - margins = 4, - layout = wibox.container.margin - }, - bg = beautiful.bg_normal, - widget = wibox.container.background - } - - row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end) - row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end) - - local old_cursor, old_wibox - row:connect_signal("mouse::enter", function() - local wb = mouse.current_wibox - old_cursor, old_wibox = wb.cursor, wb - wb.cursor = "hand1" - end) - row:connect_signal("mouse::leave", function() - if old_wibox then - old_wibox.cursor = old_cursor - old_wibox = nil - end - end) - - row:connect_signal("button::press", function() - spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function() - on_checkbox_click() - end) - end) - - table.insert(device_rows, row) - end - - return device_rows -end - -local function build_header_row(text) - return wibox.widget{ - { - markup = "" .. text .. "", - align = 'center', - widget = wibox.widget.textbox - }, - bg = beautiful.bg_normal, - widget = wibox.container.background - } -end - -local function rebuild_popup() - spawn.easy_async(LIST_DEVICES_CMD, function(stdout) - - local sinks, sources = utils.extract_sinks_and_sources(stdout) - - for i = 0, #rows do rows[i]=nil end - - table.insert(rows, build_header_row("SINKS")) - table.insert(rows, build_rows(sinks, function() rebuild_popup() end, "sink")) - table.insert(rows, build_header_row("SOURCES")) - table.insert(rows, build_rows(sources, function() rebuild_popup() end, "source")) - - popup:setup(rows) - end) -end - - -local function worker(user_args) - - local args = user_args or {} - - local mixer_cmd = args.mixer_cmd or 'pavucontrol' - local widget_type = args.widget_type - local refresh_rate = args.refresh_rate or 1 - local step = args.step or 5 - local device = args.device or 'pulse' - - if widget_types[widget_type] == nil then - volume.widget = widget_types['icon_and_text'].get_widget(args.icon_and_text_args) - else - volume.widget = widget_types[widget_type].get_widget(args) - end - - local function update_graphic(widget, stdout) - local mute = string.match(stdout, "%[(o%D%D?)%]") -- \[(o\D\D?)\] - [on] or [off] - if mute == 'off' then widget:mute() - elseif mute == 'on' then widget:unmute() - end - local volume_level = string.match(stdout, "(%d?%d?%d)%%") -- (\d?\d?\d)\%) - volume_level = string.format("% 3d", volume_level) - widget:set_volume_level(volume_level) - end - - function volume:inc(s) - spawn.easy_async(INC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end) - end - - function volume:dec(s) - spawn.easy_async(DEC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end) - end - - function volume:toggle() - spawn.easy_async(TOG_VOLUME_CMD(device), function(stdout) update_graphic(volume.widget, stdout) end) - end - - function volume:mixer() - if mixer_cmd then - spawn.easy_async(mixer_cmd) - end - end - - volume.widget:buttons( - awful.util.table.join( - awful.button({}, 3, function() - if popup.visible then - popup.visible = not popup.visible - else - rebuild_popup() - popup:move_next_to(mouse.current_widget_geometry) - end - end), - awful.button({}, 4, function() volume:inc() end), - awful.button({}, 5, function() volume:dec() end), - awful.button({}, 2, function() volume:mixer() end), - awful.button({}, 1, function() volume:toggle() end) - ) - ) - - watch(GET_VOLUME_CMD(device), refresh_rate, update_graphic, volume.widget) - - return volume.widget -end - -return setmetatable(volume, { __call = function(_, ...) return worker(...) end }) diff --git a/rsrcs/awesome/volume-widget/widgets/arc-widget.lua b/rsrcs/awesome/volume-widget/widgets/arc-widget.lua deleted file mode 100644 index b512f12..0000000 --- a/rsrcs/awesome/volume-widget/widgets/arc-widget.lua +++ /dev/null @@ -1,46 +0,0 @@ -local wibox = require("wibox") -local beautiful = require('beautiful') - -local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' - -local widget = {} - -function widget.get_widget(widgets_args) - local args = widgets_args or {} - - local thickness = args.thickness or 2 - local main_color = args.main_color or beautiful.fg_color - local bg_color = args.bg_color or '#ffffff11' - local mute_color = args.mute_color or beautiful.fg_urgent - local size = args.size or 18 - - return wibox.widget { - { - id = "icon", - image = ICON_DIR .. 'audio-volume-high-symbolic.svg', - resize = true, - widget = wibox.widget.imagebox, - }, - max_value = 100, - thickness = thickness, - start_angle = 4.71238898, -- 2pi*3/4 - forced_height = size, - forced_width = size, - bg = bg_color, - paddings = 2, - widget = wibox.container.arcchart, - set_volume_level = function(self, new_value) - self.value = new_value - end, - mute = function(self) - self.colors = { mute_color } - end, - unmute = function(self) - self.colors = { main_color } - end - } - -end - - -return widget \ No newline at end of file diff --git a/rsrcs/awesome/volume-widget/widgets/horizontal-bar-widget.lua b/rsrcs/awesome/volume-widget/widgets/horizontal-bar-widget.lua deleted file mode 100644 index be1f38d..0000000 --- a/rsrcs/awesome/volume-widget/widgets/horizontal-bar-widget.lua +++ /dev/null @@ -1,58 +0,0 @@ -local wibox = require("wibox") -local beautiful = require('beautiful') -local gears = require("gears") - -local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' - -local widget = {} - -function widget.get_widget(widgets_args) - local args = widgets_args or {} - - local main_color = args.main_color or beautiful.fg_normal - local mute_color = args.mute_color or beautiful.fg_urgent - local bg_color = args.bg_color or '#ffffff11' - local width = args.width or 50 - local margins = args.margins or 10 - local shape = args.shape or 'bar' - local with_icon = args.with_icon == true and true or false - - local bar = wibox.widget { - { - { - id = "icon", - image = ICON_DIR .. 'audio-volume-high-symbolic.svg', - resize = false, - widget = wibox.widget.imagebox, - }, - valign = 'center', - visible = with_icon, - layout = wibox.container.place, - }, - { - id = 'bar', - max_value = 100, - forced_width = width, - color = main_color, - margins = { top = margins, bottom = margins }, - background_color = bg_color, - shape = gears.shape[shape], - widget = wibox.widget.progressbar, - }, - spacing = 4, - layout = wibox.layout.fixed.horizontal, - set_volume_level = function(self, new_value) - self:get_children_by_id('bar')[1]:set_value(tonumber(new_value)) - end, - mute = function(self) - self:get_children_by_id('bar')[1]:set_color(mute_color) - end, - unmute = function(self) - self:get_children_by_id('bar')[1]:set_color(main_color) - end - } - - return bar -end - -return widget diff --git a/rsrcs/awesome/volume-widget/widgets/icon-and-text-widget.lua b/rsrcs/awesome/volume-widget/widgets/icon-and-text-widget.lua deleted file mode 100644 index b1a2793..0000000 --- a/rsrcs/awesome/volume-widget/widgets/icon-and-text-widget.lua +++ /dev/null @@ -1,59 +0,0 @@ -local wibox = require("wibox") -local beautiful = require('beautiful') - -local widget = {} - -local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' - -function widget.get_widget(widgets_args) - local args = widgets_args or {} - - local font = args.font or beautiful.font - local icon_dir = args.icon_dir or ICON_DIR - - return wibox.widget { - { - { - id = "icon", - resize = false, - widget = wibox.widget.imagebox, - }, - valign = 'center', - layout = wibox.container.place - }, - { - id = 'txt', - font = font, - widget = wibox.widget.textbox - }, - layout = wibox.layout.fixed.horizontal, - set_volume_level = function(self, new_value) - self:get_children_by_id('txt')[1]:set_text(new_value) - local volume_icon_name - if self.is_muted then - volume_icon_name = 'audio-volume-muted-symbolic' - else - local new_value_num = tonumber(new_value) - if (new_value_num >= 0 and new_value_num < 33) then - volume_icon_name="audio-volume-low-symbolic" - elseif (new_value_num < 66) then - volume_icon_name="audio-volume-medium-symbolic" - else - volume_icon_name="audio-volume-high-symbolic" - end - end - self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg') - end, - mute = function(self) - self.is_muted = true - self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg') - end, - unmute = function(self) - self.is_muted = false - end - } - -end - - -return widget \ No newline at end of file diff --git a/rsrcs/awesome/volume-widget/widgets/icon-widget.lua b/rsrcs/awesome/volume-widget/widgets/icon-widget.lua deleted file mode 100644 index cc39a3d..0000000 --- a/rsrcs/awesome/volume-widget/widgets/icon-widget.lua +++ /dev/null @@ -1,46 +0,0 @@ -local wibox = require("wibox") - -local widget = {} - -local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' - -function widget.get_widget(widgets_args) - local args = widgets_args or {} - - local icon_dir = args.icon_dir or ICON_DIR - - return wibox.widget { - { - id = "icon", - resize = false, - widget = wibox.widget.imagebox, - }, - valign = 'center', - layout = wibox.container.place, - set_volume_level = function(self, new_value) - local volume_icon_name - if self.is_muted then - volume_icon_name = 'audio-volume-muted-symbolic' - else - local new_value_num = tonumber(new_value) - if (new_value_num >= 0 and new_value_num < 33) then - volume_icon_name="audio-volume-low-symbolic" - elseif (new_value_num < 66) then - volume_icon_name="audio-volume-medium-symbolic" - else - volume_icon_name="audio-volume-high-symbolic" - end - end - self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg') - end, - mute = function(self) - self.is_muted = true - self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg') - end, - unmute = function(self) - self.is_muted = false - end - } -end - -return widget \ No newline at end of file diff --git a/rsrcs/awesome/volume-widget/widgets/vertical-bar-widget.lua b/rsrcs/awesome/volume-widget/widgets/vertical-bar-widget.lua deleted file mode 100644 index 6f32b50..0000000 --- a/rsrcs/awesome/volume-widget/widgets/vertical-bar-widget.lua +++ /dev/null @@ -1,64 +0,0 @@ -local wibox = require("wibox") -local beautiful = require('beautiful') -local gears = require("gears") - -local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/' - -local widget = {} - -function widget.get_widget(widgets_args) - local args = widgets_args or {} - - local main_color = args.main_color or beautiful.fg_normal - local mute_color = args.mute_color or beautiful.fg_urgent - local bg_color = args.bg_color or '#ffffff11' - local width = args.width or 10 - local margins = args.height or 2 - local shape = args.shape or 'bar' - local with_icon = args.with_icon == true and true or false - - local bar = wibox.widget { - { - { - id = "icon", - image = ICON_DIR .. 'audio-volume-high-symbolic.svg', - resize = false, - widget = wibox.widget.imagebox, - }, - valign = 'center', - visible = with_icon, - layout = wibox.container.place, - }, - { - { - id = 'bar', - max_value = 100, - forced_width = width, - forced_height = 5, - margins = { top = margins, bottom = margins }, - color = main_color, - background_color = bg_color, - shape = gears.shape[shape], - widget = wibox.widget.progressbar, - }, - forced_width = width, - direction = 'east', - layout = wibox.container.rotate, - }, - spacing = 4, - layout = wibox.layout.fixed.horizontal, - set_volume_level = function(self, new_value) - self:get_children_by_id('bar')[1]:set_value(tonumber(new_value)) - end, - mute = function(self) - self:get_children_by_id('bar')[1]:set_color(mute_color) - end, - unmute = function(self) - self:get_children_by_id('bar')[1]:set_color(main_color) - end - } - - return bar -end - -return widget diff --git a/rsrcs/awesome/window_rules.lua b/rsrcs/awesome/window_rules.lua deleted file mode 100644 index 0bdd623..0000000 --- a/rsrcs/awesome/window_rules.lua +++ /dev/null @@ -1,65 +0,0 @@ -local awful = require("awful") -local beautiful = require("beautiful") -local keys = require("key_conf") - -local clientkeys = keys.clientkeys -local clientbuttons = keys.clientbuttons - --- {{{ Rules --- Rules to apply to new clients (through the "manage" signal). -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - raise = true, - keys = clientkeys, - buttons = clientbuttons, - screen = awful.screen.preferred, - placement = awful.placement.no_overlap+awful.placement.no_offscreen - } - }, - - -- Floating clients. - { rule_any = { - instance = { - "DTA", -- Firefox addon DownThemAll. - "copyq", -- Includes session name in class. - "pinentry", - }, - class = { - "constellation", - "Arandr", - "Blueman-manager", - "Gpick", - "Kruler", - "MessageWin", -- kalarm. - "Sxiv", - "Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size. - "Wpa_gui", - "veromix", - "xtightvncviewer"}, - - -- Note that the name property shown in xprop might be set slightly after creation of the client - -- and the name shown there might not match defined rules here. - name = { - "Event Tester", -- xev. - }, - role = { - "AlarmWindow", -- Thunderbird's calendar. - "ConfigManager", -- Thunderbird's about:config. - "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. - } - }, properties = { floating = true }}, - - -- Add titlebars to normal clients and dialogs - { rule_any = {type = { "normal", "dialog" } - }, properties = { titlebars_enabled = true } - }, - - -- Set Firefox to always map on the tag named "2" on screen 1. - -- { rule = { class = "Firefox" }, - -- properties = { screen = 1, tag = "2" } }, -} --- }}}