diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 6badf38..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "home/.config/awesome/libs/revelation"] - path = home/.config/awesome/libs/revelation - url = https://github.com/thiru/awesome-revelation diff --git a/home/.config/Kvantum/kvantum.kvconfig b/home/.config/Kvantum/kvantum.kvconfig index 14c5b92..9de65ca 100644 --- a/home/.config/Kvantum/kvantum.kvconfig +++ b/home/.config/Kvantum/kvantum.kvconfig @@ -1,2 +1,2 @@ [General] -theme=KvGnomeDark +theme=Matcha-sea-dark diff --git a/home/.config/awesome/configurations/autorun b/home/.config/awesome/configurations/autostart similarity index 72% rename from home/.config/awesome/configurations/autorun rename to home/.config/awesome/configurations/autostart index dbe2ec1..f2b1028 100644 --- a/home/.config/awesome/configurations/autorun +++ b/home/.config/awesome/configurations/autostart @@ -21,11 +21,12 @@ xset r rate 300 50 & clipmenud & # Wallpaper : -# nitrogen --restore & -$HOME/.fehbg +nitrogen --restore & # conky -#conky -c ~/.config/conky/otis-forest.conkyrc\ & +#killall conky & +#conky -c ~/.config/conky/Gotham/Gotham.conf & +#conky -c ~/.config/conky/Gotham/Gotham2.conf & # Sevices info : #echo "false" > /tmp/blue_light_state @@ -36,13 +37,6 @@ $HOME/.fehbg # pidof -s "$program" || setsid -f "$program" #done >/dev/null 2>&1 -setxkbmap -option compose:ralt -setxkbmap -option caps:escape - # Updates : #notify-send -t 8000 "You have $(checkupdates | wc -l) update 📦" & -killall -9 kdeconnect-indicator -picom -b --dbus -gwe --hide-window & -kdeconnect-indicator & -nvidia-settings + diff --git a/home/.config/awesome/configurations/keybindings.lua b/home/.config/awesome/configurations/keybindings.lua index a80a39d..431b257 100644 --- a/home/.config/awesome/configurations/keybindings.lua +++ b/home/.config/awesome/configurations/keybindings.lua @@ -5,44 +5,41 @@ -- ~~~~~~~~~~~~~~ local awful = require("awful") local hotkeys_popup = require("awful.hotkeys_popup") -local revelation = require("libs.revelation") -local switcher = require("libs.awesome_switcher") -local gfs = require "gears".filesystem.get_configuration_dir() -- vars -- ~~~~~~~~~ -- modkey -local modkey = "Mod4" +local modkey = "Mod4" -- modifer keys -local shift = "Shift" -local ctrl = "Control" -local alt = "Mod1" +local shift = "Shift" +local ctrl = "Control" +local alt = "Mod1" -- Default Applications : --terminal = "alacritty" -terminal = "kitty" -web_browser = "librewolf" -editor = os.getenv("EDITOR") or "nano" -editor_cmd = terminal .. " -e " .. editor +terminal = "kitty" +web_browser = "brave" +editor = os.getenv("EDITOR") or "nano" +editor_cmd = terminal .. " -e " .. editor -- Configurations -- ~~~~~~~~~~~~~~ -- # Mouse bindings : awful.mouse.append_global_mousebindings({ - awful.button({}, 3, function() mymainmenu:toggle() end) + awful.button({ }, 3, function () mymainmenu:toggle() end) }) client.connect_signal("request::default_mousebindings", function() - awful.mouse.append_client_mousebindings({ awful.button({}, 1, function(c) + 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" } + 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) @@ -55,88 +52,81 @@ end) -- # Key bindings : -- General Awesome keys awful.keyboard.append_global_keybindings({ - awful.key({ modkey, }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }), - --awful.key({ modkey, }, "w", function() mymainmenu:show() end, { description = "show main menu", group = "awesome" }), - awful.key({ modkey, shift }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }), - awful.key({ modkey, shift }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }), - awful.key({ modkey, }, "Return", function() awful.spawn(terminal) end, { description = "open a terminal", group = "launcher" }), - awful.key({ modkey, }, "b", function() awful.spawn(web_browser) end, { description = "Open Web Browser", group = "launcher" }), - awful.key({ modkey, shift }, "Return", function() awful.spawn("xterm") end, { description = "open a terminal", group = "launcher" }), + awful.key({ modkey, }, "s", hotkeys_popup.show_help, {description="show help", group="awesome"}), + + awful.key({ modkey, }, "w", function () mymainmenu:show() end, {description = "show main menu", group = "awesome"}), + + awful.key({ modkey, ctrl }, "r", awesome.restart, {description = "reload awesome", group = "awesome"}), + + awful.key({ modkey, shift }, "q", awesome.quit, {description = "quit awesome", group = "awesome"}), + + awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, {description = "open a terminal", group = "launcher"}), + + awful.key({ modkey, }, "b", function () awful.spawn(web_browser) end, {description = "Open Web Browser", group = "launcher"}), + + awful.key({ modkey, shift }, "Return", function () awful.spawn("xterm") end, {description = "open a terminal", group = "launcher"}), -- awful.key({ modkey }, "p", function() menubar.show() end, - -- {description = "show the menubar", group = "launcher"}), + -- {description = "show the menubar", group = "launcher"}), }) -- Tags related keybindings 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.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"}), }) -- Focus related keybindings 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({ alt, }, "Tab", function() - awesome.emit_signal("bling::window_switcher::turn_on") - end, { description = "Switch tab", group = "client" }), - --awful.key({ alt, }, "Tab", function() - -- awful.client.focus.history.previous() - -- if client.focus then - -- client.focus:raise() - -- end - --end, { description = "go back", group = "client" }), - --awful.key( - -- { alt }, - -- 'Tab', - -- function() - -- switcher.switch(1, "Mod1", "Alt_L", "Shift", "Tab") - -- end - --), - awful.key( - { alt, shift }, - 'Tab', - function() - switcher.switch(1, "Mod1", "Alt_L", "Shift", "Tab") - end - ), - awful.key({ modkey, ctrl }, "j", function() awful.screen.focus_relative(1) end, { description = "focus the next screen", group = "screen" }), - awful.key({ modkey, ctrl }, "k", function() awful.screen.focus_relative( -1) end, { description = "focus the previous screen", group = "screen" }), - awful.key({ modkey, ctrl }, "n", - function() - local c = awful.client.restore() - -- Focus restored client - if c then - c:activate { raise = true, context = "key.unminimize" } + 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 = "restore minimized", group = "client" }), - awful.key( - { modkey, "Control" }, - "Tab", - awful.client.movetoscreen, - { description = "Move focused client to other screen", group = "client" } - ), + end, {description = "go back", group = "client"}), + + awful.key({ modkey, ctrl }, "j", function () awful.screen.focus_relative( 1) end, {description = "focus the next screen", group = "screen"}), + + awful.key({ modkey, ctrl }, "k", function () awful.screen.focus_relative(-1) end, {description = "focus the previous screen", group = "screen"}), + + awful.key({ modkey, ctrl }, "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 related keybindings 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, ctrl }, "h", function() awful.tag.incncol(1, nil, true) end, { description = "increase the number of columns", group = "layout" }), - awful.key({ modkey, ctrl }, "l", function() awful.tag.incncol( -1, nil, true) end, { description = "decrease the number of columns", group = "layout" }), - awful.key({ modkey, }, "Tab", function() awful.layout.inc(1) end, { description = "select next", group = "layout" }), - awful.key( - { modkey, 'Shift' }, - 'w', - revelation, - { description = "Overview", group = "layout" } - ), - awful.key({ modkey, shift }, "Tab", function() awful.layout.inc( -1) end, { description = "select previous", group = "layout" }), + 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, ctrl }, "h", function () awful.tag.incncol( 1, nil, true) end, {description = "increase the number of columns", group = "layout"}), + + awful.key({ modkey, ctrl }, "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"}), }) -- Tags related keybindings @@ -146,7 +136,7 @@ awful.keyboard.append_global_keybindings({ keygroup = "numrow", description = "only view tag", group = "tag", - on_press = function(index) + on_press = function (index) local screen = awful.screen.focused() local tag = screen.tags[index] if tag then @@ -159,7 +149,7 @@ awful.keyboard.append_global_keybindings({ keygroup = "numrow", description = "toggle tag", group = "tag", - on_press = function(index) + on_press = function (index) local screen = awful.screen.focused() local tag = screen.tags[index] if tag then @@ -168,11 +158,11 @@ awful.keyboard.append_global_keybindings({ end, }, awful.key { - modifiers = { modkey, shift }, + modifiers = { modkey, shift }, keygroup = "numrow", description = "move focused client to tag", group = "tag", - on_press = function(index) + on_press = function (index) if client.focus then local tag = client.focus.screen.tags[index] if tag then @@ -186,7 +176,7 @@ awful.keyboard.append_global_keybindings({ keygroup = "numrow", description = "toggle focused client on tag", group = "tag", - on_press = function(index) + on_press = function (index) if client.focus then local tag = client.focus.screen.tags[index] if tag then @@ -200,7 +190,7 @@ awful.keyboard.append_global_keybindings({ keygroup = "numpad", description = "select layout directly", group = "layout", - on_press = function(index) + on_press = function (index) local t = awful.screen.focused().selected_tag if t then t.layout = t.layouts[index] or t.layout @@ -211,46 +201,47 @@ awful.keyboard.append_global_keybindings({ -- Media Control : awful.keyboard.append_global_keybindings({ - -- Volume Keys : - awful.key({}, "XF86AudioLowerVolume", function() awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ -2%", false) end), - awful.key({}, "XF86AudioRaiseVolume", function() awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ +2%", false) end), - awful.key({}, "XF86AudioMute", function() awful.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle", false) end), - - -- Media Keys : - awful.key({}, "XF86AudioPlay", function() awful.spawn("playerctl play-pause", false) end), - awful.key({}, "XF86AudioNext", function() awful.spawn("playerctl next", false) end), - awful.key({}, "XF86AudioPrev", function() awful.spawn("playerctl previous", false) end), - - -- Brightness Keys : - awful.key({}, "XF86MonBrightnessUp", function() awful.spawn("brightnessctl set 5%+", false) end), - awful.key({}, "XF86MonBrightnessDown", function() awful.spawn("brightnessctl set 5%-", false) end), + -- Volume Keys : + awful.key({}, "XF86AudioLowerVolume", function () awful.spawn("amixer -q -D pulse sset Master 5%-", false) end), + + awful.key({}, "XF86AudioRaiseVolume", function () awful.spawn("amixer -q -D pulse sset Master 5%+", false) end), + + awful.key({}, "XF86AudioMute", function () awful.spawn("amixer -D pulse set Master 1+ toggle", false) end), + + -- Media Keys : + awful.key({}, "XF86AudioPlay", function() awful.spawn("playerctl play-pause", false) end), + + awful.key({}, "XF86AudioNext", function() awful.spawn("playerctl next", false) end), + + awful.key({}, "XF86AudioPrev", function() awful.spawn("playerctl previous", false) end), + + -- Brightness Keys : + awful.key({}, "XF86MonBrightnessUp", function() awful.spawn("brightnessctl set 5%+", false) end), + + awful.key({}, "XF86MonBrightnessDown", function() awful.spawn("brightnessctl set 5%-", false) end), }) -- Standard program : awful.keyboard.append_global_keybindings({ - -- File Manager : - awful.key({ modkey }, "e", function() awful.spawn(string.format("xdg-open .")) end, { description = "file manager", group = "file manager" }), - + -- File Manager : + awful.key({ ctrl, shift }, "f", function () awful.spawn(string.format("pcmanfm")) end, {description = "pcmanfm", group = "file manager"}), + -- Screenshots Keys : - awful.key({}, "Print", function() awful.spawn("screenshot") end, { description = "Maim", group = "screenshot" }), - awful.key({ modkey }, "Print", function() awful.spawn("screenshot-select") end, { description = "Maim", group = "screenshot" }), - - -- Rofi : - --awful.key({ modkey }, "d", function() awful.spawn("rofi -show drun -theme ~/.config/rofi/rofi.rasi") end, { description = "rofi launcher", group = "launcher" }), - --awful.key({ modkey }, "w", function() awful.spawn("rofi -show window -theme ~/.config/rofi/window.rasi") end, { description = "rofi launcher", group = "launcher" }), - awful.key({ modkey }, "d", function() awful.spawn("rofi -show drun -theme " .. gfs .. "/libs/misc/rofi/config.rasi") end, { description = "rofi launcher", group = "launcher" }), - awful.key({ modkey }, "w", function() awful.spawn("rofi -show window -theme " .. gfs .. "/libs/misc/rofi/config.rasi") end, { description = "rofi launcher", group = "launcher" }), - + awful.key({ }, "Print", function () awful.spawn("screenshot")end, {description = "Maim", group = "screenshot"}), + awful.key({ modkey }, "Print", function () awful.spawn("screenshot-select")end, {description = "Maim", group = "screenshot"}), + + -- Rofi : + awful.key({ modkey }, "p", function () awful.spawn("rofi -show drun -show-icons &>> /tmp/rofi.log") end, {description = "rofi launcher", group = "launcher"}), + -- Main Menu : -- awful.key({ modkey }, "r", function () awful.spawn("rofi -show drun -show-icons -theme ~/.config/awesome/libs/misc/rofi/config.rasi &>> /tmp/rofi.log") end, {description = "rofi launcher", group = "launcher"}), - + -- ClipMenu : - awful.key({ modkey }, "Insert", function() awful.spawn("clipmenu") end, { description = "clipboard history by rofi/clipmenud", group = "awesome" }), - - -- Center Window : - awful.key({ modkey }, "y", awful.placement.centered), - awful.key({ modkey }, "l", function() awful.spawn("betterlockscreen -l") end, { description = "lockscreen", group = "lockscreen" }), - + awful.key({ modkey}, "Insert", function () awful.spawn("clipmenu") end,{description = "clipboard history by rofi/clipmenud", group = "awesome"}), + + -- Center Window : + awful.key({ modkey }, "y", awful.placement.centered) + }) -- Systray : @@ -260,50 +251,42 @@ awful.keyboard.append_global_keybindings({ -- Bar : awful.keyboard.append_global_keybindings({ - awful.key({ modkey }, "=", function() - for s in screen do - s.mywibar.visible = not s.mywibar.visible - end - end, - { description = "toggle wibox", group = "awesome" }), + awful.key({ modkey }, "=", function () + for s in screen do + s.mywibar.visible = not s.mywibar.visible + end + end, + {description = "toggle wibox", group = "awesome"}), }) awful.keyboard.append_global_keybindings({ - awful.key({ modkey }, "Escape", function() awesome.emit_signal("sidebar::toggle") end), -- Sidebar - awful.key({ modkey }, "t", function() awesome.emit_signal("notifications_list::toggle") end), -- Sidebar - awful.key({ alt }, "t", function() awful.titlebar.toggle(client.focus) end), + awful.key({ alt }, "Tab", function() awesome.emit_signal("sidebar::toggle") end), -- Sidebar + awful.key({ alt }, "t", function() awful.titlebar.toggle(client.focus) end), }) -- Client : 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, shift }, "f", function(c) - c.maximized = not c.maximized - c:raise() - end, { description = "toggle maximized", group = "client" }), - awful.key({ modkey }, "c", function(c) c:kill() end, { description = "close", group = "client" }), - awful.key({ modkey }, "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" }), - -- The client currently has the input focus, so it cannot be - -- minimized, since minimized clients can't have the focus. - awful.key({ modkey, }, "n", function(c) 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" }), + 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 = "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"}), + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + awful.key({ modkey, }, "n", function (c) 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) + diff --git a/home/.config/awesome/configurations/layouts.lua b/home/.config/awesome/configurations/layouts.lua index 4a27723..f0dcca8 100644 --- a/home/.config/awesome/configurations/layouts.lua +++ b/home/.config/awesome/configurations/layouts.lua @@ -31,9 +31,9 @@ tag.connect_signal("request::default_layouts", function() --awful.layout.suit.fair.horizontal, --awful.layout.suit.spiral, awful.layout.suit.spiral.dwindle, - awful.layout.suit.max, + --awful.layout.suit.max, awful.layout.suit.max.fullscreen, - awful.layout.suit.magnifier, + --awful.layout.suit.magnifier, --awful.layout.suit.corner.nw, centered, equal, diff --git a/home/.config/awesome/configurations/rules.lua b/home/.config/awesome/configurations/rules.lua index 9171680..c07eeed 100644 --- a/home/.config/awesome/configurations/rules.lua +++ b/home/.config/awesome/configurations/rules.lua @@ -19,62 +19,61 @@ ruled.client.connect_signal("request::rules", function() -- All clients will match this rule. ruled.client.append_rule { id = "global", - rule = {}, + rule = { }, properties = { focus = awful.client.focus.filter, raise = true, screen = awful.screen.preferred, - placement = awful.placement.no_overlap + awful.placement.no_offscreen + awful.placement.centered + placement = awful.placement.no_overlap+awful.placement.no_offscreen+awful.placement.centered } } - + -- Floating clients. ruled.client.append_rule { - id = "floating", - rule_any = { + id = "floating", + rule_any = { instance = { "copyq", "pinentry" }, - class = { - "Arandr", - "Steam", - "XTerm", - "Virt-manager", - "VirtualBox Manager", - "Nm-connection-editor", - "Xfce4-power-manager-settings", - "Pavucontrol", - "Qalculate-gtk", - "Engrampa", - "Lxappearance", - "Gnome-disks", - "Nitrogen", - "Viewnior", - "Audacious", - "qt5ct", - "qt6ct", - "Kvantum Manager", - "Blueman-manager", - "Gpick", - "Kruler", - "MessageWin", -- kalarm. - "Sxiv", - "Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size. - "Wpa_gui", - "veromix", - "alsamixer", - "xtightvncviewer", - "Gufw Firewall", - "VPN4Test", - "xdg-desktop-portal-gnome" - }, + class = { + "Arandr", + "Steam", + "XTerm", + "Virt-manager", + "VirtualBox Manager", + "Nm-connection-editor", + "Xfce4-power-manager-settings", + "Pavucontrol", + "Qalculate-gtk", + "Engrampa", + "Lxappearance", + "Gnome-disks", + "Nitrogen", + "Viewnior", + "Audacious", + "qt5ct", + "qt6ct", + "Kvantum Manager", + "Blueman-manager", + "Gpick", + "Kruler", + "MessageWin", -- kalarm. + "Sxiv", + "Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size. + "Wpa_gui", + "veromix", + "alsamixer", + "xtightvncviewer", + "Gufw Firewall", + "VPN4Test" + }, -- 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. + name = { + "Event Tester", -- xev. }, - role = { - "AlarmWindow", -- Thunderbird's calendar. - "ConfigManager", -- Thunderbird's about:config. - "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + role = { + "AlarmWindow", -- Thunderbird's calendar. + "ConfigManager", -- Thunderbird's about:config. + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. } }, properties = { floating = true } @@ -84,19 +83,19 @@ ruled.client.connect_signal("request::rules", function() ruled.client.append_rule { id = "center_placement", rule_any = { - type = { "dialog" }, - class = { "Steam", "discord", "markdown_input", "nemo", "thunar", "pcmanfm" }, - instance = { "markdown_input", }, - role = { "GtkFileChooserDialog" } + type = {"dialog"}, + class = {"Steam", "discord", "markdown_input", "nemo", "thunar", "pcmanfm" }, + instance = {"markdown_input",}, + role = {"GtkFileChooserDialog"} }, - properties = { placement = awful.placement.center } + properties = {placement = awful.placement.center} } - + -- Add titlebars to normal clients and dialogs ruled.client.append_rule { id = "titlebars", rule_any = { type = { "normal", "dialog" } }, - properties = { titlebars_enabled = false } + properties = { titlebars_enabled = false } } -- Set Firefox to always map on the tag named "2" on screen 1. @@ -104,29 +103,16 @@ ruled.client.connect_signal("request::rules", function() -- rule = { class = "Firefox" }, -- properties = { screen = 1, tag = "2" } -- } - - ruled.client.append_rule { - id = 'sandbox', - rule_any = { - class = { - 'nvidia-settings', - 'Nvidia-settings' - } - }, - properties = { - tag = '8' - } - } end) ruled.notification.connect_signal('request::rules', function() -- All notifications will match this rule. ruled.notification.append_rule { - rule = {}, + rule = { }, properties = { screen = awful.screen.preferred, implicit_timeout = 5, - position = "bottom_right", + position = "top_right", } } end) @@ -144,12 +130,12 @@ end) -- Window opacity client.connect_signal("focus", function(c) - c.border_color = beautiful.border_focus - c.opacity = 1 + c.border_color = beautiful.border_focus + c.opacity = 1 end) client.connect_signal("unfocus", function(c) - c.border_color = beautiful.border_normal - c.opacity = 1 + c.border_color = beautiful.border_normal + c.opacity = 0.9 end) client.connect_signal("property::fullscreen", function(c) @@ -161,7 +147,7 @@ client.connect_signal("property::fullscreen", function(c) end) end end) - + -- # Round Corners : --local function enable_rounding() -- client.connect_signal("manage", function (c) diff --git a/home/.config/awesome/libs/awesome_switcher.lua b/home/.config/awesome/libs/awesome_switcher.lua deleted file mode 100644 index 6292598..0000000 --- a/home/.config/awesome/libs/awesome_switcher.lua +++ /dev/null @@ -1,532 +0,0 @@ -local cairo = require("lgi").cairo -local mouse = mouse -local screen = screen -local wibox = require('wibox') -local table = table -local keygrabber = keygrabber -local math = require('math') -local awful = require('awful') -local gears = require("gears") -local timer = gears.timer -local client = client -awful.client = require('awful.client') - -local naughty = require("naughty") -local string = string -local tostring = tostring -local tonumber = tonumber -local debug = debug -local pairs = pairs -local unpack = unpack or table.unpack - -local surface = cairo.ImageSurface(cairo.Format.RGB24,20,20) -local cr = cairo.Context(surface) - -local _M = {} - --- settings - -_M.settings = { - preview_box = true, - preview_box_bg = "#18192611", - preview_box_border = "#18192611", - preview_box_fps = 30, - preview_box_delay = 100, - preview_box_title_font = {"Ubuntu","italic","normal"}, - preview_box_title_font_size_factor = 0.8, - preview_box_title_color = {202,211,245,1}, - - client_opacity = true, - client_opacity_value_selected = 1, - client_opacity_value_in_focus = 0.5, - client_opacity_value = 0.5, - - cycle_raise_client = true, -} - --- Create a wibox to contain all the client-widgets -_M.preview_wbox = wibox({ width = screen[mouse.screen].geometry.width }) -_M.preview_wbox.border_width = 3 -_M.preview_wbox.ontop = true -_M.preview_wbox.visible = false - -_M.preview_live_timer = timer({ timeout = 1/_M.settings.preview_box_fps }) -_M.preview_widgets = {} - -_M.altTabTable = {} -_M.altTabIndex = 1 - -_M.source = string.sub(debug.getinfo(1,'S').source, 2) -_M.path = string.sub(_M.source, 1, string.find(_M.source, "/[^/]*$")) -_M.noicon = _M.path .. "noicon.png" - --- simple function for counting the size of a table -function _M.tableLength(T) - local count = 0 - for _ in pairs(T) do count = count + 1 end - return count -end - --- this function returns the list of clients to be shown. -function _M.getClients() - local clients = {} - - -- Get focus history for current tag - local s = mouse.screen; - local idx = 0 - local c = awful.client.focus.history.get(s, idx) - - while c do - table.insert(clients, c) - - idx = idx + 1 - c = awful.client.focus.history.get(s, idx) - end - - -- Minimized clients will not appear in the focus history - -- Find them by cycling through all clients, and adding them to the list - -- if not already there. - -- This will preserve the history AND enable you to focus on minimized clients - - local t = s.selected_tag - local all = client.get(s) - - for i = 1, #all do - local c = all[i] - local ctags = c:tags(); - - -- check if the client is on the current tag - local isCurrentTag = false - for j = 1, #ctags do - if t == ctags[j] then - isCurrentTag = true - break - end - end - - if isCurrentTag then - -- check if client is already in the history - -- if not, add it - local addToTable = true - for k = 1, #clients do - if clients[k] == c then - addToTable = false - break - end - end - - - if addToTable then - table.insert(clients, c) - end - end - end - - return clients -end - --- here we populate altTabTable using the list of clients taken from --- _M.getClients(). In case we have altTabTable with some value, the list of the --- old known clients is restored. -function _M.populateAltTabTable() - local clients = _M.getClients() - - if _M.tableLength(_M.altTabTable) then - for ci = 1, #clients do - for ti = 1, #_M.altTabTable do - if _M.altTabTable[ti].client == clients[ci] then - _M.altTabTable[ti].client.opacity = _M.altTabTable[ti].opacity - _M.altTabTable[ti].client.minimized = _M.altTabTable[ti].minimized - break - end - end - end - end - - _M.altTabTable = {} - - for i = 1, #clients do - table.insert(_M.altTabTable, { - client = clients[i], - minimized = clients[i].minimized, - opacity = clients[i].opacity - }) - end -end - --- If the length of list of clients is not equal to the length of altTabTable, --- we need to repopulate the array and update the UI. This function does this --- check. -function _M.clientsHaveChanged() - local clients = _M.getClients() - return _M.tableLength(clients) ~= _M.tableLength(_M.altTabTable) -end - -function _M.createPreviewText(client) - if client.class then - return " " .. client.class - else - return " " .. client.name - end -end - --- Preview is created here. -function _M.clientOpacity() - if not _M.settings.client_opacity then return end - - local opacity = _M.settings.client_opacity_value - if opacity > 1 then opacity = 1 end - for i,data in pairs(_M.altTabTable) do - data.client.opacity = opacity - end - - if client.focus == _M.altTabTable[_M.altTabIndex].client then - -- Let's normalize the value up to 1. - local opacityFocusSelected = _M.settings.client_opacity_value_selected + _M.settings.client_opacity_value_in_focus - if opacityFocusSelected > 1 then opacityFocusSelected = 1 end - client.focus.opacity = opacityFocusSelected - else - -- Let's normalize the value up to 1. - local opacityFocus = _M.settings.client_opacity_value_in_focus - if opacityFocus > 1 then opacityFocus = 1 end - local opacitySelected = _M.settings.client_opacity_value_selected - if opacitySelected > 1 then opacitySelected = 1 end - - client.focus.opacity = opacityFocus - _M.altTabTable[_M.altTabIndex].client.opacity = opacitySelected - end -end - --- This is called any _M.settings.preview_box_fps milliseconds. In case the list --- of clients is changed, we need to redraw the whole preview box. Otherwise, a --- simple widget::updated signal is enough -function _M.updatePreview() - if _M.clientsHaveChanged() then - _M.populateAltTabTable() - _M.preview() - end - - for i = 1, #_M.preview_widgets do - _M.preview_widgets[i]:emit_signal("widget::updated") - end -end - -function _M.cycle(dir) - -- Switch to next client - _M.altTabIndex = _M.altTabIndex + dir - if _M.altTabIndex > #_M.altTabTable then - _M.altTabIndex = 1 -- wrap around - elseif _M.altTabIndex < 1 then - _M.altTabIndex = #_M.altTabTable -- wrap around - end - - _M.updatePreview() - - _M.altTabTable[_M.altTabIndex].client.minimized = false - - if not _M.settings.preview_box and not _M.settings.client_opacity then - client.focus = _M.altTabTable[_M.altTabIndex].client - end - - if _M.settings.client_opacity and _M.preview_wbox.visible then - _M.clientOpacity() - end - - if _M.settings.cycle_raise_client == true then - _M.altTabTable[_M.altTabIndex].client:raise() - end -end - -function _M.preview() - if not _M.settings.preview_box then return end - - -- Apply settings - _M.preview_wbox:set_bg(_M.settings.preview_box_bg) - _M.preview_wbox.border_color = _M.settings.preview_box_border - - -- Make the wibox the right size, based on the number of clients - local n = math.max(7, #_M.altTabTable) - local W = screen[mouse.screen].geometry.width -- + 2 * _M.preview_wbox.border_width - local w = W / n -- widget width - local h = w * 0.75 -- widget height - local textboxHeight = w * 0.125 - - local x = screen[mouse.screen].geometry.x - _M.preview_wbox.border_width - local y = screen[mouse.screen].geometry.y + (screen[mouse.screen].geometry.height - h - textboxHeight) / 2 - _M.preview_wbox:geometry({x = x, y = y, width = W, height = h + textboxHeight}) - - -- create a list that holds the clients to preview, from left to right - local leftRightTab = {} - local leftRightTabToAltTabIndex = {} -- save mapping from leftRightTab to altTabTable as well - local nLeft - local nRight - if #_M.altTabTable == 2 then - nLeft = 0 - nRight = 2 - else - nLeft = math.floor(#_M.altTabTable / 2) - nRight = math.ceil(#_M.altTabTable / 2) - end - - for i = 1, nLeft do - table.insert(leftRightTab, _M.altTabTable[#_M.altTabTable - nLeft + i].client) - table.insert(leftRightTabToAltTabIndex, #_M.altTabTable - nLeft + i) - end - for i = 1, nRight do - table.insert(leftRightTab, _M.altTabTable[i].client) - table.insert(leftRightTabToAltTabIndex, i) - end - - -- determine fontsize -> find maximum classname-length - local text, textWidth, textHeight, maxText - local maxTextWidth = 0 - local maxTextHeight = 0 - local bigFont = textboxHeight / 2 - cr:set_font_size(fontSize) - for i = 1, #leftRightTab do - text = _M.createPreviewText(leftRightTab[i]) - textWidth = cr:text_extents(text).width - textHeight = cr:text_extents(text).height - if textWidth > maxTextWidth or textHeight > maxTextHeight then - maxTextHeight = textHeight - maxTextWidth = textWidth - maxText = text - end - end - - while true do - cr:set_font_size(bigFont) - textWidth = cr:text_extents(maxText).width - textHeight = cr:text_extents(maxText).height - - if textWidth < w - textboxHeight and textHeight < textboxHeight then - break - end - - bigFont = bigFont - 1 - end - local smallFont = bigFont * _M.settings.preview_box_title_font_size_factor - - _M.preview_widgets = {} - - -- create all the widgets - for i = 1, #leftRightTab do - _M.preview_widgets[i] = wibox.widget.base.make_widget() - _M.preview_widgets[i].fit = function(preview_widget, width, height) - return w, h - end - local c = leftRightTab[i] - _M.preview_widgets[i].draw = function(preview_widget, preview_wbox, cr, width, height) - if width ~= 0 and height ~= 0 then - - local a = 0.8 - local overlay = 0.6 - local fontSize = smallFont - if c == _M.altTabTable[_M.altTabIndex].client then - a = 0.9 - overlay = 0 - fontSize = bigFont - end - - local sx, sy, tx, ty - - -- Icons - local icon - if c.icon == nil then - icon = gears.surface(gears.surface.load(_M.noicon)) - else - icon = gears.surface(c.icon) - end - - local iconboxWidth = 0.9 * textboxHeight - local iconboxHeight = iconboxWidth - - -- Titles - cr:select_font_face(unpack(_M.settings.preview_box_title_font)) - cr:set_font_face(cr:get_font_face()) - cr:set_font_size(fontSize) - - text = _M.createPreviewText(c) - textWidth = cr:text_extents(text).width - textHeight = cr:text_extents(text).height - - local titleboxWidth = textWidth + iconboxWidth - local titleboxHeight = textboxHeight - - -- Draw icons - tx = (w - titleboxWidth) / 2 - ty = h - sx = iconboxWidth / icon.width - sy = iconboxHeight / icon.height - - cr:translate(tx, ty) - cr:scale(sx, sy) - cr:set_source_surface(icon, 0, 0) - cr:paint() - cr:scale(1/sx, 1/sy) - cr:translate(-tx, -ty) - - -- Draw titles - tx = tx + iconboxWidth - ty = h + (textboxHeight + textHeight) / 2 - - cr:set_source_rgba(unpack(_M.settings.preview_box_title_color)) - cr:move_to(tx, ty) - cr:show_text(text) - cr:stroke() - - -- Draw previews - local cg = c:geometry() - if cg.width > cg.height then - sx = a * w / cg.width - sy = math.min(sx, a * h / cg.height) - else - sy = a * h / cg.height - sx = math.min(sy, a * h / cg.width) - end - - tx = (w - sx * cg.width) / 2 - ty = (h - sy * cg.height) / 2 - - local tmp = gears.surface(c.content) - cr:translate(tx, ty) - cr:scale(sx, sy) - cr:set_source_surface(tmp, 0, 0) - cr:paint() - tmp:finish() - - -- Overlays - cr:scale(1/sx, 1/sy) - cr:translate(-tx, -ty) - cr:set_source_rgba(0,0,0,overlay) - cr:rectangle(tx, ty, sx * cg.width, sy * cg.height) - cr:fill() - end - end - - -- Add mouse handler - _M.preview_widgets[i]:connect_signal("mouse::enter", function() - _M.cycle(leftRightTabToAltTabIndex[i] - _M.altTabIndex) - end) - end - - -- Spacers left and right - local spacer = wibox.widget.base.make_widget() - spacer.fit = function(leftSpacer, width, height) - return (W - w * #_M.altTabTable) / 2, _M.preview_wbox.height - end - spacer.draw = function(preview_widget, preview_wbox, cr, width, height) end - - --layout - preview_layout = wibox.layout.fixed.horizontal() - - preview_layout:add(spacer) - for i = 1, #leftRightTab do - preview_layout:add(_M.preview_widgets[i]) - end - preview_layout:add(spacer) - - _M.preview_wbox:set_widget(preview_layout) -end - - --- This starts the timer for updating and it shows the preview UI. -function _M.showPreview() - _M.preview_live_timer.timeout = 1 / _M.settings.preview_box_fps - _M.preview_live_timer:connect_signal("timeout", _M.updatePreview) - _M.preview_live_timer:start() - - _M.preview() - _M.preview_wbox.visible = true - - _M.clientOpacity() -end - -function _M.switch(dir, mod_key1, release_key, mod_key2, key_switch) - _M.populateAltTabTable() - - if #_M.altTabTable == 0 then - return - elseif #_M.altTabTable == 1 then - _M.altTabTable[1].client.minimized = false - _M.altTabTable[1].client:raise() - return - end - - -- reset index - _M.altTabIndex = 1 - - -- preview delay timer - local previewDelay = _M.settings.preview_box_delay / 1000 - _M.previewDelayTimer = timer({timeout = previewDelay}) - _M.previewDelayTimer:connect_signal("timeout", function() - _M.previewDelayTimer:stop() - _M.showPreview() - end) - _M.previewDelayTimer:start() - - -- Now that we have collected all windows, we should run a keygrabber - -- as long as the user is alt-tabbing: - keygrabber.run( - function (mod, key, event) - -- Stop alt-tabbing when the alt-key is released - if gears.table.hasitem(mod, mod_key1) then - if (key == release_key or key == "Escape") and event == "release" then - if _M.preview_wbox.visible == true then - _M.preview_wbox.visible = false - _M.preview_live_timer:stop() - else - _M.previewDelayTimer:stop() - end - - if key == "Escape" then - for i = 1, #_M.altTabTable do - _M.altTabTable[i].client.opacity = _M.altTabTable[i].opacity - _M.altTabTable[i].client.minimized = _M.altTabTable[i].minimized - end - else - -- Raise clients in order to restore history - local c - for i = 1, _M.altTabIndex - 1 do - c = _M.altTabTable[_M.altTabIndex - i].client - if not _M.altTabTable[i].minimized then - c:raise() - client.focus = c - end - end - - -- raise chosen client on top of all - c = _M.altTabTable[_M.altTabIndex].client - c:raise() - client.focus = c - - -- restore minimized clients - for i = 1, #_M.altTabTable do - if i ~= _M.altTabIndex and _M.altTabTable[i].minimized then - _M.altTabTable[i].client.minimized = true - end - _M.altTabTable[i].client.opacity = _M.altTabTable[i].opacity - end - end - - keygrabber.stop() - - elseif key == key_switch and event == "press" then - if gears.table.hasitem(mod, mod_key2) then - -- Move to previous client on Shift-Tab - _M.cycle(-1) - else - -- Move to next client on each Tab-press - _M.cycle( 1) - end - end - end - end - ) - - -- switch to next client - _M.cycle(dir) - -end -- function altTab - -return {switch = _M.switch, settings = _M.settings} diff --git a/home/.config/awesome/libs/bling/docs/_sidebar.md b/home/.config/awesome/libs/bling/docs/_sidebar.md index 106b0ce..9216d34 100644 --- a/home/.config/awesome/libs/bling/docs/_sidebar.md +++ b/home/.config/awesome/libs/bling/docs/_sidebar.md @@ -14,7 +14,6 @@ - [Playerctl](signals/pctl.md) - Widgets - - [App Launcher](widgets/app_launcher.md) - [Tag Preview](widgets/tag_preview.md) - [Task Preview](widgets/task_preview.md) - [Tabbed Misc](widgets/tabbed_misc.md) diff --git a/home/.config/awesome/libs/bling/docs/home.md b/home/.config/awesome/libs/bling/docs/home.md index 2b07620..6a35a11 100644 --- a/home/.config/awesome/libs/bling/docs/home.md +++ b/home/.config/awesome/libs/bling/docs/home.md @@ -4,14 +4,14 @@ [AwesomeWM](https://awesomewm.org/) is literally what it stands for, an awesome window manager. -Its unique selling point has always been the widget system, which allows for fancy buttons, sliders, bars, dashboards, and anything you can imagine. But that feature can be a curse. Most modules focus on the widget side of things, which leaves the actual window managing part of AwesomeWM underdeveloped compared to, for example, [xmonad](https://xmonad.org/), even though it's probably just as powerful in that area. +Its unique selling point has always been the widget system, which allows for fancy buttons, sliders, bars, dashboards and anything you can imagine. But that feature can be a curse. Most modules focus on the widget side of things which leave the actual window managing part of AwesomeWM underdeveloped compared to, for example, [xmonad](https://xmonad.org/) even though it's probably just as powerfull in that area. -This project aims to fix that problem, adding new layouts and modules that make use of the widget system but primarily focusing on window managing features. +This project focuses on that problem - adding new layouts and modules that make use of the widget system, but primarily focus on the new window managing features. ## Installation -- Clone this repo into your `~/.config/awesome` folder +- clone this repo into your `~/.config/awesome` folder - `git clone https://github.com/BlingCorp/bling.git ~/.config/awesome/bling` -- Require the `bling` module in your `rc.lua`, making sure it's under the `beautiful` module initialization +- require the module in your `rc.lua`, and make sure it's under the beautiful module initialization ```lua -- other imports diff --git a/home/.config/awesome/libs/bling/docs/layouts/layout.md b/home/.config/awesome/libs/bling/docs/layouts/layout.md index e77b71c..85fc547 100644 --- a/home/.config/awesome/libs/bling/docs/layouts/layout.md +++ b/home/.config/awesome/libs/bling/docs/layouts/layout.md @@ -2,7 +2,7 @@ Choose layouts from the list below and add them to to your `awful.layouts` list in your `rc.lua`. -Each layout supports multiple master clients and master width factors, making them easy to use. +Everyone of them supports multiple master clients and master width factor making them easy to use. The mstab layout uses the tab theme from the tabbed module. diff --git a/home/.config/awesome/libs/bling/docs/module/flash.md b/home/.config/awesome/libs/bling/docs/module/flash.md index 00a3521..a12b78d 100644 --- a/home/.config/awesome/libs/bling/docs/module/flash.md +++ b/home/.config/awesome/libs/bling/docs/module/flash.md @@ -1,6 +1,6 @@ ## 🔦 Flash Focus -Flash focus creates an opacity flash animation when a client is focused. +Flash focus does an opacity animation effect on a client when it is focused. ### Usage @@ -9,7 +9,7 @@ There are two ways in which you can use this module. You can enable it by callin ```lua bling.module.flash_focus.enable() ``` -This connects to the focus signal of a client, which means that the flash focus will activate with whatever method you use to focus the client. +This connects to the focus signal of a client, which means that the flash focus will activate however you focus the client. The other way is to call the function itself like this: `bling.module.flash_focus.flashfocus(someclient)`. This allows you to activate on certain keybinds like so: ```lua diff --git a/home/.config/awesome/libs/bling/docs/module/scratch.md b/home/.config/awesome/libs/bling/docs/module/scratch.md index 64dc96d..54f8ddd 100644 --- a/home/.config/awesome/libs/bling/docs/module/scratch.md +++ b/home/.config/awesome/libs/bling/docs/module/scratch.md @@ -61,7 +61,7 @@ term_scratch:turn_on() -- turns the scratchpads visibility on term_scratch:turn_off() -- turns the scratchpads visibility off ``` -You can also connect to signals for further customization. For example: +You can also connect to signals as you are used to for further customization. For example like that: ```lua term_scratch:connect_signal("turn_on", function(c) naughty.notify({title = "Turned on!"}) end) @@ -69,7 +69,7 @@ term_scratch:connect_signal("turn_on", function(c) naughty.notify({title = "Turn The following signals are currently available. `turn_on`, `turn_off` and `inital_apply` pass the client on which they operated as an argument: -- `turn_on` fires when the scratchpad is turned on on a tag that it wasn't present on before. -- `turn_off` fires when the scratchpad is turned off on a tag. -- `spawn` fires when the scratchpad is launched with the given command. -- `inital_apply` fires after `spawn`, when a corresponding client has been found and the properties have been applied. +- `turn_on` fires when the scratchpad is turned on on a tag that it wasn't present on before +- `turn_off` fires when the scratchpad is turned off on a tag +- `spawn` fires when the scratchpad is launched with the given command +- `inital_apply` fires after `spawn`, when a corresponding client has been found and the properties have been applied diff --git a/home/.config/awesome/libs/bling/docs/module/swal.md b/home/.config/awesome/libs/bling/docs/module/swal.md index 18a6b71..0b3fed6 100644 --- a/home/.config/awesome/libs/bling/docs/module/swal.md +++ b/home/.config/awesome/libs/bling/docs/module/swal.md @@ -4,7 +4,7 @@ Can your window manager swallow? It probably can... ### Usage -To activate and deactivate window swallowing use the following functions. If you only want to activate it, call the `start` function once in your `rc.lua`. +To activate and deactivate window swallowing here are the following functions. If you want to activate it, just call the `start` function once in your `rc.lua`. ```lua bling.module.window_swallowing.start() -- activates window swallowing bling.module.window_swallowing.stop() -- deactivates window swallowing diff --git a/home/.config/awesome/libs/bling/docs/module/tabbed.md b/home/.config/awesome/libs/bling/docs/module/tabbed.md index 7c9f5db..e705357 100644 --- a/home/.config/awesome/libs/bling/docs/module/tabbed.md +++ b/home/.config/awesome/libs/bling/docs/module/tabbed.md @@ -1,6 +1,6 @@ ## 📑 Tabbed -Tabbed implements a tab container. There are several different themes for the tabs as well. +Tabbed implements a tab container. There are also different themes for the tabs. ### Usage @@ -8,7 +8,7 @@ You should bind these functions to keys in order to use the tabbed module effect ```lua bling.module.tabbed.pick() -- picks a client with your cursor to add to the tabbing group bling.module.tabbed.pop() -- removes the focused client from the tabbing group -bling.module.tabbed.iter() -- iterates through the currently focused tabbing group +bling.module.tabbed.iter() -- iterates through the currently focused tabbing group bling.module.tabbed.pick_with_dmenu() -- picks a client with a dmenu application (defaults to rofi, other options can be set with a string parameter like "dmenu") bling.module.tabbed.pick_by_direction(dir) -- picks a client based on direction ("up", "down", "left" or "right") ``` @@ -51,7 +51,7 @@ Modern theme: *screenshot by [JavaCafe01](https://github.com/JavaCafe01)* ### Signals -The tabbed module emits a few signals for the purpose of integration: +The tabbed module emits a few signals for the purpose of integration, ```lua -- bling::tabbed::update -- triggered whenever a tabbed object is updated -- tabobj -- the object that caused the update diff --git a/home/.config/awesome/libs/bling/docs/module/twall.md b/home/.config/awesome/libs/bling/docs/module/twall.md index cacdb16..69c09c3 100644 --- a/home/.config/awesome/libs/bling/docs/module/twall.md +++ b/home/.config/awesome/libs/bling/docs/module/twall.md @@ -2,7 +2,7 @@ ### Usage -The function to set a tiled wallpaper can be called by the following (not every option is necessary): +The function to set an automatically created tiled wallpaper can be called the following way (you don't need to set every option in the table): ```lua awful.screen.connect_for_each_screen(function(s) -- that way the wallpaper is applied to every screen bling.module.tiled_wallpaper("x", s, { -- call the actual function ("x" is the string that will be tiled) @@ -20,7 +20,7 @@ end) ### Preview -![](https://user-images.githubusercontent.com/70270606/213927382-bdb1b402-0e14-4a00-bfd1-5a1591c71d96.png) +![](https://media.discordapp.net/attachments/702548913999314964/773887721294135296/tiled-wallpapers.png?width=1920&height=1080) *screenshots by [Nooo37](https://github.com/Nooo37)* diff --git a/home/.config/awesome/libs/bling/docs/module/wall.md b/home/.config/awesome/libs/bling/docs/module/wall.md index 23e0ba2..cdab6cc 100644 --- a/home/.config/awesome/libs/bling/docs/module/wall.md +++ b/home/.config/awesome/libs/bling/docs/module/wall.md @@ -62,9 +62,9 @@ bling.module.wallpaper.setup { The setup function will do 2 things: call the set-function when awesome requests a wallpaper, and manage a timer to call `set_function` periodically. -Its argument is an args table that is passed to other functions (setters and wallpaper functions), so you define everything with setup. +Its argument is a args table that is passed to ohter functions (setters and wallpaper functions), so you define everything with setup. -The `set_function` is a function called every time a wallpaper is needed. +The `set_function` is a function called every times a wallpaper is needed. The module provides some setters: @@ -83,8 +83,8 @@ A wallpaper is one of the following elements: * a list containing any of the elements above To set up for multiple screens, two possible methods are: -* Call the `setup` function for each screen, passing the appropriate configuration and `screen` arg. -* Call the `setup` function once, passing a table of screens as the `screen` arg. This applies the same configuration to all screens in the table. +* Call the `setup` function for each screen, passing the appropriate configuration and `screen` arg +* Call the `setup` function once, passing a table of screens as the `screen` arg. This applies the same configuration to all screens in the table _Note_: Multiple screen setup only works for the `simple` and `random` setters ```lua @@ -105,8 +105,8 @@ bling.module.wallpaper.setup { ``` The provided setters `simple` and `random` will use 2 internal functions that you can use to write your own setter: -* `bling.module.wallpaper.prepare_list`: return a list of wallpapers directly usable by `apply` (for now, it just explores folders). -* `bling.module.wallpaper.apply`: a wrapper for gears.wallpaper functions, using the args table of setup. +* `bling.module.wallpaper.prepare_list`: return a list of wallpapers directly usable by `apply` (for now, it just explores folders) +* `bling.module.wallpaper.apply`: a wrapper for gears.wallpaper functions, using the args table of setup Here are the defaults: diff --git a/home/.config/awesome/libs/bling/docs/signals/pctl.md b/home/.config/awesome/libs/bling/docs/signals/pctl.md index c75547f..89a0709 100644 --- a/home/.config/awesome/libs/bling/docs/signals/pctl.md +++ b/home/.config/awesome/libs/bling/docs/signals/pctl.md @@ -9,7 +9,7 @@ This is a signal module in which you can connect to certain bling signals to gra - Song length - If there are no players on -This module relies on `playerctl` and `curl`. If you have this module disabled, you won't need those programs. With this module, you can create a widget like the one below without worrying about the backend. +This module relies on `playerctl` and `curl`. If you have this module disabled, you won't need those programs. With this module, you can create a widget like below without worrying about the backend. ![](https://user-images.githubusercontent.com/33443763/107377569-fa807900-6a9f-11eb-93c1-174c58eb7bf1.png) @@ -157,7 +157,7 @@ end) Thats all! You don't even have to worry about updating the widgets, the signals will handle that for you. -Here's another example in which you get a notification with the album art, title, and artist whenever the song changes: +Here's another example in which you get a notification with the album art, title, and artist whenever the song changes. ```lua local naughty = require("naughty") @@ -184,7 +184,7 @@ button:buttons(gears.table.join( ### Theme Variables and Configuration -By default, this module will output signals from the most recently active player. If you wish to customize the behavior furthur, the following configuration options are available depending on the selected backend. Here is a summary of the two backends and which configuration options they support: +By default, this module will output signals from the most recently active player. If you wish to customize the behavior furthur, the following configuration options are available depending on the selected backend. Here is a summary of the two backends and which configuration options they support. | Option | playerctl_cli | playerctl_lib | | ------------------- | ------------------ | ------------------ | diff --git a/home/.config/awesome/libs/bling/docs/widgets/app_launcher.md b/home/.config/awesome/libs/bling/docs/widgets/app_launcher.md deleted file mode 100644 index a680f6a..0000000 --- a/home/.config/awesome/libs/bling/docs/widgets/app_launcher.md +++ /dev/null @@ -1,129 +0,0 @@ -## 🎨 App Launcher - -A popup application launcher similar to Rofi. - -![](https://user-images.githubusercontent.com/33443763/140196352-07e444fe-cccd-45ad-93fa-5705f09e516b.png) - -_image by [JavaCafe01](https://github.com/JavaCafe01)_ - -### Usage - -To enable: - -```lua -local app_launcher = bling.widget.app_launcher() -``` - -To run the app launcher, call `:toggle()` on the launcher: - -```lua -app_launcher:toggle() -``` - -### Example Implementation: - -```lua -local args = { - apps_per_column = 1, - sort_alphabetically = false, - reverse_sort_alphabetically = true, -} -local app_launcher = bling.widget.app_launcher(args) -``` - -### Available Options: - -```lua -local args = { - terminal = "alacritty" -- Set default terminal - favorites = { "firefox", "wezterm" } -- Favorites are given priority and are bubbled to top of the list - search_commands = true -- Search by app name AND commandline command - skip_names = { "Discord" } -- List of apps to omit from launcher - skip_commands = { "thunar" } -- List of commandline commands to omit from launcher - skip_empty_icons = true -- Skip applications without icons - sort_alphabetically = true -- Sorts applications alphabetically - reverse_sort_alphabetically = false -- Sort in reverse alphabetical order (NOTE: must set `sort_alphabetically = false` to take effect) - select_before_spawn = true -- When selecting by mouse, click once to select app, click once more to open the app. - hide_on_left_clicked_outside = true -- Hide launcher on left click outside the launcher popup - hide_on_right_clicked_outside = true -- Hide launcher on right click outside the launcher popup - hide_on_launch = true -- Hide launcher when spawning application - try_to_keep_index_after_searching = false -- After a search, reselect the previously selected app - reset_on_hide = true -- When you hide the launcher, reset search query - save_history = true -- Save search history - wrap_page_scrolling = true -- Allow scrolling to wrap back to beginning/end of launcher list - wrap_app_scrolling = true -- Set app scrolling - - default_app_icon_name = "standard.svg" -- Sets default app icon name for apps without icon names - default_app_icon_path = "~/icons/" -- Sets default app icon path for apps without icon paths - icon_theme = "application" -- Set icon theme - icon_size = 24 -- Set icon size - - type = "dock" -- awful.popup type ("dock", "desktop", "normal"...). See awesomewm docs for more detail - show_on_focused_screen = true -- Should app launcher show on currently focused screen - screen = awful.screen -- Screen you want the launcher to launch to - placement = awful.placement.top_left -- Where launcher should be placed ("awful.placement.centered"). - rubato = { x = rubato_animation_x, y = rubato_animation_y } -- Rubato animation to apply to launcher - shrink_width = true -- Automatically shrink width of launcher to fit varying numbers of apps in list (works on apps_per_column) - shrink_height = true -- Automatically shrink height of launcher to fit varying numbers of apps in list (works on apps_per_row) - background = "#FFFFFF" -- Set bg color - border_width = dpi(0) -- Set border width of popup - border_color = "#FFFFFF" -- Set border color of popup - shape = function(cr, width, height) - gears.shape.rectangle(cr, width, height) - end -- Set shape for launcher - prompt_height = dpi(50) -- Prompt height - prompt_margins = dpi(30) -- Prompt margins - prompt_paddings = dpi(15) -- Prompt padding - shape = function(cr, width, height) - gears.shape.rectangle(cr, width, height) - end -- Set shape for prompt - prompt_color = "#000000" -- Prompt background color - prompt_border_width = dpi(0) -- Prompt border width - prompt_border_color = "#000000" -- Prompt border color - prompt_text_halign = "center" -- Prompt text horizontal alignment - prompt_text_valign = "center" -- Prompt text vertical alignment - prompt_icon_text_spacing = dpi(10) -- Prompt icon text spacing - prompt_show_icon = true -- Should prompt show icon (?) - prompt_icon_font = "Comic Sans" -- Prompt icon font - prompt_icon_color = "#000000" -- Prompt icon color - prompt_icon = "" -- Prompt icon - prompt_icon_markup = string.format( - "%s", - args.prompt_icon_color, args.prompt_icon - ) -- Prompt icon markup - prompt_text = "Search:" -- Prompt text - prompt_start_text = "manager" -- Set string for prompt to start with - prompt_font = "Comic Sans" -- Prompt font - prompt_text_color = "#FFFFFF" -- Prompt text color - prompt_cursor_color = "#000000" -- Prompt cursor color - - apps_per_row = 3 -- Set how many apps should appear in each row - apps_per_column = 3 -- Set how many apps should appear in each column - apps_margin = {left = dpi(40), right = dpi(40), bottom = dpi(30)} -- Margin between apps - apps_spacing = dpi(10) -- Spacing between apps - - expand_apps = true -- Should apps expand to fill width of launcher - app_width = dpi(400) -- Width of each app - app_height = dpi(40) -- Height of each app - app_shape = function(cr, width, height) - gears.shape.rectangle(cr, width, height) - end -- Shape of each app - app_normal_color = "#000000" -- App normal color - app_normal_hover_color = "#111111" -- App normal hover color - app_selected_color = "#FFFFFF" -- App selected color - app_selected_hover_color = "#EEEEEE" -- App selected hover color - app_content_padding = dpi(10) -- App content padding - app_content_spacing = dpi(10) -- App content spacing - app_show_icon = true -- Should show icon? - app_icon_halign = "center" -- App icon horizontal alignment - app_icon_width = dpi(70) -- App icon wigth - app_icon_height = dpi(70) -- App icon height - app_show_name = true -- Should show app name? - app_name_generic_name_spacing = dpi(0) -- Generic name spacing (If show_generic_name) - app_name_halign = "center" -- App name horizontal alignment - app_name_font = "Comic Sans" -- App name font - app_name_normal_color = "#FFFFFF" -- App name normal color - app_name_selected_color = "#000000" -- App name selected color - app_show_generic_name = true -- Should show generic app name? -} -``` diff --git a/home/.config/awesome/libs/bling/docs/widgets/tabbed_misc.md b/home/.config/awesome/libs/bling/docs/widgets/tabbed_misc.md index c2e537e..89c4557 100644 --- a/home/.config/awesome/libs/bling/docs/widgets/tabbed_misc.md +++ b/home/.config/awesome/libs/bling/docs/widgets/tabbed_misc.md @@ -28,7 +28,7 @@ bling.widget.tabbed_misc.titlebar_indicator(client, { }) ``` -A `widget_template` option is also available: +a widget_template option is also available: ```lua bling.widget.tabbed_misc.titlebar_indicator(client, { widget_template = { @@ -50,7 +50,7 @@ bling.widget.tabbed_misc.titlebar_indicator(client, { ### Example Implementation -The widget is typically embedded in a titlebar: +You normally embed the widget in your titlebar... ```lua awful.titlebar(c).widget = { { -- Left @@ -75,7 +75,7 @@ awful.titlebar(c).widget = { ``` ## Tasklist -This module exports a function that can be added to your tasklist as an `update_callback`. +The module exports a function that can be added to your tasklist as a `update_callback` ### Usage ```lua @@ -108,7 +108,7 @@ awful.widget.tasklist({ }) ``` -If you need to do something else, it can be used like so: +If you need to do something else, it can be used like so ```lua update_callback = function(self, client, index, clients) require("bling.widget.tabbed_misc").custom_tasklist(self, client, index, clients) diff --git a/home/.config/awesome/libs/bling/docs/widgets/tag_preview.md b/home/.config/awesome/libs/bling/docs/widgets/tag_preview.md index ce96a60..bdf033d 100644 --- a/home/.config/awesome/libs/bling/docs/widgets/tag_preview.md +++ b/home/.config/awesome/libs/bling/docs/widgets/tag_preview.md @@ -49,7 +49,7 @@ By default, the widget is not visible. You must implement when it will update an ### Example Implementation -We can trigger the widget to show the specific tag when hovering over it in the taglist. The code shown below is the example taglist from the [AwesomeWM docs](https://awesomewm.org/doc/api/classes/awful.widget.taglist.html). We are going to update the widget and toggle it through the taglist's `create_callback` (bling addons are commented). +We can trigger the widget to show the specific tag when hovering over it in the taglist. The code shown below is the example taglist from the [AwesomeWM docs](https://awesomewm.org/doc/api/classes/awful.widget.taglist.html). Basically, we are going to update the widget and toggle it through the taglist's `create_callback`. (The bling addons are commented) ```lua s.mytaglist = awful.widget.taglist { screen = s, diff --git a/home/.config/awesome/libs/bling/docs/widgets/task_preview.md b/home/.config/awesome/libs/bling/docs/widgets/task_preview.md index bb861b8..30a85f8 100644 --- a/home/.config/awesome/libs/bling/docs/widgets/task_preview.md +++ b/home/.config/awesome/libs/bling/docs/widgets/task_preview.md @@ -1,6 +1,6 @@ ## 🔍 Task Preview -This is a popup widget that will show a preview of the specified client. It intends to mimic the small popup when hovering over an application icon on Windows. +This is a popup widget that will show a preview of the specified client. It is supposed to mimic the small popup that Windows has when hovering over the application icon. ![](https://user-images.githubusercontent.com/33443763/124705653-d7b98b80-deaa-11eb-8091-42bbe62365be.png) @@ -26,7 +26,7 @@ bling.widget.task_preview.enable { } ``` -To allow for more customization, there is also a `widget_structure` property (as seen in some default awesome widgets) which is optional. An example is as follows: +To allow for more customization, there is also a `widget_structure` property (as seen in some default awesome widgets) which is optional. An example is as follows - ```lua bling.widget.task_preview.enable { x = 20, -- The x-coord of the popup @@ -82,7 +82,7 @@ By default, the widget is not visible. You must implement when it will update an ### Example Implementation -We can trigger the widget to show the specific client when hovering over it in the tasklist. The code shown below is the example icon only tasklist from the [AwesomeWM docs](https://awesomewm.org/doc/api/classes/awful.widget.tasklist.html). We are going to toggle the widget through the tasklist's `create_callback` (bling addons are commented). +We can trigger the widget to show the specific client when hovering over it in the tasklist. The code shown below is the example icon only tasklist from the [AwesomeWM docs](https://awesomewm.org/doc/api/classes/awful.widget.tasklist.html). Basically, we are going to toggle the widget through the tasklist's `create_callback`. (The bling addons are commented) ```lua s.mytasklist = awful.widget.tasklist { screen = s, diff --git a/home/.config/awesome/libs/bling/docs/widgets/window_switcher.md b/home/.config/awesome/libs/bling/docs/widgets/window_switcher.md index d827ad4..8f48257 100644 --- a/home/.config/awesome/libs/bling/docs/widgets/window_switcher.md +++ b/home/.config/awesome/libs/bling/docs/widgets/window_switcher.md @@ -30,7 +30,7 @@ bling.widget.window_switcher.enable { } ``` -To run the window swicher, emit this signal (usually with a keybind): +To run the window swicher you have to emit this signal from within your configuration (usually using a keybind). ```lua awesome.emit_signal("bling::window_switcher::turn_on") diff --git a/home/.config/awesome/libs/bling/layout/centered.lua b/home/.config/awesome/libs/bling/layout/centered.lua index 4d244d7..7929dd8 100644 --- a/home/.config/awesome/libs/bling/layout/centered.lua +++ b/home/.config/awesome/libs/bling/layout/centered.lua @@ -16,9 +16,9 @@ function mylayout.arrange(p) local slave_width = 0.5 * (area.width - master_area_width) local master_area_x = area.x + slave_width + -- Special case: few slaves -> make masters take more space - unless requested otherwise! - if nslaves < 2 and t.master_fill_policy ~= "master_width_factor" and - t.centered_layout_master_fill_policy ~= "master_width_factor" then + if nslaves < 2 and t.master_fill_policy ~= "master_width_factor" then master_area_x = area.x if nslaves == 1 then diff --git a/home/.config/awesome/libs/bling/signal/playerctl/playerctl_lib.lua b/home/.config/awesome/libs/bling/signal/playerctl/playerctl_lib.lua index ca19633..1df1e1f 100644 --- a/home/.config/awesome/libs/bling/signal/playerctl/playerctl_lib.lua +++ b/home/.config/awesome/libs/bling/signal/playerctl/playerctl_lib.lua @@ -170,8 +170,8 @@ function playerctl:get_active_player() end function playerctl:get_player_of_name(name) - for _, player in ipairs(self._private.manager.players) do - if player.player_name == name then + for _, player in ipairs(self._private.manager.players[1]) do + if player.name == name then return player end end @@ -521,11 +521,8 @@ local function new(args) -- Grab settings from beautiful variables if not set explicitly args.ignore = args.ignore or beautiful.playerctl_ignore args.player = args.player or beautiful.playerctl_player - if args.update_on_activity ~= nil then - ret.update_on_activity = args.update_on_activity - else - ret.update_on_activity = beautiful.playerctl_update_on_activity ~= false - end + ret.update_on_activity = args.update_on_activity or + beautiful.playerctl_update_on_activity or true ret.interval = args.interval or beautiful.playerctl_position_update_interval or 1 ret.debounce_delay = args.debounce_delay or beautiful.playerctl_debounce_delay or 0.35 parse_args(ret, args) diff --git a/home/.config/awesome/libs/bling/widget/app_launcher/init.lua b/home/.config/awesome/libs/bling/widget/app_launcher/init.lua index 4cc6a55..b74c2ab 100644 --- a/home/.config/awesome/libs/bling/widget/app_launcher/init.lua +++ b/home/.config/awesome/libs/bling/widget/app_launcher/init.lua @@ -143,7 +143,7 @@ local function create_app_widget(self, entry) widget = wibox.widget.textbox, id = "name", font = self.app_name_font, - markup = string.format("%s", self.app_name_normal_color, entry.name) + markup = entry.name } or nil local generic_name = entry.generic_name ~= nil and self.app_show_generic_name == true and @@ -770,18 +770,16 @@ local function new(args) args.default_app_icon_name = args.default_app_icon_name or nil args.default_app_icon_path = args.default_app_icon_path or nil args.icon_theme = args.icon_theme or nil - args.icon_size = args.icon_size or nil + args.icons_size = args.icons_size or nil args.type = args.type or "dock" args.show_on_focused_screen = args.show_on_focused_screen == nil and true or args.show_on_focused_screen args.screen = args.screen or capi.screen.primary args.placement = args.placement or awful.placement.centered args.rubato = args.rubato or nil - args.shrink_width = args.shrink_width ~= nil and args.shrink_width or false + args.shirnk_width = args.shirnk_width ~= nil and args.shirnk_width or false args.shrink_height = args.shrink_height ~= nil and args.shrink_height or false args.background = args.background or "#000000" - args.border_width = args.border_width or beautiful.border_width or dpi(0) - args.border_color = args.border_color or beautiful.border_color or "#FFFFFF" args.shape = args.shape or nil args.prompt_height = args.prompt_height or dpi(100) @@ -844,7 +842,7 @@ local function new(args) gtable.crush(ret, args) -- Calculate the grid width and height - local grid_width = ret.shrink_width == false + local grid_width = ret.shirnk_width == false and dpi((ret.app_width * ret.apps_per_column) + ((ret.apps_per_column - 1) * ret.apps_spacing)) or nil local grid_height = ret.shrink_height == false @@ -925,8 +923,6 @@ local function new(args) visible = false, ontop = true, placement = ret.placement, - border_width = ret.border_width, - border_color = ret.border_color, shape = ret.shape, bg = ret.background, widget = diff --git a/home/.config/awesome/libs/bling/widget/tabbar/default.lua b/home/.config/awesome/libs/bling/widget/tabbar/default.lua index 070b332..ad6b0b1 100644 --- a/home/.config/awesome/libs/bling/widget/tabbar/default.lua +++ b/home/.config/awesome/libs/bling/widget/tabbar/default.lua @@ -18,7 +18,6 @@ local position = beautiful.tabbar_position or "top" local function create(c, focused_bool, buttons, inactive_bool) local flexlist = wibox.layout.flex.horizontal() local title_temp = c.name or c.class or "-" - title_temp = gears.string.xml_escape(title_temp) local bg_temp = inactive_bool and bg_normal_inactive or bg_normal local fg_temp = inactive_bool and fg_normal_inactive or fg_normal if focused_bool then diff --git a/home/.config/awesome/libs/bling/widget/tabbar/modern.lua b/home/.config/awesome/libs/bling/widget/tabbar/modern.lua index 81217b1..5f48066 100644 --- a/home/.config/awesome/libs/bling/widget/tabbar/modern.lua +++ b/home/.config/awesome/libs/bling/widget/tabbar/modern.lua @@ -73,7 +73,6 @@ end local function create(c, focused_bool, buttons, inactive_bool) -- local flexlist = wibox.layout.flex.horizontal() local title_temp = c.name or c.class or "-" - title_temp = gears.string.xml_escape(title_temp) local bg_temp = inactive_bool and bg_normal_inactive or bg_normal local fg_temp = inactive_bool and fg_normal_inactive or fg_normal if focused_bool then diff --git a/home/.config/awesome/libs/bling/widget/window_switcher.lua b/home/.config/awesome/libs/bling/widget/window_switcher.lua index d7a35e0..97dbeb1 100644 --- a/home/.config/awesome/libs/bling/widget/window_switcher.lua +++ b/home/.config/awesome/libs/bling/widget/window_switcher.lua @@ -10,6 +10,25 @@ local window_switcher_first_client -- The client that was focused when the windo local window_switcher_minimized_clients = {} -- The clients that were minimized when the window switcher was activated local window_switcher_grabber +local get_num_clients = function() + local minimized_clients_in_tag = 0 + local matcher = function(c) + return awful.rules.match( + c, + { + minimized = true, + skip_taskbar = false, + hidden = false, + first_tag = awful.screen.focused().selected_tag, + } + ) + end + for c in awful.client.iterate(matcher) do + minimized_clients_in_tag = minimized_clients_in_tag + 1 + end + return minimized_clients_in_tag + #awful.screen.focused().clients +end + local window_switcher_hide = function(window_switcher_box) -- Add currently focused client to history if client.focus then @@ -348,19 +367,20 @@ local enable = function(opts) } window_switcher_box:connect_signal("property::width", function() - if window_switcher_box.visible and #awful.screen.focused().selected_tag:clients() == 0 then + if window_switcher_box.visible and get_num_clients() == 0 then window_switcher_hide(window_switcher_box) end end) window_switcher_box:connect_signal("property::height", function() - if window_switcher_box.visible and #awful.screen.focused().selected_tag:clients() == 0 then + if window_switcher_box.visible and get_num_clients() == 0 then window_switcher_hide(window_switcher_box) end end) awesome.connect_signal("bling::window_switcher::turn_on", function() - if #awful.screen.focused().selected_tag:clients() == 0 then + local number_of_clients = get_num_clients() + if number_of_clients == 0 then return end diff --git a/home/.config/awesome/libs/misc/rofi/colors/catppuccin-macchiato.rasi b/home/.config/awesome/libs/misc/rofi/colors/catppuccin-macchiato.rasi deleted file mode 100644 index 1d48d36..0000000 --- a/home/.config/awesome/libs/misc/rofi/colors/catppuccin-macchiato.rasi +++ /dev/null @@ -1,15 +0,0 @@ -/* -* AUTHOR: Luca -*/ - -* { - background: #1e2030; - background-alt: #24273a; - brdr: #181926; - foreground: #cad3f5; - foresel: #67AFC1; - selected: #f4dbd6; - urgent: #ed8796; - on: #a6da95; - off: #ee99a0; -} diff --git a/home/.config/awesome/libs/misc/rofi/config.rasi b/home/.config/awesome/libs/misc/rofi/config.rasi index 110d24f..131750e 100644 --- a/home/.config/awesome/libs/misc/rofi/config.rasi +++ b/home/.config/awesome/libs/misc/rofi/config.rasi @@ -24,15 +24,15 @@ configuration{ } * { - background: #1e2030; - background-alt: #24273a; - brdr: #181926; - foreground: #cad3f5; - foresel: #67AFC1; - selected: #f4dbd6; - urgent: #ed8796; - on: #a6da95; - off: #ee99a0; + background: #262626; + background-alt: #333333; + brdr: #191F21; + foreground: #D8D8D8; + foresel: #67AFC1; + selected: #458588; + urgent: #E06C75; + on: #87A181; + off: #D88B9F; } @@ -48,11 +48,11 @@ window { border-color: @background-alt; width: 400px; height: 500px; - location: south west; - anchor: south west; - orientation: horizontal; - x-offset: 11px; - y-offset: -52px; + location: south west; + anchor: south west; + orientation: horizontal; + x-offset: 11px; + y-offset: -52px; } prompt { @@ -147,16 +147,12 @@ element selected.normal { border-color: @selected; } element selected.urgent { - background-color: @off; - border: 0px; - border-radius: 8px; - text-color: @background; + background-color: @background; + text-color: @off; } element selected.active { - background-color: @on; - border: 0px; - border-radius: 8px; - text-color: @background; + background-color: @background; + text-color: @on; } element alternate.normal { background-color: @background; @@ -164,11 +160,11 @@ element alternate.normal { } element alternate.urgent { background-color: @background; - text-color: @off; + text-color: @foreground; } element alternate.active { background-color: @background; - text-color: @on; + text-color: @foreground; } sidebar { @@ -183,7 +179,7 @@ button { vertical-align: 0.5; padding: 8px; background-color: @background-alt; - text-color: @foreground; + text-color: @background; border: 0px; border-radius: 8px; border-color: @selected; @@ -191,7 +187,7 @@ button { button selected { background-color: @selected; - text-color: @background; + text-color: @foreground; border: 0px; border-radius: 8px; border-color: @selected; diff --git a/home/.config/awesome/libs/revelation b/home/.config/awesome/libs/revelation deleted file mode 160000 index 852f95f..0000000 --- a/home/.config/awesome/libs/revelation +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 852f95f38247aedb3e4b0ca8167380bb0016c57e diff --git a/home/.config/awesome/rc.lua b/home/.config/awesome/rc.lua index 95ef41c..35c175e 100644 --- a/home/.config/awesome/rc.lua +++ b/home/.config/awesome/rc.lua @@ -5,14 +5,11 @@ local awful = require("awful") -- Theme handling library local beautiful = require("beautiful") --- # Themes : +-- # Themes : local theme = require("themes") beautiful.init(theme) -local revelation = require("libs.revelation") -revelation.init() - --- ### Configurations ### -- +-- ### Configurations ### -- -- # Keybindings : require("configurations.keybindings") @@ -23,8 +20,10 @@ require("configurations.layouts") -- # Rules : require("configurations.rules") +-- # Signals : +require("signals") --- ### UI ### -- +-- ### UI ### -- -- # Notifications : require("ui.notifications") @@ -35,22 +34,12 @@ require("ui.titlebar") -- # Menu : require("ui.menu") --- # Signals : -require("signals") - --- # Sidebar : -require("ui.sidebar") -require("ui.notifications-list") - -- # Bar : require("ui.bar") -require("ui.widgets.window-switcher") -require("ui.widgets.task-preview") -require("ui.widgets.tag-preview") -- Autorun at startup -awful.spawn.with_shell("bash ~/.config/awesome/configurations/autorun") +awful.spawn.with_shell("bash ~/.config/awesome/configurations/autostart") --- Enable for lower memory consumption collectgarbage("setpause", 110) diff --git a/home/.config/awesome/signals/airplane.lua b/home/.config/awesome/signals/airplane.lua index 9656dcb..7a7e632 100644 --- a/home/.config/awesome/signals/airplane.lua +++ b/home/.config/awesome/signals/airplane.lua @@ -19,15 +19,15 @@ local net_cmd = [[ ]] awful.widget.watch(net_cmd, update_interval, function(_, stdout) - local net_ssid = stdout - net_ssid = string.gsub(net_ssid, '^%s*(.-)%s*$', '%1') - local net_status = true + local net_ssid = stdout + net_ssid = string.gsub(net_ssid, '^%s*(.-)%s*$', '%1') + local net_status = true - -- update networks status - if net_ssid == "disabled" then - net_status = false - end + -- update networks status + if net_ssid == "disabled" then + net_status = false + end - -- emit (true or false) - awesome.emit_signal("signal::airplane", net_status) + -- emit (true or false) + awesome.emit_signal("signal::airplane", net_status) end) diff --git a/home/.config/awesome/signals/brightness.lua b/home/.config/awesome/signals/brightness.lua index d425a45..50f6cb1 100644 --- a/home/.config/awesome/signals/brightness.lua +++ b/home/.config/awesome/signals/brightness.lua @@ -29,7 +29,7 @@ local emit_brightness_info = function() stdout = function(value) awful.spawn.with_line_callback(brightness_max, { stdout = function(max) - local percentage = tonumber(value)/tonumber(max) * 100 + percentage = tonumber(value)/tonumber(max) * 100 percentage = tonumber(percentage) or 0 awesome.emit_signal("signal::brightness", percentage) end}) diff --git a/home/.config/awesome/signals/disk.lua b/home/.config/awesome/signals/disk.lua index 35b8ae9..a9a2828 100644 --- a/home/.config/awesome/signals/disk.lua +++ b/home/.config/awesome/signals/disk.lua @@ -6,7 +6,7 @@ local awful = require("awful") local gears = require("gears") -local which_disk = "/dev/nvme0n1p5" +local which_disk = "/dev/sda2" local function get_disk() local script = [[ diff --git a/home/.config/awesome/signals/init.lua b/home/.config/awesome/signals/init.lua index aab8fe9..1ec4cc8 100644 --- a/home/.config/awesome/signals/init.lua +++ b/home/.config/awesome/signals/init.lua @@ -1,15 +1,15 @@ req = { - "volume", - "brightness", - "wifi", - "bluetooth", - "airplane", + --"volume", + --"brightness", + --"wifi", + --"bluetooth", + --"airplane", "weather", "battery", - "player", - "disk" + --"player", + --"disk" } for _, x in pairs(req) do - require("signals." .. x) + require("signals."..x) end diff --git a/home/.config/awesome/signals/weather.lua b/home/.config/awesome/signals/weather.lua index 422cb4e..a0f1a68 100644 --- a/home/.config/awesome/signals/weather.lua +++ b/home/.config/awesome/signals/weather.lua @@ -6,25 +6,25 @@ local awful = require("awful") local gears = require("gears") -local city = "Toulouse" -- Ex. London or Salt+Lake+City +local city = "" -- Ex. London or Salt+Lake+City ---local get_weather = function() --- local script = [[ --- bash -c "$HOME/.config/awesome/signals/weather_script.sh ]] .. city .. [[" --- ]] +local get_weather = function() + local script = [[ + bash -c "$HOME/.config/awesome/signals/weather_script.sh ]] .. city.. [[" + ]] --- 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 + 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 ---} +gears.timer { + timeout = 1200, + call_now = true, + autostart = true, + callback = function() + get_weather() + end +} diff --git a/home/.config/awesome/themes/icons/other/pfp-3.jpg b/home/.config/awesome/themes/icons/other/pfp-3.jpg new file mode 100644 index 0000000..b778664 Binary files /dev/null and b/home/.config/awesome/themes/icons/other/pfp-3.jpg differ diff --git a/home/.config/awesome/themes/icons/other/pfp.jpg b/home/.config/awesome/themes/icons/other/pfp.jpg index b778664..e02ac26 100644 Binary files a/home/.config/awesome/themes/icons/other/pfp.jpg and b/home/.config/awesome/themes/icons/other/pfp.jpg differ diff --git a/home/.config/awesome/themes/init.lua b/home/.config/awesome/themes/init.lua index 26107f0..3b44d05 100644 --- a/home/.config/awesome/themes/init.lua +++ b/home/.config/awesome/themes/init.lua @@ -14,248 +14,208 @@ local dpi = xresources.apply_dpi -- Theme Dir : -local themes_path = os.getenv("HOME") .. "/.config/awesome/themes/" +local themes_path = os.getenv("HOME") .. "/.config/awesome/themes/" -- Titlebar Dir : -local titlebar_theme = "mac" -local titlebar_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/icons/titlebar/" .. titlebar_theme .. "/" -local tip = titlebar_icon_path +local titlebar_theme = "mac" +local titlebar_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/icons/titlebar/" .. titlebar_theme .. "/" +local tip = titlebar_icon_path -- Layout Dir : -local layout_icons = "base" -local layout_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/icons/layouts/" .. layout_icons .. "/" -local lip = layout_icon_path +local layout_icons = "base" +local layout_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/icons/layouts/" .. layout_icons .. "/" +local lip = layout_icon_path -- others Icons : -local other_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/icons/other/" -local oip = other_icon_path +local other_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/icons/other/" +local oip = other_icon_path -local otis_forest = require("themes.schemes.otis-forest") -local doom = require("themes.schemes.doom-one") -local gruvbox = require("themes.schemes.gruvbox-dark") -local berry = require("themes.schemes.berry") -local matcha_sea = require("themes.schemes.matcha-sea") -local matcha_azul = require("themes.schemes.matcha-azul") -local matcha_aliz = require("themes.schemes.matcha-aliz") -local catppuccin_macchiato = require("themes.schemes.catppuccin-macchiato") +local otis_forest = require ("themes.schemes.otis-forest") +local doom = require ("themes.schemes.doom-one") +local gruvbox = require ("themes.schemes.gruvbox-dark") +local berry = require ("themes.schemes.berry") +local matcha_sea = require ("themes.schemes.matcha-sea") +local matcha_azul = require ("themes.schemes.matcha-azul") +local matcha_aliz = require ("themes.schemes.matcha-aliz") + -- ## Don''t change the line number 😊 -colors = catppuccin_macchiato +colors = gruvbox -- ############# -theme = {} +theme = {} -- # Fonts : --theme.font = "iosevka Extended Bold 11" --theme.font = "JetBrains Mono Bold 10" --theme.font = "JetBrainsMono Nerd Font Bold 10" --theme.font = "RobotoMono Nerd Font Bold 11" -theme.font = "Google Sans Bold 11" -theme.switcher_font = "Google Sans Bold 12" -theme.taglist_font = "Font Awesome 6 Free Solid 16" -theme.icon_font = "Font Awesome 6 Free Solid 11" -theme.sidebar_font = "Font Awesome 6 Free Solid 16" -theme.ui_font = "RobotoMono Nerd Font Medium 16" -theme.menu_font = "RobotoMono Nerd Font Bold 11" +theme.font = "Roboto Regular 12" +--theme.taglist_font = "Font Awesome 6 Free Solid 16" +theme.taglist_font = "RobotoMono Nerd Font Medium 16" +theme.icon_font = "Font Awesome 6 Free Solid 12" +theme.sidebar_font = "Font Awesome 6 Free Solid 16" +theme.ui_font = "RobotoMono Nerd Font Medium 16" +theme.menu_font = "RobotoMono Nerd Font 11" -- # Background Colors : -theme.bg_normal = colors.black -theme.bg_focus = colors.brightblack -theme.bg_urgent = colors.black -theme.bg_minimize = colors.black +theme.bg_normal = colors.black +theme.bg_focus = colors.brightblack +theme.bg_urgent = colors.black +theme.bg_minimize = colors.black -- # Foreground Colors : -theme.fg_normal = colors.brightwhite -theme.fg_focus = colors.brightwhite -theme.fg_urgent = colors.brightred -theme.fg_minimize = colors.brightblack +theme.fg_normal = colors.brightwhite +theme.fg_focus = colors.brightwhite +theme.fg_urgent = colors.brightred +theme.fg_minimize = colors.brightblack --- Systray --theme.bg_systray = colors.container -theme.systray_icon_spacing = dpi(12) +theme.systray_icon_spacing = dpi(12) -- Taglist : -theme.taglist_spacing = dpi(8) -theme.taglist_bg_focus = colors.container -theme.taglist_bg_urgent = colors.container -theme.taglist_bg_empty = colors.container -theme.taglist_fg_focus = colors.main_scheme -theme.taglist_fg_empty = colors.brightblack -theme.taglist_fg_urgent = colors.brightred +theme.taglist_spacing = dpi(8) +theme.taglist_bg_focus = colors.container +theme.taglist_bg_urgent = colors.container +theme.taglist_bg_empty = colors.container +theme.taglist_fg_focus = colors.main_scheme +theme.taglist_fg_empty = colors.brightblack +theme.taglist_fg_urgent = colors.brightred -- Clients : -theme.useless_gap = dpi(4) -theme.gap_single_client = true -theme.rounded = dpi(8) -theme.border_width = dpi(2) -theme.border_normal = colors.black -theme.border_focus = colors.main_scheme -theme.border_marked = colors.brightblack +theme.useless_gap = dpi(4) +theme.gap_single_client = true +theme.rounded = dpi(8) +theme.border_width = dpi(2) +theme.border_normal = colors.black +theme.border_focus = colors.main_scheme +theme.border_marked = colors.brightblack -- Tasklist : -theme.tasklist_bg_normal = colors.black -theme.tasklist_bg_focus = colors.black -theme.tasklist_bg_urgent = colors.green -theme.tasklist_plain_task_name = true -theme.tasklist_disable_task_name = false -theme.tasklist_disable_icon = true +theme.tasklist_bg_normal = colors.black +theme.tasklist_bg_focus = colors.black +theme.tasklist_bg_urgent = colors.green +theme.tasklist_plain_task_name = true +theme.tasklist_disable_task_name = false +theme.tasklist_disable_icon = true -- Notification : -theme.notification_spacing = 20 +theme.notification_spacing = 20 -- Menu : -theme.submenu = " " -theme.menu_bg_normal = colors.black -theme.menu_bg_focus = colors.brightblack -theme.menu_border_color = colors.black -theme.menu_height = dpi(30) -theme.menu_width = dpi(180) +theme.submenu = " " +theme.menu_bg_normal = colors.black +theme.menu_bg_focus = colors.brightblack +theme.menu_border_color = colors.black +theme.menu_height = dpi(30) +theme.menu_width = dpi(180) -- Icons : -theme.icon_theme = "/usr/share/icons/Papirus-Dark/16x16/apps" -theme.awesome_icon = oip .. "logoarch.png" -theme.pfp = oip .. "pfp.jpg" -theme.album_art = oip .. "album-art.png" -theme.user = string.gsub(os.getenv('USER'), '^%l', string.upper) -theme.hostname = "@Neptune" -theme.weather_icon = oip .. "weather_icon.png" +theme.icon_theme = "/usr/share/icons/Papirus-Dark/16x16/apps" +theme.awesome_icon = oip .."logoarch.png" +theme.pfp = oip .. "pfp.jpg" +theme.album_art = oip .. "album-art.png" +theme.user = string.gsub(os.getenv('USER'), '^%l', string.upper) +theme.hostname = "@Neptune" +theme.weather_icon = oip .."weather_icon.png" -- Titlebar : -theme.titlebar_size = dpi(20) -theme.titlebar_position = "left" -theme.titlebar_bg_focus = colors.black -theme.titlebar_bg_normal = colors.black -theme.titlebar_fg_normal = colors.white -theme.titlebar_fg_focus = colors.brightwhite +theme.titlebar_size = dpi(20) +theme.titlebar_position = "left" +theme.titlebar_bg_focus = colors.black +theme.titlebar_bg_normal = colors.black +theme.titlebar_fg_normal = colors.white +theme.titlebar_fg_focus = colors.brightwhite -- Close Button : -theme.titlebar_close_button_normal = tip .. "close_normal.svg" -theme.titlebar_close_button_focus = tip .. "close_focus.svg" +theme.titlebar_close_button_normal = tip.."close_normal.svg" +theme.titlebar_close_button_focus = tip.."close_focus.svg" -- Minimize Button : -theme.titlebar_minimize_button_normal = tip .. "minimize_normal.svg" -theme.titlebar_minimize_button_focus = tip .. "minimize_focus.svg" +theme.titlebar_minimize_button_normal = tip.."minimize_normal.svg" +theme.titlebar_minimize_button_focus = tip.."minimize_focus.svg" -- Ontop Button : -theme.titlebar_ontop_button_normal_inactive = tip .. "ontop_normal_inactive.svg" -theme.titlebar_ontop_button_focus_inactive = tip .. "ontop_focus_inactive.svg" -theme.titlebar_ontop_button_normal_active = tip .. "ontop_normal_active.svg" -theme.titlebar_ontop_button_focus_active = tip .. "ontop_focus_active.svg" +theme.titlebar_ontop_button_normal_inactive = tip.."ontop_normal_inactive.svg" +theme.titlebar_ontop_button_focus_inactive = tip.."ontop_focus_inactive.svg" +theme.titlebar_ontop_button_normal_active = tip.."ontop_normal_active.svg" +theme.titlebar_ontop_button_focus_active = tip.."ontop_focus_active.svg" -- Sticky Button : -theme.titlebar_sticky_button_normal_inactive = tip .. "sticky_normal_inactive.svg" -theme.titlebar_sticky_button_focus_inactive = tip .. "sticky_focus_inactive.svg" -theme.titlebar_sticky_button_normal_active = tip .. "sticky_normal_active.svg" -theme.titlebar_sticky_button_focus_active = tip .. "sticky_focus_active.svg" +theme.titlebar_sticky_button_normal_inactive = tip.."sticky_normal_inactive.svg" +theme.titlebar_sticky_button_focus_inactive = tip.."sticky_focus_inactive.svg" +theme.titlebar_sticky_button_normal_active = tip.."sticky_normal_active.svg" +theme.titlebar_sticky_button_focus_active = tip.."sticky_focus_active.svg" -- Floating Button : -theme.titlebar_floating_button_normal_inactive = tip .. "floating_normal_inactive.svg" -theme.titlebar_floating_button_focus_inactive = tip .. "floating_focus_inactive.svg" -theme.titlebar_floating_button_normal_active = tip .. "floating_normal_active.svg" -theme.titlebar_floating_button_focus_active = tip .. "titlebar/stoplight/floating_focus_active.svg" +theme.titlebar_floating_button_normal_inactive = tip.."floating_normal_inactive.svg" +theme.titlebar_floating_button_focus_inactive = tip.."floating_focus_inactive.svg" +theme.titlebar_floating_button_normal_active = tip.."floating_normal_active.svg" +theme.titlebar_floating_button_focus_active = tip.."titlebar/stoplight/floating_focus_active.svg" -- Maximized Button : -theme.titlebar_maximized_button_normal_inactive = tip .. "maximized_normal_inactive.svg" -theme.titlebar_maximized_button_focus_inactive = tip .. "maximized_focus_inactive.svg" -theme.titlebar_maximized_button_normal_active = tip .. "maximized_normal_active.svg" -theme.titlebar_maximized_button_focus_active = tip .. "maximized_focus_active.svg" +theme.titlebar_maximized_button_normal_inactive = tip.."maximized_normal_inactive.svg" +theme.titlebar_maximized_button_focus_inactive = tip.."maximized_focus_inactive.svg" +theme.titlebar_maximized_button_normal_active = tip.."maximized_normal_active.svg" +theme.titlebar_maximized_button_focus_active = tip.."maximized_focus_active.svg" -- Hovered Close Button -theme.titlebar_close_button_normal_hover = tip .. "close_normal_hover.svg" -theme.titlebar_close_button_focus_hover = tip .. "close_focus_hover.svg" +theme.titlebar_close_button_normal_hover = tip.. "close_normal_hover.svg" +theme.titlebar_close_button_focus_hover = tip.. "close_focus_hover.svg" -- Hovered Minimize Buttin -theme.titlebar_minimize_button_normal_hover = tip .. "minimize_normal_hover.svg" -theme.titlebar_minimize_button_focus_hover = tip .. "minimize_focus_hover.svg" +theme.titlebar_minimize_button_normal_hover = tip.. "minimize_normal_hover.svg" +theme.titlebar_minimize_button_focus_hover = tip.. "minimize_focus_hover.svg" -- Hovered Ontop Button -theme.titlebar_ontop_button_normal_inactive_hover = tip .. "ontop_normal_inactive_hover.svg" -theme.titlebar_ontop_button_focus_inactive_hover = tip .. "ontop_focus_inactive_hover.svg" -theme.titlebar_ontop_button_normal_active_hover = tip .. "ontop_normal_active_hover.svg" -theme.titlebar_ontop_button_focus_active_hover = tip .. "ontop_focus_active_hover.svg" +theme.titlebar_ontop_button_normal_inactive_hover = tip.. "ontop_normal_inactive_hover.svg" +theme.titlebar_ontop_button_focus_inactive_hover = tip.. "ontop_focus_inactive_hover.svg" +theme.titlebar_ontop_button_normal_active_hover = tip.. "ontop_normal_active_hover.svg" +theme.titlebar_ontop_button_focus_active_hover = tip.. "ontop_focus_active_hover.svg" -- Hovered Sticky Button -theme.titlebar_sticky_button_normal_inactive_hover = tip .. "sticky_normal_inactive_hover.svg" -theme.titlebar_sticky_button_focus_inactive_hover = tip .. "sticky_focus_inactive_hover.svg" -theme.titlebar_sticky_button_normal_active_hover = tip .. "sticky_normal_active_hover.svg" -theme.titlebar_sticky_button_focus_active_hover = tip .. "sticky_focus_active_hover.svg" +theme.titlebar_sticky_button_normal_inactive_hover = tip.. "sticky_normal_inactive_hover.svg" +theme.titlebar_sticky_button_focus_inactive_hover = tip.. "sticky_focus_inactive_hover.svg" +theme.titlebar_sticky_button_normal_active_hover = tip.. "sticky_normal_active_hover.svg" +theme.titlebar_sticky_button_focus_active_hover = tip.. "sticky_focus_active_hover.svg" -- Hovered Floating Button -theme.titlebar_floating_button_normal_inactive_hover = tip .. "floating_normal_inactive_hover.svg" -theme.titlebar_floating_button_focus_inactive_hover = tip .. "floating_focus_inactive_hover.svg" -theme.titlebar_floating_button_normal_active_hover = tip .. "floating_normal_active_hover.svg" -theme.titlebar_floating_button_focus_active_hover = tip .. "floating_focus_active_hover.svg" +theme.titlebar_floating_button_normal_inactive_hover = tip.. "floating_normal_inactive_hover.svg" +theme.titlebar_floating_button_focus_inactive_hover = tip.. "floating_focus_inactive_hover.svg" +theme.titlebar_floating_button_normal_active_hover = tip.. "floating_normal_active_hover.svg" +theme.titlebar_floating_button_focus_active_hover = tip.. "floating_focus_active_hover.svg" -- Hovered Maximized Button -theme.titlebar_maximized_button_normal_inactive_hover = tip .. "maximized_normal_inactive_hover.svg" -theme.titlebar_maximized_button_focus_inactive_hover = tip .. "maximized_focus_inactive_hover.svg" -theme.titlebar_maximized_button_normal_active_hover = tip .. "maximized_normal_active_hover.svg" -theme.titlebar_maximized_button_focus_active_hover = tip .. "maximized_focus_active_hover.svg" +theme.titlebar_maximized_button_normal_inactive_hover = tip.. "maximized_normal_inactive_hover.svg" +theme.titlebar_maximized_button_focus_inactive_hover = tip.. "maximized_focus_inactive_hover.svg" +theme.titlebar_maximized_button_normal_active_hover = tip.. "maximized_normal_active_hover.svg" +theme.titlebar_maximized_button_focus_active_hover = tip.. "maximized_focus_active_hover.svg" -- Layoutbox icons : -theme.layout_fairh = gcolor.recolor_image(lip .. "fairh.png", colors.main_scheme) -theme.layout_fairv = gcolor.recolor_image(lip .. "fairv.png", colors.main_scheme) -theme.layout_floating = gcolor.recolor_image(lip .. "floating.png", colors.main_scheme) -theme.layout_magnifier = gcolor.recolor_image(lip .. "magnifier.png", colors.main_scheme) -theme.layout_max = gcolor.recolor_image(lip .. "max.png", colors.main_scheme) -theme.layout_fullscreen = gcolor.recolor_image(lip .. "fullscreen.png", colors.main_scheme) -theme.layout_tilebottom = gcolor.recolor_image(lip .. "tilebottom.png", colors.main_scheme) -theme.layout_tileleft = gcolor.recolor_image(lip .. "tileleft.png", colors.main_scheme) -theme.layout_tile = gcolor.recolor_image(lip .. "tile.png", colors.main_scheme) -theme.layout_tiletop = gcolor.recolor_image(lip .. "tiletop.png", colors.main_scheme) -theme.layout_spiral = gcolor.recolor_image(lip .. "spiral.png", colors.main_scheme) -theme.layout_dwindle = gcolor.recolor_image(lip .. "dwindle.png", colors.main_scheme) -theme.layout_cornernw = gcolor.recolor_image(lip .. "cornernw.png", colors.main_scheme) -theme.layout_cornerne = gcolor.recolor_image(lip .. "cornerne.png", colors.main_scheme) -theme.layout_cornersw = gcolor.recolor_image(lip .. "cornersw.png", colors.main_scheme) +theme.layout_fairh = gcolor.recolor_image(lip.. "fairh.png", colors.main_scheme) +theme.layout_fairv = gcolor.recolor_image(lip.. "fairv.png", colors.main_scheme) +theme.layout_floating = gcolor.recolor_image(lip.. "floating.png", colors.main_scheme) +theme.layout_magnifier = gcolor.recolor_image(lip.. "magnifier.png", colors.main_scheme) +theme.layout_max = gcolor.recolor_image(lip.. "max.png", colors.main_scheme) +theme.layout_fullscreen = gcolor.recolor_image(lip.. "fullscreen.png", colors.main_scheme) +theme.layout_tilebottom = gcolor.recolor_image(lip.. "tilebottom.png", colors.main_scheme) +theme.layout_tileleft = gcolor.recolor_image(lip.. "tileleft.png", colors.main_scheme) +theme.layout_tile = gcolor.recolor_image(lip.. "tile.png", colors.main_scheme) +theme.layout_tiletop = gcolor.recolor_image(lip.. "tiletop.png", colors.main_scheme) +theme.layout_spiral = gcolor.recolor_image(lip.. "spiral.png", colors.main_scheme) +theme.layout_dwindle = gcolor.recolor_image(lip.. "dwindle.png", colors.main_scheme) +theme.layout_cornernw = gcolor.recolor_image(lip.. "cornernw.png", colors.main_scheme) +theme.layout_cornerne = gcolor.recolor_image(lip.. "cornerne.png", colors.main_scheme) +theme.layout_cornersw = gcolor.recolor_image(lip.. "cornersw.png", colors.main_scheme) -- Bling : -theme.layout_mstab = gcolor.recolor_image(lip .. "mstab.png", colors.main_scheme) -theme.layout_vertical = gcolor.recolor_image(lip .. "vertical.png", colors.main_scheme) -theme.layout_horizontal = gcolor.recolor_image(lip .. "horizontal.png", colors.main_scheme) -theme.layout_centered = gcolor.recolor_image(lip .. "centered.png", colors.main_scheme) -theme.layout_equalarea = gcolor.recolor_image(lip .. "equalarea.png", colors.main_scheme) -theme.layout_deck = gcolor.recolor_image(lip .. "deck.png", colors.main_scheme) - --- Bling window switcher : -theme.window_switcher_widget_bg = colors.container -- The bg color of the widget -theme.window_switcher_widget_border_width = 3 -- The border width of the widget -theme.window_switcher_widget_border_radius = 0 -- The border radius of the widget -theme.window_switcher_widget_border_color = colors.main_scheme -- The border color of the widget -theme.window_switcher_clients_spacing = 10 -- The space between each client item -theme.window_switcher_client_icon_horizontal_spacing = 5 -- The space between client icon and text -theme.window_switcher_client_width = 250 -- The width of one client widget -theme.window_switcher_client_height = 250 -- The height of one client widget -theme.window_switcher_client_margins = 10 -- The margin between the content and the border of the widget -theme.window_switcher_thumbnail_margins = 10 -- The margin between one client thumbnail and the rest of the widget -theme.thumbnail_scale = true -- If set to true, the thumbnails fit policy will be set to "fit" instead of "auto" -theme.window_switcher_name_margins = 10 -- The margin of one clients title to the rest of the widget -theme.window_switcher_name_valign = "center" -- How to vertically align one clients title -theme.window_switcher_name_forced_width = 200 -- The width of one title -theme.window_switcher_name_font = theme.switcher_font -- The font of all titles -theme.window_switcher_name_normal_color = colors -.white -- The color of one title if the client is unfocused -theme.window_switcher_name_focus_color = colors -.main_scheme -- The color of one title if the client is focused -theme.window_switcher_icon_valign = "center" -- How to vertically align the one icon -theme.window_switcher_icon_width = 0 -- - -theme.task_preview_widget_border_radius = 5 -- Border radius of the widget (With AA) -theme.task_preview_widget_bg = colors.container -- The bg color of the widget -theme.task_preview_widget_border_color = colors.container -- The border color of the widget -theme.task_preview_widget_border_width = 3 -- The border width of the widget -theme.task_preview_widget_margin = 10 - -theme.tag_preview_widget_border_radius = 5 -- Border radius of the widget (With AA) -theme.tag_preview_client_border_radius = 5 -- Border radius of each client in the widget (With AA) -theme.tag_preview_client_opacity = 0.5 -- Opacity of each client -theme.tag_preview_client_bg = colors.container -- The bg color of each client -theme.tag_preview_client_border_color = colors.main_scheme -- The border color of each client -theme.tag_preview_client_border_width = 3 -- The border width of each client -theme.tag_preview_widget_bg = colors.container -- The bg color of the widget -theme.tag_preview_widget_border_color = "#ffffff" -- The border color of the widget -theme.tag_preview_widget_border_width = 2 -- The border width of the widget -theme.tag_preview_widget_margin = 10 -- The margin of the widget +theme.layout_mstab = gcolor.recolor_image(lip.. "mstab.png", colors.main_scheme) +theme.layout_vertical = gcolor.recolor_image(lip.. "vertical.png", colors.main_scheme) +theme.layout_horizontal = gcolor.recolor_image(lip.. "horizontal.png", colors.main_scheme) +theme.layout_centered = gcolor.recolor_image(lip.. "centered.png", colors.main_scheme) +theme.layout_equalarea = gcolor.recolor_image(lip.. "equalarea.png", colors.main_scheme) +theme.layout_deck = gcolor.recolor_image(lip.. "deck.png", colors.main_scheme) return theme diff --git a/home/.config/awesome/themes/schemes/catppuccin-macchiato.lua b/home/.config/awesome/themes/schemes/catppuccin-macchiato.lua deleted file mode 100644 index 8bbfa20..0000000 --- a/home/.config/awesome/themes/schemes/catppuccin-macchiato.lua +++ /dev/null @@ -1,27 +0,0 @@ --- Colors : -colors = {} --- Dark colors -colors.black = "#181926" -colors.red = "#ed8796" -colors.green = "#a6da95" -colors.yellow = "#f5a97f" -colors.blue = "#8aadf4" -colors.magenta = "#c6a0f6" -colors.cyan = "#91d7e3" -colors.white = "#cad3f5" --- Bright colors -colors.brightblack = "#24273a" -colors.brightred = "#ee99a0" -colors.brightgreen = "#8bd5ca" -colors.brightyellow = "#eed49f" -colors.brightblue = "#b7bdf8" -colors.brightmagenta = "#f5bde6" -colors.brightcyan = "#7dc4e4" -colors.brightwhite = "#a5adcb" --- Other -colors.transparent = "#00000000" -colors.container = "#1e2030" -colors.main_scheme = "#f4dbd6" -colors.main_transparent = "#262626CC" - -return colors diff --git a/home/.config/awesome/themes/schemes/gruvbox-dark.lua b/home/.config/awesome/themes/schemes/gruvbox-dark.lua index 363895d..6e77e30 100644 --- a/home/.config/awesome/themes/schemes/gruvbox-dark.lua +++ b/home/.config/awesome/themes/schemes/gruvbox-dark.lua @@ -1,27 +1,27 @@ -- Colors : -colors = {} +colors = {} -- Dark colors -colors.black = "#222222" -colors.red = "#cc241d" -colors.green = "#98971a" -colors.yellow = "#d79921" -colors.blue = "#458588" -colors.magenta = "#b16286" -colors.cyan = "#689d6a" -colors.white = "#acacac" +colors.black = "#222222" +colors.red = "#cc241d" +colors.green = "#98971a" +colors.yellow = "#d79921" +colors.blue = "#458588" +colors.magenta = "#b16286" +colors.cyan = "#689d6a" +colors.white = "#acacac" -- Bright colors -colors.brightblack = "#333333" -colors.brightred = "#fb4934" -colors.brightgreen = "#b8bb26" -colors.brightyellow = "#fabd2f" -colors.brightblue = "#83a598" -colors.brightmagenta = "#d3869b" -colors.brightcyan = "#8ec07c" -colors.brightwhite = "#dfdfdf" +colors.brightblack = "#333333" +colors.brightred = "#fb4934" +colors.brightgreen = "#b8bb26" +colors.brightyellow = "#fabd2f" +colors.brightblue = "#83a598" +colors.brightmagenta = "#d3869b" +colors.brightcyan = "#8ec07c" +colors.brightwhite = "#dfdfdf" -- Other -colors.transparent = "#00000000" -colors.container = "#303030" -colors.main_scheme = "#458588" -colors.main_transparent = "#303030CC" +colors.transparent = "#00000000" +colors.container = "#303030" +colors.main_scheme = "#458588" +colors.main_transparent = "#262626CC" return colors diff --git a/home/.config/awesome/themes/schemes/matcha-sea.lua b/home/.config/awesome/themes/schemes/matcha-sea.lua index 455036d..e6ff9c9 100644 --- a/home/.config/awesome/themes/schemes/matcha-sea.lua +++ b/home/.config/awesome/themes/schemes/matcha-sea.lua @@ -1,27 +1,27 @@ -- Colors : -colors = {} +colors = {} -- Dark colors -colors.black = "#1B2224" -colors.red = "#a54242" -colors.green = "#8c9440" -colors.yellow = "#de935f" -colors.blue = "#548D91" -colors.magenta = "#85678f" -colors.cyan = "#5e8d87" -colors.white = "#acacac" +colors.black = "#1B2224" +colors.red = "#a54242" +colors.green = "#8c9440" +colors.yellow = "#de935f" +colors.blue = "#548D91" +colors.magenta = "#85678f" +colors.cyan = "#5e8d87" +colors.white = "#acacac" -- Bright colors -colors.brightblack = "#263033" -colors.brightred = "#cc6666" -colors.brightgreen = "#b5bd68" -colors.brightyellow = "#f0c674" -colors.brightblue = "#81a2be" -colors.brightmagenta = "#b294bb" -colors.brightcyan = "#8abeb7" -colors.brightwhite = "#c5c8c6" +colors.brightblack = "#263033" +colors.brightred = "#cc6666" +colors.brightgreen = "#b5bd68" +colors.brightyellow = "#f0c674" +colors.brightblue = "#81a2be" +colors.brightmagenta = "#b294bb" +colors.brightcyan = "#8abeb7" +colors.brightwhite = "#c5c8c6" -- Other -colors.transparent = "#00000000" -colors.container = "#222B2E" -colors.main_scheme = "#2F9B85" -colors.main_transparent = "#1A2123CC" +colors.transparent = "#00000000" +colors.container = "#222B2E" +colors.main_scheme = "#2F9B85" +colors.main_transparent = "#1A2123CC" return colors diff --git a/home/.config/awesome/ui/bar/init.lua b/home/.config/awesome/ui/bar/init.lua index 0873a81..52ece71 100644 --- a/home/.config/awesome/ui/bar/init.lua +++ b/home/.config/awesome/ui/bar/init.lua @@ -23,10 +23,6 @@ mylauncher = wibox.container.margin(mylauncher, dpi(0), dpi(0), dpi(6), dpi(6)) -- # Widgets : -- ~~~~~~~~~~~ --- # Sidebar button : -local sidebar_button = require('ui.widgets.sidebar_button') --- # notifications_list button : -local notifications_list_button = require('ui.widgets.notifications_list_button') -- # Systray : local systray = require('ui.widgets.systray') -- # Clock : @@ -42,7 +38,6 @@ local temprature_widget = require('ui.widgets.temprature') -- # Launcher : local launcher = require('ui.widgets.launcher') - -- # Status widgets : local status_widgets = wibox.widget { { @@ -57,14 +52,15 @@ local status_widgets = wibox.widget { -- # Keybord : keyboard_widget, -- # Clock : - clock_widget, - spacing = dpi(20), + clock_widget, + spacing = dpi(15), layout = wibox.layout.fixed.horizontal, }, margins = {top = dpi(4), bottom = dpi(4)}, widget = wibox.container.margin, } + -- Bar : local function get_bar(s) -- Create the wibox @@ -76,59 +72,52 @@ local function get_bar(s) visible = true, height = dpi(42), width = s.geometry.width, - --width = s.geometry.width - dpi(120), + --width = s.geometry.width - dpi(20), screen = s, bg = colors.black, --bg = colors.main_transparent, --bg = colors.transparent, --opacity = 0.85, }) - - --awful.placement.bottom(s.mywibar, { margins = theme.useless_gap * 1 }) - --s.mywibar:struts { bottom = dpi(45), top = dpi(0), left = dpi(0), right = dpi(0) } + + --awful.placement.bottom(s.mywibar, { margins = theme.useless_gap * 2 }) + --s.mywibar:struts { bottom = dpi(50), top = dpi(5)} -- Bar setup : s.mywibar:setup { { { { - { - launcher, - taglist(s), - --tasklist(s), - spacing = dpi(10), - layout = wibox.layout.fixed.horizontal - }, - --nil, - -- # Tasks in middel : - { - tasklist(s), - --clock_widget, - layout = wibox.layout.fixed.horizontal - }, - { - status_widgets, - systray, - sidebar_button, - layoutbox(s), - notifications_list_button, - layout = wibox.layout.fixed.horizontal, - spacing = dpi(10) - }, - layout = wibox.layout.align.horizontal, - expand = "none" + launcher, + taglist(s), + --tasklist(s), + spacing = dpi(10), + layout = wibox.layout.fixed.horizontal }, - widget = wibox.container.margin, - margins = {left = dpi(15), right = dpi(15), top = dpi(2), bottom = dpi(2)} + --nil, + -- # Tasks in middel : + { + tasklist(s), + layout = wibox.layout.fixed.horizontal + }, + { + status_widgets, + systray, + layoutbox(s), + layout = wibox.layout.fixed.horizontal, + spacing = dpi(10) + }, + layout = wibox.layout.align.horizontal, + expand = "none" }, - widget = wibox.container.background, - bg = colors.bg_color, - forced_height = s.mywibar.height + widget = wibox.container.margin, + margins = {left = dpi(15), right = dpi(15), top = dpi(0), bottom = dpi(0)} }, layout = wibox.layout.fixed.vertical, spacing = dpi(10) } + -- function to remove the bar in maxmized/fullscreen apps local function remove_wibar(c) if c.fullscreen or c.maximized then @@ -143,8 +132,8 @@ local function get_bar(s) c.screen.mywibar.visible = true end end - --client.connect_signal("property::fullscreen", remove_wibar) - --client.connect_signal("request::unmanage", add_wibar) + client.connect_signal("property::fullscreen", remove_wibar) + client.connect_signal("request::unmanage", add_wibar) end diff --git a/home/.config/awesome/ui/bar/layoutbox.lua b/home/.config/awesome/ui/bar/layoutbox.lua index ee0e171..d28f22a 100644 --- a/home/.config/awesome/ui/bar/layoutbox.lua +++ b/home/.config/awesome/ui/bar/layoutbox.lua @@ -21,6 +21,6 @@ return function(s) awful.button({ }, 5, function () awful.layout.inc( 1) end), } } - layoutbox = wibox.container.margin(layoutbox, dpi(4), dpi(4), dpi(10), dpi(10)) + layoutbox = wibox.container.margin(layoutbox, dpi(2), dpi(2), dpi(11), dpi(11)) return layoutbox end diff --git a/home/.config/awesome/ui/bar/taglist.lua b/home/.config/awesome/ui/bar/taglist.lua index 5ec7b62..8b0c4b5 100644 --- a/home/.config/awesome/ui/bar/taglist.lua +++ b/home/.config/awesome/ui/bar/taglist.lua @@ -9,127 +9,117 @@ local wibox = require("wibox") local beautiful = require("beautiful") local xresources = require("beautiful.xresources") local dpi = xresources.apply_dpi -local naughty = require("naughty") -- # Libs : -- ~~~~~~~~ local helpers = require("libs.helpers") -- Tags : -awful.util.tagnames = { "1", "2", "3", "4", "5", "6", "7", "8", "9" } +--awful.util.tagnames = { "1", "2", "3", "4", "5", "6", "7", "8", "9" } --awful.util.tagnames = { "", "", "", "", "", "", "", "", ""} -- font size : 14 ---awful.util.tagnames = { "", "", "", "", "", "", "", "", "" } +awful.util.tagnames = {"", "", "", "", "", "", "", "", ""} -- Each screen has its own tag table. screen.connect_signal("request::desktop_decoration", function(s) awful.tag(awful.util.tagnames, s, awful.layout.layouts[1]) end) +--local function update_tag(item, tag, index) +-- if tag.selected then +-- item.markup = helpers.colorize_text(" 󰮯 ", colors.main_scheme) +-- elseif tag.urgent then +-- item.markup = helpers.colorize_text("  ", colors.red) +-- elseif #tag:clients() > 0 then +-- item.markup = helpers.colorize_text("  ", colors.white) +-- else +-- item.markup = helpers.colorize_text(" 󱙝 ", colors.white) +-- end +--end + local function update_tag(item, tag, index) - if tag.selected then - item.markup = helpers.colorize_text(" 󰮯 ", colors.main_scheme) - elseif tag.urgent then - item.markup = helpers.colorize_text("  ", colors.red) - elseif #tag:clients() > 0 then - item.markup = helpers.colorize_text("  ", colors.white) - else - item.markup = helpers.colorize_text(" 󱙝 ", colors.white) - end + if tag.selected then + item.markup = helpers.colorize_text("  ", colors.main_scheme) + elseif tag.urgent then + item.markup = helpers.colorize_text("  ", colors.red) + elseif #tag:clients() > 0 then + item.markup = helpers.colorize_text("  ", colors.white) + else + item.markup = helpers.colorize_text("  ", colors.white) + end end -local modkey = "Mod4" return function(s) - -- Taglist buttons - local taglist_buttons = gears.table.join( - awful.button({}, 1, function(t) t:view_only() end), + + -- Taglist buttons + 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({ }, 3, awful.tag.viewtoggle), awful.button({ modkey }, 3, function(t) if client.focus then client.focus:toggle_tag(t) end - end), + end) - awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end), - awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end) + --awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end), + --awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end), ) -- Create a taglist widget local taglist = awful.widget.taglist { - screen = s, - filter = awful.widget.taglist.filter.all, - --filter = function(t) return t.selected or #t:clients() > 0 end, -- Show only used Tags - buttons = taglist_buttons, - layout = { + screen = s, + --filter = awful.widget.taglist.filter.all, + filter = function (t) return t.selected or #t:clients() > 0 end, -- Show only used Tags + buttons = taglist_buttons, + layout = { spacing = dpi(8), layout = wibox.layout.fixed.horizontal, }, - style = { - spacing = dpi(-4), + style = { + spacing = dpi(-2), }, widget_template = { id = "tag", - font = theme.ui_font, + font = theme.taglist_font, widget = wibox.widget.textbox, + create_callback = function(self, c3, index, object) update_tag(self, c3, index) - - self:connect_signal('mouse::enter', function() - -- BLING: Update the widget with the new tag - awesome.emit_signal("bling::tag_preview::update", c3) - -- BLING: Show the widget - awesome.emit_signal("bling::tag_preview::visibility", s, true) - - if self.bg ~= '#ff0000' then - self.backup = self.bg - self.has_backup = true - end - self.bg = '#ff0000' - end) - self:connect_signal('mouse::leave', function() - -- BLING: Turn the widget off - --awesome.emit_signal("bling::tag_preview::visibility", s, false) - - if self.has_backup then self.bg = self.backup end - end) end, - update_callback = function(self, c3, index, object) + + update_callback = function(self, c3, index, object) update_tag(self, c3, index) end } } - - tags = wibox.widget { + + tags = wibox.widget{ { { taglist, top = dpi(0), bottom = dpi(0), - left = dpi(8), - right = dpi(8), + left = dpi(0), + right = dpi(4), widget = wibox.container.margin }, - bg = colors.container, - shape = helpers.rrect(theme.rounded - 4), + bg = colors.black, + shape = helpers.rrect(theme.rounded), widget = wibox.container.background - }, - top = dpi(4), - bottom = dpi(4), + }, + top = dpi(6), + bottom = dpi(6), left = dpi(0), right = dpi(0), widget = wibox.container.margin } - tags:connect_signal('mouse::leave', function() - -- BLING: Turn the widget off - awesome.emit_signal("bling::tag_preview::visibility", s, false) - end) - --return taglist - return tags + return tags end + diff --git a/home/.config/awesome/ui/bar/tasklist.lua b/home/.config/awesome/ui/bar/tasklist.lua index 884960a..0766dbb 100644 --- a/home/.config/awesome/ui/bar/tasklist.lua +++ b/home/.config/awesome/ui/bar/tasklist.lua @@ -14,93 +14,75 @@ local dpi = xresources.apply_dpi -- ~~~~~~~~ local helpers = require("libs.helpers") - return function(s) - -- Tasklist buttons - local tasklist_buttons = gears.table.join( - awful.button({}, 1, function(c) c:activate { context = "tasklist", action = "toggle_minimization" } 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) - ) + + -- Tasklist buttons + local tasklist_buttons = gears.table.join( + awful.button({ }, 1, function (c) c:activate { context = "tasklist", action = "toggle_minimization" } 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) + ) -- Create a tasklist widget - local tasklist = awful.widget.tasklist + local tasklist = awful.widget.tasklist + { + screen = s, + filter = awful.widget.tasklist.filter.currenttags, + buttons = tasklist_buttons, + style = { + font = theme.font, + bg_normal = colors.container, + bg_focus = colors.container, + bg_minimize = colors.black , + shape = helpers.rrect(dpi(4)), + }, + layout = { + spacing = dpi(8), + layout = wibox.layout.fixed.horizontal, + }, + widget_template = { { - screen = s, - filter = awful.widget.tasklist.filter.currenttags, - buttons = tasklist_buttons, - style = { - font = theme.font, - bg_normal = colors.container, - bg_focus = colors.container, - bg_minimize = colors.black, - shape = helpers.rrect(dpi(4)), - }, - layout = { - spacing = dpi(8), - layout = wibox.layout.fixed.horizontal, - }, - widget_template = { - create_callback = function(self, c, index, objects) --luacheck: no unused args - --self:get_children_by_id('clienticon')[1].client = c - - -- BLING: Toggle the popup on hover and disable it off hover - self:connect_signal('mouse::enter', function() - awesome.emit_signal("bling::task_preview::visibility", s, - true, c) - end) - self:connect_signal('mouse::leave', function() - awesome.emit_signal("bling::task_preview::visibility", s, - false, c) - end) - end, + { { { - { - { - id = 'clienticon', - awful.widget.clienticon, - forced_height = dpi(15), - forced_width = dpi(15), - halign = "center", - valign = "center", - widget = wibox.container.place, - }, - margins = dpi(2), - widget = wibox.container.margin, - }, - { - nil, - nil, - { - nil, - { - widget = wibox.container.background, - id = "pointer", - bg = colors.main_scheme, - shape = gears.shape.rounded_bar, - forced_height = dpi(2), - forced_width = dpi(20) - }, - expand = "none", - layout = wibox.layout.align.horizontal - }, - layout = wibox.layout.align.vertical - }, - nil, - layout = wibox.layout.stack, + awful.widget.clienticon, + forced_height = dpi(15), + forced_width = dpi(15), + halign = "center", + valign = "center", + widget = wibox.container.place, }, - forced_width = dpi(40), - id = "background_role", - widget = wibox.container.background, + margins = dpi(2), + widget = wibox.container.margin, }, - top = dpi(4), - bottom = dpi(4), - left = dpi(2), - right = dpi(2), - widget = wibox.container.margin + { + nil, + nil, + { + nil, + { + widget = wibox.container.background, + id = "pointer", + bg = colors.main_scheme, + shape = gears.shape.rounded_bar, + forced_height = dpi(2), + forced_width = dpi(20) + }, + expand = "none", + layout = wibox.layout.align.horizontal + }, + layout = wibox.layout.align.vertical + }, + layout = wibox.layout.stack, }, - } + forced_width = dpi(40), + id = "background_role", + widget = wibox.container.background, + }, + margins = dpi(4), + widget = wibox.container.margin + } + } return tasklist end diff --git a/home/.config/awesome/ui/menu/init.lua b/home/.config/awesome/ui/menu/init.lua index a6ad9da..d3d0143 100644 --- a/home/.config/awesome/ui/menu/init.lua +++ b/home/.config/awesome/ui/menu/init.lua @@ -14,29 +14,29 @@ local hotkeys_popup = require('awful.hotkeys_popup') -- # 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" }, + {" 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 }, + {" Restart", awesome.restart }, + {" Quit", function() awesome.quit() end }, } powermenu = { - { " Lock", function() awful.spawn.with_shell('notify-send "👉 Locking system " && sleep 1 && betterlockscreen -l') end }, - { " Logout", function() awful.spawn.with_shell('notify-send "👉 Loging out " && sleep 1 && loginctl terminate-session ${XDG_SESSION_ID-}') end }, - { " Sleep", function() awful.spawn.with_shell('notify-send "👉 Suspending 鈴" && sleep 1 && systemctl suspend') end }, - { " Hibernate", function() awful.spawn.with_shell('notify-send "👉 Hibernateing " && sleep 1 && systemctl hibernate') end }, - { " Reboot", function() awful.spawn.with_shell('notify-send "👉 Rebooting " && sleep 1 && reboot') end }, - { " Poweroff", function() awful.spawn.with_shell('notify-send "👉 Powering Off " && sleep 1 && poweroff') end }, + {" Lock", function() awful.spawn.with_shell('notify-send "👉 Locking system " && sleep 1 && betterlockscreen -l') end }, + {" Logout", function() awful.spawn.with_shell('notify-send "👉 Loging out " && sleep 1 && loginctl terminate-session ${XDG_SESSION_ID-}') end }, + {" Sleep", function() awful.spawn.with_shell('notify-send "👉 Suspending 鈴" && sleep 1 && systemctl suspend') end }, + {" Hibernate", function() awful.spawn.with_shell('notify-send "👉 Hibernateing " && sleep 1 && systemctl hibernate') end }, + {" Reboot", function() awful.spawn.with_shell('notify-send "👉 Rebooting " && sleep 1 && reboot') end }, + {" Poweroff", function() awful.spawn.with_shell('notify-send "👉 Powering Off " && sleep 1 && poweroff') end }, } mymainmenu = awful.menu( { items = { - { " Awesome", myawesomemenu }, - { " Terminal", terminal }, - { " Power Menu", powermenu } + {" Awesome", myawesomemenu }, + {" Terminal", terminal }, + {" Power Menu", powermenu } } }) diff --git a/home/.config/awesome/ui/notifications-list/init.lua b/home/.config/awesome/ui/notifications-list/init.lua deleted file mode 100644 index b1a7714..0000000 --- a/home/.config/awesome/ui/notifications-list/init.lua +++ /dev/null @@ -1,108 +0,0 @@ --- ## Sidebar ## --- ~~~~~~~~~~~~~ - --- Requirements : --- ~~~~~~~~~~~~~~ -local awful = require("awful") -local gears = require("gears") -local wibox = require("wibox") -local beautiful = require ("beautiful") -local dpi = beautiful.xresources.apply_dpi - --- # Libs : --- ~~~~~~~~ -local helpers = require("libs.helpers") -local rubato = require("libs.rubato") - -local function box_widget(widgets, width, height) - return wibox.widget { - { - { - widgets, - margins = dpi(16), - widget = wibox.container.margin, - }, - forced_width = dpi(width), - forced_height = dpi(height), - shape = helpers.rrect(theme.rounded), - bg = colors.container, - widget = wibox.container.background, - }, - margins = {left = dpi(20), right = dpi(20)}, - widget = wibox.container.margin, - } -end - --- Get widgets -local notifications_list_core = require("ui.notifications-list.list") -local notifications_widget = notifications_list_core.widget - --- Combine some widgets -local notifications = box_widget(notifications_widget, 380, 150) - --- Sidebar -local notifications_list = wibox { - type = "dock", - visible = false, - ontop = true, - width = dpi(420), - height = dpi(836), - y = dpi(8), - bg = theme.bg, - shape = helpers.rrect(18), - -} - --- Sidebar widget setup -notifications_list : setup { - { - notifications, - spacing = dpi(20), - layout = wibox.layout.flex.vertical, - }, - margins = { top = dpi(20), bottom = dpi(20)}, - widget = wibox.container.margin, -} - --- Slide animation -local slide = rubato.timed { - pos = helpers.screen.geometry.height, - rate = 60, - intro = 0.05, - duration = 0.2, - easing = rubato.quadratic, - subscribed = function(pos) - notifications_list.y = helpers.screen.geometry.y + pos - end -} - --- Timer of sidebar's death -notifications_list.timer = gears.timer { - timeout = 0.5, - single_shot = true, - callback = function() - notifications_list.visible = not notifications_list.visible - end -} - --- Toggle function -notifications_list.toggle = function() - if notifications_list.visible then - slide.target = helpers.screen.geometry.y - notifications_list.height - notifications_list.timer:start() - else - slide.target = helpers.screen.geometry.y + dpi(10) - notifications_list.visible = not notifications_list.visible - end - -end -awful.placement.top_right(notifications_list, {honor_workarea = true, margins = beautiful.useless_gap * 3}) - -notifications_list.core = notifications_list_core - --- Get signal to execute the function (if that makes sense) -awesome.connect_signal("notifications_list::toggle", function() - notifications_list.toggle() -end) - -return notifications_list diff --git a/home/.config/awesome/ui/notifications-list/list.lua b/home/.config/awesome/ui/notifications-list/list.lua deleted file mode 100644 index 1910081..0000000 --- a/home/.config/awesome/ui/notifications-list/list.lua +++ /dev/null @@ -1,147 +0,0 @@ --- ## Clock ## --- ~~~~~~~~~~~ - --- Requirements : --- ~~~~~~~~~~~~~~ -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 - -local notifbox_layout = wibox.widget { - layout = wibox.layout.fixed.vertical, - spacing = dpi(7) -} - -local function create_notifcation(n) - 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 Medium 11" - message.align = 'left' - message.markup = n.message - - local icon = wibox.widget { - nil, - { - { - image = n.icon or n.app_icon, - visible = icon_visibility, - widget = wibox.widget.imagebox, - }, - strategy = "max", - width = dpi(30), - height = dpi(30), - 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, - } - - notifbox_layout:insert( - 1, - container - ) -end - -naughty.connect_signal("request::display", function(n) - create_notifcation(n) -end) - -local notif_core = {} - -notif_core.is_read = true - -notif_core.widget = wibox.widget { - { - { - text = "Dismiss all", - halign = "center", - valign = "center", - widget = wibox.widget.textbox - }, - buttons = gears.table.join( - awful.button({}, 1, function() - notifbox_layout:reset() - end) - ), - forced_width = 75, - shape = gears.shape.rounded_bar, - shape_border_width = 1, - shape_border_color = beautiful.bg_highlight, - widget = wibox.container.background - }, - { - notifbox_layout, - layout = wibox.layout.flex.vertical - }, - spacing = dpi(4), - layout = wibox.layout.fixed.vertical, -} - -return notif_core \ No newline at end of file diff --git a/home/.config/awesome/ui/notifications/init.lua b/home/.config/awesome/ui/notifications/init.lua index 7d4c4f3..77885f5 100644 --- a/home/.config/awesome/ui/notifications/init.lua +++ b/home/.config/awesome/ui/notifications/init.lua @@ -7,6 +7,7 @@ local menubar = require("menubar") local awful = require('awful') local wibox = require('wibox') local gears = require('gears') +local ruled = require("ruled") local beautiful = require('beautiful') local dpi = beautiful.xresources.apply_dpi local naughty = require("naughty") @@ -15,138 +16,245 @@ local naughty = require("naughty") -- ~~~~~~~~ local helpers = require("libs.helpers") +-- Defaults naughty.config.defaults.ontop = true naughty.config.defaults.screen = awful.screen.focused() -naughty.config.defaults.timeout = 5 + +naughty.config.defaults.icon_size = dpi(32) naughty.config.defaults.title = "Notification" -naughty.config.defaults.position = "top_right" +naughty.config.defaults.margin = 50 naughty.config.defaults.border_width = 0 +naughty.config.defaults.position = "top_right" +naughty.config.defaults.max_notifications = 5 +naughty.config.icon_dirs = { + "/usr/share/icons/Papirus-Dark/24x24/apps/", + "/usr/share/pixmaps/" +} +naughty.config.icon_formats = {"svg", "png", "jpg", "gif"} -local function create_notifcation(n) - local time = os.date "%H:%M" - local icon_visibility +-- Timeouts +naughty.config.defaults.timeout = 2 +naughty.config.presets.low.timeout = 1 +naughty.config.presets.critical.timeout = 0 - if n.icon == nil then - icon_visibility = false - else - icon_visibility = true - end +-- naughty normal preset +naughty.config.presets.normal = { + font = "Roboto Medium 10", + fg = colors.brightwhite, + bg = colors.container +} - -- 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, - } +-- naughty low preset +naughty.config.presets.low = { + font ="Roboto Medium 10", + fg = colors.brightwhite, + bg = colors.container +} - -- 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, - } +-- naughty critical preset +naughty.config.presets.critical = { + font = "Roboto Bold 12", + fg = colors.brightred, + bg = colors.container, + timeout = 0 +} - local function space_h(length, circumstances) - return wibox.widget { - forced_width = length, - visible = circumstances, - layout = wibox.layout.fixed.horizontal, - } - end +-- apply preset +naughty.config.presets.ok = naughty.config.presets.normal +naughty.config.presets.info = naughty.config.presets.normal +naughty.config.presets.warn = naughty.config.presets.critical - -- 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 Medium 11" - message.align = 'left' - message.markup = n.message - - local icon = wibox.widget { - nil, - { - { - image = n.icon or n.app_icon, - visible = icon_visibility, - widget = wibox.widget.imagebox, - }, - strategy = "max", - width = dpi(30), - height = dpi(30), - 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 = colors.black, - border_width = 0, - shape = helpers.rrect(theme.rounded), - widget_template = { - { - { - { - widget = container, - }, - strategy = "max", - width = dpi(420), - widget = wibox.container.constraint, - }, - strategy = "min", - width = dpi(160), - height = dpi(80), - widget = wibox.container.constraint, - }, - bg = colors.container, - widget = wibox.container.background, - } - } -end +-- ruled notification +ruled.notification.connect_signal("request::rules", function() + ruled.notification.append_rule { + rule = {}, + properties = {screen = awful.screen.preferred, implicit_timeout = 6} + } +end) -- # Error handling : 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 - } + naughty.notification { + urgency = "critical", + title = "Oops, an error happened"..(startup and " during startup!" or "!"), + message = message + } end) +-- connect to each display +-- ~~~~~~~~~~~~~~~~~~~~~~~ naughty.connect_signal("request::display", function(n) - create_notifcation(n) + + -- action widget + local action_widget = { + { + { + id = "text_role", + align = "center", + valign = "center", + font = "Roboto 10", + widget = wibox.widget.textbox + }, + left = dpi(6), + right = dpi(6), + widget = wibox.container.margin + }, + bg = colors.container, + shape = helpers.rrect(dpi(5)), + widget = wibox.container.background + } + -- actions + local actions = wibox.widget { + notification = n, + base_layout = wibox.widget { + spacing = dpi(8), + layout = wibox.layout.flex.horizontal + }, + widget_template = action_widget, + style = {underline_normal = false, underline_selected = true}, + widget = naughty.list.actions + } + + -- image + local image_n = wibox.widget { + { + image = n.icon, + resize = true, + clip_shape = helpers.rrect(theme.rounded), + halign = "center", + valign = "center", + widget = wibox.widget.imagebox, + }, + strategy = "exact", + height = dpi(72), + width = dpi(72), + widget = wibox.container.constraint, + } + + -- title + local title_n = wibox.widget{ + { + { + markup = n.title, + font = "Roboto bold 14", + align = "left", + valign = "center", + widget = wibox.widget.textbox + }, + widget = wibox.container.scroll.horizontal, + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + speed = 50 + }, + margins = {right = 15}, + widget = wibox.container.margin + } + + local message_n = wibox.widget{ + { + { + markup = helpers.colorize_text("" .. n.message .. "", colors.brightwhite), + font = "Roboto Medium 11", + align = "left", + valign = "center", + wrap = "char", + widget = wibox.widget.textbox + }, + layout = wibox.layout.fixed.horizontal + }, + margins = {right = 15}, + widget = wibox.container.margin + } + + -- app name + local app_name_n = wibox.widget{ + markup = helpers.colorize_text(n.app_name, colors.brightwhite), + font = "Roboto Medium 12", + align = "left", + valign = "center", + widget = wibox.widget.textbox + } + + local time_n = wibox.widget{ + { + markup = helpers.colorize_text(os.date "%H:%M", colors.brightwhite), + font = "Roboto Medium 12", + align = "right", + valign = "center", + widget = wibox.widget.textbox + }, + margins = {left = dpi(6)}, + widget = wibox.container.margin + } + + -- extra info + local notif_info = wibox.widget{ + app_name_n, + { + widget = wibox.widget.separator, + shape = gears.shape.circle, + forced_height = dpi(4), + forced_width = dpi(4), + color = colors.brightwhite + }, + time_n, + layout = wibox.layout.fixed.horizontal, + spacing = dpi(7) + } + + -- init + naughty.layout.box { + notification = n, + type = "notification", + bg = colors.container, + shape = helpers.rrect(theme.rounded), + widget_template = { + { + { + { + { + { + { + notif_info, + { + { + title_n, + message_n, + layout = wibox.layout.fixed.vertical, + spacing = dpi(3) + }, + margins = {left = dpi(6)}, + widget = wibox.container.margin + }, + layout = wibox.layout.fixed.vertical, + spacing = dpi(16) + }, + nil, + image_n, + layout = wibox.layout.align.horizontal, + expand = "none" + }, + { + {actions, layout = wibox.layout.fixed.vertical}, + margins = {top = dpi(20)}, + visible = n.actions and #n.actions > 0, + widget = wibox.container.margin + }, + layout = wibox.layout.fixed.vertical, + }, + margins = dpi(18), + widget = wibox.container.margin + }, + strategy = "max", + width = dpi(500), + widget = wibox.container.constraint, + }, + strategy = "min", + width = dpi(200), + height = dpi(80), + widget = wibox.container.constraint, + }, + shape = helpers.rrect(theme.rounded), + widget = wibox.container.background, + }, + } end) diff --git a/home/.config/awesome/ui/sidebar/calendar.lua b/home/.config/awesome/ui/sidebar/calendar.lua index f9ab426..3cd4737 100644 --- a/home/.config/awesome/ui/sidebar/calendar.lua +++ b/home/.config/awesome/ui/sidebar/calendar.lua @@ -16,19 +16,19 @@ local dpi = beautiful.xresources.apply_dpi local styles = {} styles.month = { - bg_color = colors.brightblack, + bg_color = colors.container, fg_color = colors.white, - padding = dpi(3), + padding = dpi(6), } styles.normal = { - bg_color = colors.brightblack, + bg_color = colors.container, fg_color = colors.white, - padding = dpi(3), + padding = dpi(2), } styles.focus = { fg_color = colors.yellow, markup = function(t) return '' .. t .. '' end, - padding = dpi(3), + padding = dpi(2), } styles.header = { fg_color = colors.brightblue, diff --git a/home/.config/awesome/ui/sidebar/init.lua b/home/.config/awesome/ui/sidebar/init.lua index 65ec441..e48bc41 100644 --- a/home/.config/awesome/ui/sidebar/init.lua +++ b/home/.config/awesome/ui/sidebar/init.lua @@ -50,19 +50,19 @@ end -- Get widgets local profile_widget = require("ui.sidebar.profile") -local player_widget = require("ui.sidebar.player") local sliders_widget = require("ui.sidebar.sliders") local weather_widget = require("ui.sidebar.weather") local calendar_widget = require("ui.sidebar.calendar") -local services_widget = require("ui.sidebar.services") +--local player_widget = require("ui.sidebar.player") +--local services_widget = require("ui.sidebar.services") -- Combine some widgets local profile = box_widget(profile_widget, 380, 150) local sliders = box_widget(sliders_widget, 380, 120) local weather = box_widget(weather_widget, 380, 180) -local player = box_widget(player_widget, 380, 150) -local calendar = box_widget(calendar_widget, 380, 330) -local services = box_widget(services_widget, 380, 200) +local calendar = box_widget(calendar_widget, 380, 320) +--local player = box_widget(player_widget, 380, 150) +--local services = box_widget(services_widget, 380, 200) -- Spacing local space = function(height) @@ -94,9 +94,9 @@ sidebar : setup { profile, sliders, weather, - player, - --calendar, - services, + --player, + calendar, + --services, spacing = dpi(20), layout = wibox.layout.fixed.vertical, @@ -105,15 +105,58 @@ sidebar : setup { widget = wibox.container.margin, } +-- Left Side : +-- Slide animation +--local slide = rubato.timed { +-- pos = helpers.screen.geometry.height, +-- rate = 60, +-- intro = 0.2, +-- duration = 0.4, +-- subscribed = function(pos) +-- sidebar.y = helpers.screen.geometry.y + 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 = helpers.screen.geometry.y - sidebar.height +-- sidebar.timer:start() +-- else +-- slide.target = helpers.screen.geometry.y + dpi(10) +-- sidebar.visible = not sidebar.visible +-- end +-- +--end +--awful.placement.top_right(sidebar, {honor_workarea = true, margins = beautiful.useless_gap * 3}) + + +--awful.mouse.append_global_mousebindings({ +-- awful.button({ }, 1, function () sidebar.toggle() end) +--}) +--awful.keyboard.append_global_keybindings({ +-- awful.key({alt}, "c", function() awesome.emit_signal("sidebar::toggle") end), -- Sidebar +--}) + + +-- Right Side : -- Slide animation local slide = rubato.timed { - pos = helpers.screen.geometry.height, + pos = helpers.screen.geometry.x - sidebar.width, rate = 60, - intro = 0.05, - duration = 0.2, - easing = rubato.quadratic, + intro = 0.2, + duration = 0.4, subscribed = function(pos) - sidebar.y = helpers.screen.geometry.y + pos + sidebar.x = helpers.screen.geometry.x + pos end } @@ -129,26 +172,18 @@ sidebar.timer = gears.timer { -- Toggle function sidebar.toggle = function() if sidebar.visible then - slide.target = helpers.screen.geometry.y - sidebar.height + slide.target = helpers.screen.geometry.x - sidebar.width sidebar.timer:start() else - slide.target = helpers.screen.geometry.y + dpi(10) + slide.target = helpers.screen.geometry.x + dpi(10) sidebar.visible = not sidebar.visible end - end -awful.placement.top_right(sidebar, {honor_workarea = true, margins = beautiful.useless_gap * 3}) - ---awful.mouse.append_global_mousebindings({ --- awful.button({ }, 1, function () sidebar.toggle() end) ---}) ---awful.keyboard.append_global_keybindings({ --- awful.key({alt}, "c", function() awesome.emit_signal("sidebar::toggle") end), -- Sidebar ---}) +awful.placement.top_left(sidebar, {honor_workarea = true, margins = beautiful.useless_gap * 3}) -- Get signal to execute the function (if that makes sense) -awesome.connect_signal("sidebar::toggle", function() - sidebar.toggle() +awesome.connect_signal("sidebar::toggle", function(s) + sidebar.toggle(s) end) return sidebar diff --git a/home/.config/awesome/ui/sidebar/player.lua b/home/.config/awesome/ui/sidebar/player.lua index 4c0feeb..52851f4 100644 --- a/home/.config/awesome/ui/sidebar/player.lua +++ b/home/.config/awesome/ui/sidebar/player.lua @@ -6,7 +6,7 @@ local awful = require("awful") local gears = require("gears") local wibox = require("wibox") -local beautiful = require("beautiful") +local beautiful = require ("beautiful") local dpi = beautiful.xresources.apply_dpi @@ -20,18 +20,18 @@ local playerctl = require("libs.bling").signal.playerctl.lib() -- widgets ---------- -- gradientee music album art --- - - - - - - - - - - - - - +-- - - - - - - - - - - - - - local music_art_filter = wibox.widget({ { bg = { - type = "linear", - from = { 0, 30 }, - to = { 0, 200 }, - stops = { - { 0, colors.transparent }, - { 1, colors.container } + type = "linear", + from = { 0, 30 }, + to = { 0, 200}, + stops = { + { 0, colors.transparent}, + { 1, colors.container } + }, }, - }, forced_height = dpi(85), forced_width = dpi(85), widget = wibox.container.background, @@ -43,42 +43,42 @@ local music_art_filter = wibox.widget({ -- the different music elements --- - - - - - - - - - - - - - - +-- - - - - - - - - - - - - - - -- album art -local album_art = wibox.widget { - widget = wibox.widget.imagebox, - clip_shape = helpers.rrect(theme.rounded), - forced_height = dpi(85), - forced_width = dpi(85), - image = theme.album_art +local album_art = wibox.widget{ + widget = wibox.widget.imagebox, + clip_shape = helpers.rrect(theme.rounded), + forced_height = dpi(85), + forced_width = dpi(85), + image = theme.album_art } -- playing yeah? -local playing_or = wibox.widget { - widget = wibox.widget.textbox, - markup = helpers.colorize_text("Now playing", colors.white), - font = theme.font, - align = "left", - valign = "center" +local playing_or = wibox.widget{ + widget = wibox.widget.textbox, + markup = helpers.colorize_text("Now playing", colors.white), + font = theme.font, + align = "left", + valign = "center" } -- song artist -local song_artist = wibox.widget { - widget = wibox.widget.textbox, - markup = helpers.colorize_text("Unknown", colors.white), - font = theme.font, - align = "left", - valign = "center" +local song_artist = wibox.widget{ + widget = wibox.widget.textbox, + markup = helpers.colorize_text("Unknown", colors.white), + font = theme.font, + align = "left", + valign = "center" } -- song name -local song_name = wibox.widget { - widget = wibox.widget.textbox, - markup = helpers.colorize_text("None", colors.white), - font = theme.font, - align = "left", - valign = "center" +local song_name = wibox.widget{ + widget = wibox.widget.textbox, + markup = helpers.colorize_text("None", colors.white), + font = theme.font, + align = "left", + valign = "center" } ---------------------------------------- eo.Widgets @@ -87,30 +87,30 @@ local song_name = wibox.widget { ---------- -- toggle button -local toggle_button = wibox.widget { - widget = wibox.widget.textbox, - markup = helpers.colorize_text("", colors.white), - font = theme.sidebar_font, - align = "right", - valign = "center" +local toggle_button = wibox.widget{ + widget = wibox.widget.textbox, + markup = helpers.colorize_text("", colors.white), + font = theme.sidebar_font, + align = "right", + valign = "center" } -- next button -local next_button = wibox.widget { - widget = wibox.widget.textbox, - markup = helpers.colorize_text("", colors.white), - font = theme.sidebar_font, - align = "right", - valign = "center" +local next_button = wibox.widget{ + widget = wibox.widget.textbox, + markup = helpers.colorize_text("", colors.white), + font = theme.sidebar_font, + align = "right", + valign = "center" } -- prev button -local prev_button = wibox.widget { - widget = wibox.widget.textbox, - markup = helpers.colorize_text("", colors.white), - font = theme.sidebar_font, - align = "right", - valign = "center" +local prev_button = wibox.widget{ + widget = wibox.widget.textbox, + markup = helpers.colorize_text("", colors.white), + font = theme.sidebar_font, + align = "right", + valign = "center" } local music_bar = wibox.widget({ @@ -139,13 +139,13 @@ local next_command = function() playerctl:next() end -- make it functional! toggle_button:buttons(gears.table.join( - awful.button({}, 1, function() toggle_command() end))) + awful.button({}, 1, function() toggle_command() end))) next_button:buttons(gears.table.join( - awful.button({}, 1, function() next_command() end))) + awful.button({}, 1, function() next_command() end))) prev_button:buttons(gears.table.join( - awful.button({}, 1, function() prev_command() end))) + awful.button({}, 1, function() prev_command() end))) @@ -165,75 +165,77 @@ playerctl:connect_signal("metadata", function(_, title, artist, album_path, __, end album_art:set_image(gears.surface.load_uncached(album_path)) - song_name:set_markup_silently(helpers.colorize_text(title, colors.white)) + song_name:set_markup_silently(helpers.colorize_text(title, colors.white)) song_artist:set_markup_silently(helpers.colorize_text(artist, colors.white)) + + end) -- playing/paused/{N/A} playerctl:connect_signal("playback_status", function(_, playing, __) if playing then - toggle_button.markup = helpers.colorize_text("", colors.white) + toggle_button.markup = helpers.colorize_text("", colors.white) else - toggle_button.markup = helpers.colorize_text("", colors.white) + toggle_button.markup = helpers.colorize_text("", colors.white) end end) -- time elapsed playerctl:connect_signal("position", function(_, interval_sec, length_sec) - music_bar.value = (interval_sec / length_sec) * 100 - music_length = length_sec + music_bar.value = (interval_sec / length_sec) * 100 + music_length = length_sec end) -- mainbox -- too messy ------------ -local music_box = wibox.widget { +local music_box = wibox.widget { { - { - album_art, - music_art_filter, - layout = wibox.layout.stack, - }, - { - { { - playing_or, - nil, + album_art, + music_art_filter, + layout = wibox.layout.stack, + }, + { { { - step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, - widget = wibox.container.scroll.horizontal, - forced_width = dpi(250), - speed = 30, - song_name, - }, - { - step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, - widget = wibox.container.scroll.horizontal, - forced_width = dpi(250), - speed = 30, - song_artist, - }, - spacing = dpi(2), - layout = wibox.layout.fixed.vertical, + playing_or, + nil, + { + { + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + widget = wibox.container.scroll.horizontal, + forced_width = dpi(250), + speed = 30, + song_name, + }, + { + step_function = wibox.container.scroll.step_functions.waiting_nonlinear_back_and_forth, + widget = wibox.container.scroll.horizontal, + forced_width = dpi(250), + speed = 30, + song_artist, + }, + spacing = dpi(2), + layout = wibox.layout.fixed.vertical, + }, + layout = wibox.layout.align.vertical, + expand = "none" + }, + layout = wibox.layout.fixed.horizontal, + spacing = dpi(10) }, - layout = wibox.layout.align.vertical, - expand = "none" + widget = wibox.container.margin, + margins = {top = dpi(20), bottom = dpi(20), left = dpi(20), right = dpi(20)}, }, - layout = wibox.layout.fixed.horizontal, - spacing = dpi(10) - }, - widget = wibox.container.margin, - margins = { top = dpi(20), bottom = dpi(20), left = dpi(20), right = dpi(20) }, - }, - layout = wibox.layout.stack, - }, - widget = wibox.container.background, - forced_height = dpi(150), - bg = colors.container, - border_color = colors.container, - shape = helpers.rrect(theme.rounded) + layout = wibox.layout.stack, + }, + widget = wibox.container.background, + forced_height = dpi(150), + bg = colors.container, + border_color = colors.container, + shape = helpers.rrect(theme.rounded) } @@ -243,26 +245,26 @@ return wibox.widget { { music_box, { - { - music_bar, - direction = "east", - widget = wibox.container.rotate, - forced_width = dpi(2) - }, - layout = wibox.layout.fixed.horizontal, - spacing = dpi(20), + { + music_bar, + direction = "east", + widget = wibox.container.rotate, + forced_width = dpi(2) + }, + layout = wibox.layout.fixed.horizontal, + spacing = dpi(20), }, { { { nil, - { - prev_button, - toggle_button, - next_button, + { + prev_button, + toggle_button, + next_button, layout = wibox.layout.fixed.vertical, - spacing = dpi(22) - }, + spacing = dpi(22) + }, layout = wibox.layout.align.vertical, expand = "none" }, @@ -283,3 +285,5 @@ return wibox.widget { -- eof ------ + + diff --git a/home/.config/awesome/ui/sidebar/sliders.lua b/home/.config/awesome/ui/sidebar/sliders.lua index 5dd0bc5..44901a9 100644 --- a/home/.config/awesome/ui/sidebar/sliders.lua +++ b/home/.config/awesome/ui/sidebar/sliders.lua @@ -113,13 +113,13 @@ local mic = wibox.widget { } local update_mic = function() - awful.spawn.easy_async_with_shell("pactl get-source-volume 0 | awk '{print $5}' | cut -d '%' -f 1", function(stdout) + awful.spawn.easy_async_with_shell("pamixer --source alsa_input.usb-1c1f_USB_PnP_Audio_Device-00.mono-fallback --get-volume", function(stdout) mic_slider.value = tonumber(stdout:match("%d+")) end) end mic_slider:connect_signal("property::value", function(_, mic_vol) - awful.spawn("pactl set-source-volume 0 ".. mic_vol .. "%", false) + awful.spawn("pamixer --source alsa_input.usb-1c1f_USB_PnP_Audio_Device-00.mono-fallback --set-volume ".. mic_vol, false) -- Update textbox widget text mic_osd_value.text = mic_vol .. "%" awesome.emit_signal("module::mic_osd_value", mic_vol) diff --git a/home/.config/awesome/ui/sidebar/stats.lua b/home/.config/awesome/ui/sidebar/stats.lua index c124997..012d7aa 100644 --- a/home/.config/awesome/ui/sidebar/stats.lua +++ b/home/.config/awesome/ui/sidebar/stats.lua @@ -6,49 +6,48 @@ local awful = require("awful") local gears = require("gears") local wibox = require("wibox") -local beautiful = require("beautiful") -local naughty = require("naughty") +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 + 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, - } +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 + 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, - } + return wibox.widget { + nil, + { + nil, + widget, + expand = 'none', + layout = wibox.layout.align.horizontal, + }, + expand = 'none', + layout = wibox.layout.align.vertical, + } end --- Create_widgets +-- Create_widgets ------------------- -- Disk @@ -58,15 +57,15 @@ 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, + 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) @@ -78,14 +77,14 @@ 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, + 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) @@ -97,14 +96,14 @@ 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, + 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) @@ -113,30 +112,28 @@ local brightness = grouping_widget(b_icon, b_slider) ------------------------------------ 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::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::brightness", function(bri) + b_slider.value = tonumber(bri) + end) - awesome.connect_signal("signal::disk", function(disk_perc) - d_slider.value = tonumber(disk_perc) - 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, + disk, + volume, + brightness, + spacing = dpi(18), + layout = wibox.layout.fixed.vertical, }) diff --git a/home/.config/awesome/ui/sidebar/weather.lua b/home/.config/awesome/ui/sidebar/weather.lua index 3416253..05d2013 100644 --- a/home/.config/awesome/ui/sidebar/weather.lua +++ b/home/.config/awesome/ui/sidebar/weather.lua @@ -7,7 +7,6 @@ local beautiful = require("beautiful") local dpi = beautiful.xresources.apply_dpi local filesystem = gears.filesystem local icon_dir = filesystem.get_configuration_dir() .. "themes/icons/weather/" -local naughty = require("naughty") -- # Libs : -- ~~~~~~~~ @@ -86,7 +85,7 @@ local current_weather_widget = wibox.widget({ font = "Roboto Medium 10", widget = wibox.widget.textbox, }, - spacing = dpi( -6), + spacing = dpi(-6), layout = wibox.layout.fixed.vertical, }, widget = wibox.container.place, @@ -133,9 +132,8 @@ local hourly_widget = function() local time = widget:get_children_by_id("time")[1] local icon = widget:get_children_by_id("icon")[1] local temp = widget:get_children_by_id("tempareture")[1] - - temp:set_markup(math.floor(result.main.temp) .. "°") - time:set_text(os.date("%H", tonumber(result.dt))) + temp:set_markup(math.floor(result.temp) .. "°") + time:set_text(os.date("%I%p", tonumber(result.dt))) icon.image = icon_dir .. icon_map[result.weather[1].icon] .. ".svg" icon:emit_signal("widget::redraw_needed") end @@ -171,19 +169,27 @@ local weather_widget = wibox.widget({ layout = wibox.layout.fixed.vertical, }) -local api_key = "7641c17cda8ed75684ed55704226c565" -local city_id = "2972315" +local api_key = "" +local coordinates = {"", ""} + +local show_hourly_forecast = true +local show_daily_forecast = true local units = "metric" local url = ( - "https://api.openweathermap.org/data/2.5/forecast" - .. "?appid=" - .. api_key - .. "&id=" - .. city_id - .. "&units=" - .. units - ) + "https://api.openweathermap.org/data/2.5/onecall" + .. "?lat=" + .. coordinates[1] + .. "&lon=" + .. coordinates[2] + .. "&appid=" + .. api_key + .. "&units=" + .. units + .. "&exclude=minutely" + .. (show_hourly_forecast == false and ",hourly" or "") + .. (show_daily_forecast == false and ",daily" or "") +) awful.widget.watch(string.format(GET_FORECAST_CMD, url), 600, function(_, stdout, stderr) if stderr == "" then @@ -194,27 +200,19 @@ awful.widget.watch(string.format(GET_FORECAST_CMD, url), 600, function(_, stdout local humidity = current_weather_widget:get_children_by_id("humidity")[1] local temp_current = current_weather_widget:get_children_by_id("tempareture_current")[1] local feels_like = current_weather_widget:get_children_by_id("feels_like")[1] - - local current = result.list[1] - icon.image = icon_dir .. icon_map[current.weather[1].icon] .. ".svg" + icon.image = icon_dir .. icon_map[result.current.weather[1].icon] .. ".svg" icon:emit_signal("widget::redraw_needed") - description:set_text(current.weather[1].description:gsub("^%l", string.upper)) - humidity:set_text("Humidity: " .. current.main.humidity .. "%") - temp_current:set_markup(math.floor(current.main.temp) .. "°") - feels_like:set_markup("Feels like: " .. math.floor(current.main.feels_like) .. "°") - + description:set_text(result.current.weather[1].description:gsub("^%l", string.upper)) + humidity:set_text("Humidity: " .. result.current.humidity .. "%") + temp_current:set_markup(math.floor(result.current.temp) .. "°") + feels_like:set_markup("Feels like: " .. math.floor(result.current.feels_like) .. "°") -- Hourly widget setup - hourly_widget_1.update(result.list[1]) - hourly_widget_2.update(result.list[2]) - hourly_widget_3.update(result.list[3]) - hourly_widget_4.update(result.list[4]) - hourly_widget_5.update(result.list[5]) - hourly_widget_6.update(result.list[6]) - else - naughty.notify({ - title = "Weather error", - text = stderr - }) + hourly_widget_1.update(result.hourly[1]) + hourly_widget_2.update(result.hourly[2]) + hourly_widget_3.update(result.hourly[3]) + hourly_widget_4.update(result.hourly[4]) + hourly_widget_5.update(result.hourly[5]) + hourly_widget_6.update(result.hourly[6]) end end) diff --git a/home/.config/awesome/ui/titlebar/init.lua b/home/.config/awesome/ui/titlebar/init.lua index 49dedef..b983688 100644 --- a/home/.config/awesome/ui/titlebar/init.lua +++ b/home/.config/awesome/ui/titlebar/init.lua @@ -50,18 +50,22 @@ client.connect_signal("request::titlebars", function(c) }, {-- Right - --awful.titlebar.widget.floatingbutton (c), - awful.titlebar.widget.minimizebutton (c), - awful.titlebar.widget.maximizedbutton(c), - awful.titlebar.widget.closebutton (c), - --awful.titlebar.widget.stickybutton (c), - --awful.titlebar.widget.ontopbutton (c), - spacing = dpi(4), - layout = wibox.layout.fixed.horizontal, + { + --awful.titlebar.widget.floatingbutton (c), + awful.titlebar.widget.minimizebutton (c), + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.closebutton (c), + --awful.titlebar.widget.stickybutton (c), + --awful.titlebar.widget.ontopbutton (c), + spacing = dpi(4), + layout = wibox.layout.fixed.horizontal, + }, + margins = dpi(2), + widget = wibox.container.margin, }, layout = wibox.layout.align.horizontal, }, - margins = dpi(6), + margins = dpi(4), widget = wibox.container.margin, }, id = 'background_role', diff --git a/home/.config/awesome/ui/widgets/button.lua b/home/.config/awesome/ui/widgets/button.lua new file mode 100644 index 0000000..71648d9 --- /dev/null +++ b/home/.config/awesome/ui/widgets/button.lua @@ -0,0 +1,108 @@ +local wibox = require("wibox") +local beautiful = require("beautiful") +local dpi = beautiful.xresources.apply_dpi +local gears = require("gears") + +local button = {} + +button.create = function(image, size, radius, margin, bg, bg_hover, bg_press, + command) + local button_image = wibox.widget { + image = image, + forced_height = size, + forced_width = size, + widget = wibox.widget.imagebox + } + + local button = wibox.widget { + {button_image, margins = dpi(margin), widget = wibox.container.margin}, + bg = bg, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, dpi(radius)) + end, + widget = wibox.container.background + } + + button:connect_signal("button::press", function() + button.bg = bg_press + command() + end) + + button:connect_signal("button::leave", function() button.bg = bg end) + button:connect_signal("mouse::enter", function() button.bg = bg_hover end) + button:connect_signal("mouse::leave", function() button.bg = bg end) + + button.update_image = function(image) button_image.image = image end + + return button +end + +button.create_widget = function(widget, command) + local button = wibox.widget { + {widget, margins = dpi(10), widget = wibox.container.margin}, + bg = beautiful.bg_normal, + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, dpi(10)) + end, + widget = wibox.container.background + } + + button:connect_signal("button::press", function() + button.bg = beautiful.bg_very_light + command() + end) + + button:connect_signal("button::leave", + function() button.bg = beautiful.bg_normal end) + button:connect_signal("mouse::enter", + function() button.bg = beautiful.bg_light end) + button:connect_signal("mouse::leave", + function() button.bg = beautiful.bg_normal end) + + return button +end + +button.create_image = function(image, image_hover) + local image_widget = wibox.widget { + image = image, + widget = wibox.widget.imagebox + } + + image_widget:connect_signal("mouse::enter", + function() image_widget.image = image_hover end) + image_widget:connect_signal("mouse::leave", + function() image_widget.image = image end) + + return image_widget +end + +button.create_image_onclick = function(image, image_hover, onclick) + local image = button.create_image(image, image_hover) + + local container = wibox.widget {image, widget = wibox.container.background} + + container:connect_signal("button::press", onclick) + + return container +end + +button.create_text = function(color, color_hover, text, font) + local textWidget = wibox.widget { + font = font, + markup = "" .. text .. "", + widget = wibox.widget.textbox + } + + textWidget:connect_signal("mouse::enter", function() + textWidget.markup = + "" .. text .. "" + end) + textWidget:connect_signal("mouse::leave", function() + textWidget.markup = "" .. text .. + "" + end) + + return textWidget +end + +return button \ No newline at end of file diff --git a/home/.config/awesome/ui/widgets/launcher.lua b/home/.config/awesome/ui/widgets/launcher.lua index 56b9d98..5b9f93f 100644 --- a/home/.config/awesome/ui/widgets/launcher.lua +++ b/home/.config/awesome/ui/widgets/launcher.lua @@ -6,6 +6,9 @@ local gears = require("gears") local awful = require("awful") local wibox = require("wibox") +local beautiful = require('beautiful') +local dpi = require('beautiful').xresources.apply_dpi +local sidebar = require("ui.sidebar") -- # Libs : -- ~~~~~~~~ @@ -20,11 +23,25 @@ local launcher = wibox.widget{ valign = "center", } -launcher:buttons(gears.table.join({ - awful.button({ }, 1, function () - awful.spawn.with_shell(require("libs.misc").rofiCommand, false) - end) +--launcher:buttons(gears.table.join({ +-- awful.button({ }, 1, function () +-- awful.spawn.with_shell(require("libs.misc").rofiCommand, false) +-- end) +-- +--})) -})) +launcher:connect_signal( + "button::press", + function() + launcher.opacity = 0.6 + sidebar.toggle(s) +end) +launcher:connect_signal( + "button::release", + function() + launcher.opacity = 1 +end) + +--return awful.widget.only_on_screen(launcher, 'primary') return launcher diff --git a/home/.config/awesome/ui/widgets/notifications_list_button.lua b/home/.config/awesome/ui/widgets/notifications_list_button.lua deleted file mode 100644 index 326a44d..0000000 --- a/home/.config/awesome/ui/widgets/notifications_list_button.lua +++ /dev/null @@ -1,37 +0,0 @@ --- ## Sidebar button ## --- ~~~~~~~~~~~~~~~~~~~~ - - --- Requirements : --- ~~~~~~~~~~~~~~ -local gears = require("gears") -local awful = require("awful") -local wibox = require("wibox") -local beautiful = require('beautiful') -local dpi = require('beautiful').xresources.apply_dpi -local notifications_list = require("ui.notifications-list") - - -local notifications_list_icon = wibox.widget{ - markup = "", - font = theme.taglist_font, - valign = "center", - align = "center", - widget = wibox.widget.textbox -} - -notifications_list_icon:connect_signal( - "button::press", - function() - notifications_list_icon.opacity = 0.6 - notifications_list.toggle() -end) - -notifications_list_icon:connect_signal( - "button::release", - function() - notifications_list_icon.opacity = 1 -end) - ---return sidebar_icon -return awful.widget.only_on_screen(notifications_list_icon, 'primary') diff --git a/home/.config/awesome/ui/widgets/sidebar_button.lua b/home/.config/awesome/ui/widgets/sidebar_button.lua index cffe49f..fe33d6e 100644 --- a/home/.config/awesome/ui/widgets/sidebar_button.lua +++ b/home/.config/awesome/ui/widgets/sidebar_button.lua @@ -29,7 +29,7 @@ sidebar_icon:connect_signal( "button::press", function() sidebar_icon.opacity = 0.6 - sidebar.toggle() + sidebar.toggle(s) end) sidebar_icon:connect_signal( "button::release", diff --git a/home/.config/awesome/ui/widgets/systray.lua b/home/.config/awesome/ui/widgets/systray.lua index f096680..e91099d 100644 --- a/home/.config/awesome/ui/widgets/systray.lua +++ b/home/.config/awesome/ui/widgets/systray.lua @@ -21,7 +21,7 @@ local systray = wibox.widget { wibox.widget.systray, layout = wibox.layout.fixed.horizontal, }, - margins = {top = dpi(6), bottom = dpi(6), left = dpi(6), right = dpi(6)}, + margins = {top = dpi(8), bottom = dpi(8), left = dpi(2), right = dpi(2)}, widget = wibox.container.margin, }, margins = {top = dpi(2), bottom = dpi(2)}, diff --git a/home/.config/awesome/ui/widgets/tag-preview.lua b/home/.config/awesome/ui/widgets/tag-preview.lua deleted file mode 100644 index f0a5982..0000000 --- a/home/.config/awesome/ui/widgets/tag-preview.lua +++ /dev/null @@ -1,29 +0,0 @@ -local awful = require "awful" -local wibox = require "wibox" -local beautiful = require "beautiful" -local bling = require "libs.bling" - -bling.widget.tag_preview.enable { - show_client_content = true, -- Whether or not to show the client content - x = 10, -- The x-coord of the popup - y = 10, -- The y-coord of the popup - scale = 0.25, -- The scale of the previews compared to the screen - honor_padding = true, -- Honor padding when creating widget size - honor_workarea = true, -- Honor work area when creating widget size - placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y) - awful.placement.bottom_left(c, { - margins = { - bottom = 45, - left = 5 - }, - parent = awful.screen.focused() - }) - end, - background_widget = wibox.widget { -- Set a background image (like a wallpaper) for the widget - image = "/home/eric/Pictures/wallpapers/96300930_p0_x4_esrgan.jpg", - horizontal_fit_policy = "fit", - vertical_fit_policy = "fit", - widget = wibox.widget.imagebox - } -} - diff --git a/home/.config/awesome/ui/widgets/task-preview.lua b/home/.config/awesome/ui/widgets/task-preview.lua deleted file mode 100644 index cda6489..0000000 --- a/home/.config/awesome/ui/widgets/task-preview.lua +++ /dev/null @@ -1,17 +0,0 @@ -local awful = require "awful" -local bling = require "libs.bling" - -bling.widget.task_preview.enable { - x = 20, -- The x-coord of the popup - y = 20, -- The y-coord of the popup - height = 200, -- The height of the popup - width = 200, -- The width of the popup - placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y) - awful.placement.bottom(c, { - margins = { - bottom = 45 - }, - parent = awful.screen.focused() - }) - end -} \ No newline at end of file diff --git a/home/.config/awesome/ui/widgets/temprature.lua b/home/.config/awesome/ui/widgets/temprature.lua index c842200..a6a2ad0 100644 --- a/home/.config/awesome/ui/widgets/temprature.lua +++ b/home/.config/awesome/ui/widgets/temprature.lua @@ -15,29 +15,25 @@ local helpers = require("libs.helpers") local temprature = wibox.widget.textbox() temprature.font = theme.font -watch([[ bash -c "sensors | grep 'Tctl:' | awk '{print $2}'" ]], 30, function(_, stdout) - local temp_num = tonumber(stdout:match("%d+")) - if temp_num == nil then - temp_num = -1 - end - temprature.text = math.floor(temp_num) .. "°C" +watch('bash -c "sensors | awk \'/Core 0/ {print substr($3, 2) }\'"', 30, function(_, stdout) + temprature.text = stdout end) -- Icon : local widget_icon = " " -local icon = wibox.widget { - font = theme.icon_font, - markup = helpers.colorize_text(widget_icon, colors.main_scheme), - widget = wibox.widget.textbox, - valign = "center", - align = "center" +local icon = wibox.widget{ + font = theme.icon_font, + markup = helpers.colorize_text(widget_icon, colors.main_scheme), + widget = wibox.widget.textbox, + valign = "center", + align = "center" } return wibox.widget { - icon, - wibox.widget { - temprature, + icon, + wibox.widget{ + temprature, fg = colors.brightwhite, widget = wibox.container.background }, diff --git a/home/.config/awesome/ui/widgets/window-switcher.lua b/home/.config/awesome/ui/widgets/window-switcher.lua deleted file mode 100644 index 11ed142..0000000 --- a/home/.config/awesome/ui/widgets/window-switcher.lua +++ /dev/null @@ -1,20 +0,0 @@ -local awful = require "awful" -local bling = require "libs.bling" - -bling.widget.window_switcher.enable { - type = "thumbnail", -- set to anything other than "thumbnail" to disable client previews - - -- keybindings (the examples provided are also the default if kept unset) - hide_window_switcher_key = "Escape", -- The key on which to close the popup - minimize_key = "n", -- The key on which to minimize the selected client - unminimize_key = "N", -- The key on which to unminimize all clients - kill_client_key = "q", -- The key on which to close the selected client - cycle_key = "Tab", -- The key on which to cycle through all clients - previous_key = "Left", -- The key on which to select the previous client - next_key = "Right", -- The key on which to select the next client - vim_previous_key = "h", -- Alternative key on which to select the previous client - vim_next_key = "l", -- Alternative key on which to select the next client - - cycleClientsByIdx = awful.client.focus.byidx, -- The function to cycle the clients - filterClients = awful.widget.tasklist.filter.currenttags, -- The function to filter the viewed clients -} diff --git a/home/.config/gtk-2.0/gtkfilechooser.ini b/home/.config/gtk-2.0/gtkfilechooser.ini index ab82094..a32c995 100644 --- a/home/.config/gtk-2.0/gtkfilechooser.ini +++ b/home/.config/gtk-2.0/gtkfilechooser.ini @@ -2,8 +2,8 @@ LocationMode=path-bar ShowHidden=false ShowSizeColumn=true -GeometryX=380 -GeometryY=114 +GeometryX=1863 +GeometryY=180 GeometryWidth=840 GeometryHeight=630 SortColumn=name diff --git a/home/.config/gtk-3.0/bookmarks b/home/.config/gtk-3.0/bookmarks new file mode 100644 index 0000000..6b0833b --- /dev/null +++ b/home/.config/gtk-3.0/bookmarks @@ -0,0 +1,5 @@ +file:///home/luca/Documents Documents +file:///home/luca/Downloads Downloads +file:///home/luca/Music Music +file:///home/luca/Pictures Pictures +file:///home/luca/Videos Videos diff --git a/home/.config/gtk-3.0/settings.ini b/home/.config/gtk-3.0/settings.ini index 3b2770e..a716380 100644 --- a/home/.config/gtk-3.0/settings.ini +++ b/home/.config/gtk-3.0/settings.ini @@ -1,10 +1,10 @@ [Settings] gtk-theme-name=Gruvbox gtk-icon-theme-name=Papirus-Dark -gtk-font-name=Roboto 11 +gtk-font-name=Roboto 12 gtk-cursor-theme-name=Qogir-cursors -gtk-cursor-theme-size=24 -gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=1 gtk-menu-images=1 diff --git a/home/.config/kitty/kitty.conf b/home/.config/kitty/kitty.conf index 569cd62..c4b05b3 100644 --- a/home/.config/kitty/kitty.conf +++ b/home/.config/kitty/kitty.conf @@ -6,7 +6,7 @@ font_family JetBrainsMono Nerd Font bold_font auto italic_font auto bold_italic_font auto -font_size 14.0 +font_size 16.0 adjust_line_height 0 adjust_column_width 0 diff --git a/home/.config/qt5ct/qt5ct.conf b/home/.config/qt5ct/qt5ct.conf index d62cbef..0099430 100644 --- a/home/.config/qt5ct/qt5ct.conf +++ b/home/.config/qt5ct/qt5ct.conf @@ -6,8 +6,8 @@ standard_dialogs=default style=kvantum-dark [Fonts] -fixed=@Variant(\0\0\0@\0\0\0\f\0R\0o\0\x62\0o\0t\0o@&\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) -general=@Variant(\0\0\0@\0\0\0\f\0R\0o\0\x62\0o\0t\0o@&\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) +fixed="Roboto,12,-1,5,50,0,0,0,0,0,Regular" +general="Roboto,12,-1,5,50,0,0,0,0,0,Regular" [Interface] activate_item_on_single_click=1 @@ -25,7 +25,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x1\x7f\0\0\0L\0\0\x4\xc0\0\0\x3\r\0\0\x1\x81\0\0\0N\0\0\x4\xbe\0\0\x3\v\0\0\0\0\0\0\0\0\x6@\0\0\x1\x81\0\0\0N\0\0\x4\xbe\0\0\x3\v) +geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x1l\0\0\0\x39\0\0\x4r\0\0\x3\x12\0\0\x1n\0\0\0;\0\0\x4p\0\0\x3\x10\0\0\0\0\0\0\0\0\x6@\0\0\x1n\0\0\0;\0\0\x4p\0\0\x3\x10)" [Troubleshooting] force_raster_widgets=1 diff --git a/home/.config/qt6ct/qt6ct.conf b/home/.config/qt6ct/qt6ct.conf index 03622cd..358af73 100644 --- a/home/.config/qt6ct/qt6ct.conf +++ b/home/.config/qt6ct/qt6ct.conf @@ -6,8 +6,8 @@ standard_dialogs=default style=kvantum-dark [Fonts] -fixed="Roboto,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular" -general="Roboto,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular" +fixed="Roboto,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular" +general="Roboto,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular" [Interface] activate_item_on_single_click=1 diff --git a/install b/install index 8b826df..dbd69ad 100755 --- a/install +++ b/install @@ -23,7 +23,7 @@ fi # ~~~~~~~~~~~~~~~ echo -e "${Cyan}Installing Packeges ...${No}" #sudo pacman -Rns sudo -sudo pacman -Sy --needed --noconfirm xcompmgr xdotool acpi xsel clipmenu xfce4-power-manager lxappearance nitrogen feh viewnior man-db kitty pacman-contrib xclip rsync arandr sxhkd pcmanfm-gtk3 obs-studio pamixer brightnessctl playerctl redshift maim gnome-disk-utility cups xcalib exa lsd ghex cherrytree mpv audacious gst-libav net-tools gpick gdb curl wget alacritty terminator python-pip tk xterm tor cmatrix htop neofetch zsh veracrypt engrampa p7zip unzip cdrtools gufw android-tools ranger ueberzug rofi rofi-emoji geany neovim inetutils dnsutils macchanger zathura zathura-ps zathura-djvu zathura-pdf-poppler qt5ct qt6ct kvantum-qt5 ffmpegthumbnailer tumbler grub-customizer mtpfs gvfs-mtp gvfs-gphoto2 qbittorrent btop qalculate-gtk volumeicon remmina freerdp qt5-tools python-pyqt5 qt6-tools python-pyqt6 qt5-quickcontrols2 qt5-graphicaleffects qt5-svg mesa-utils intel-media-driver rhash libva-utils gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly #firefox +sudo pacman -Sy --needed --noconfirm xcompmgr xdotool acpi xsel clipmenu tlp xfce4-power-manager lxappearance nitrogen feh viewnior man-db kitty pacman-contrib xclip rsync arandr sxhkd pcmanfm-gtk3 obs-studio pamixer brightnessctl playerctl redshift maim gnome-disk-utility cups xcalib exa lsd ghex cherrytree mpv audacious gst-libav net-tools gpick gdb curl wget alacritty terminator python-pip tk xterm tor cmatrix htop neofetch zsh veracrypt engrampa p7zip unzip cdrtools gufw android-tools ranger ueberzug jq rofi rofi-emoji geany neovim inetutils dnsutils macchanger zathura zathura-ps zathura-djvu zathura-pdf-poppler qt5ct qt6ct kvantum-qt5 ffmpegthumbnailer tumbler grub-customizer mtpfs gvfs-mtp gvfs-gphoto2 qbittorrent btop qalculate-gtk volumeicon remmina freerdp qt5-tools python-pyqt5 qt6-tools python-pyqt6 qt5-quickcontrols2 qt5-graphicaleffects qt5-svg mesa-utils intel-media-driver rhash libva-utils gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly #firefox echo -e "QT_QPA_PLATFORMTHEME=qt5ct\nexport CM_LAUNCHER=rofi\nexport CM_HISTLENGTH=50\nexport CM_DIR=/tmp/clipmenu" | sudo tee -a /etc/environment echo -e "${Green}Installing Packages Done ${No}" echo "" @@ -32,7 +32,7 @@ echo "" # Aur Packages : # ~~~~~~~~~~~~~~ echo -e "${Cyan}Installing Aur Packeges ... ${No}" -yay -Sy --needed --noconfirm bcm43142a0-firmware aic94xx-firmware xkb-switch scrcpy jmtpfs papirus-icon-theme papirus-folders yt-dlp picom-jonaburg-git sddm-config-editor-git matcha-gtk-theme kvantum-theme-matcha-git kvantum-theme-nordic-git brave-bin +yay -Sy --needed --noconfirm bcm43142a0-firmware aic94xx-firmware xkb-switch scrcpy jmtpfs papirus-icon-theme bibata-cursor-theme papirus-folders yt-dlp picom-jonaburg-git sddm-config-editor-git matcha-gtk-theme kvantum-theme-matcha-git kvantum-theme-nordic-git brave-bin #sudo papirus-folders -C yaru --theme Papirus-Dark sudo papirus-folders -C bluegrey --theme Papirus-Dark echo -e "${Green}Installing Aur Packeges Done ${No}" @@ -72,6 +72,16 @@ echo -e "${Cyan}Bluetooth Enabled${No}" echo "" echo "" +# Setting up TLP : +# ~~~~~~~~~~~~~~~~~~~~~~ +echo -e "${Cyan}Enabling TLP ... ${No}" +sudo systemctl enable tlp.service +sudo systemctl start tlp.service +sudo tlp start +echo -e "${Cyan}TLP Enabled${No}" +echo "" +echo "" + # Making Zsh Deafult Shell : # ~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "${Cyan}Switching to zsh Shell ...${No}" diff --git a/themes/install b/themes/install index f94d4a7..43e6864 100755 --- a/themes/install +++ b/themes/install @@ -1,16 +1,16 @@ #!/bin/sh # cursors : -doas cp -r cursors/* /usr/share/icons/ +sudo cp -r cursors/* /usr/share/icons/ # gtk : -doas cp -r gtk/* /usr/share/themes/ +sudo cp -r gtk/* /usr/share/themes/ # grub : -doas cp grub/* -r /boot/grub/themes/ +sudo cp grub/* -r /boot/grub/themes/ # kvantum : -doas cp -r kvantum/* /usr/share/Kvantum/ +sudo cp -r kvantum/* /usr/share/Kvantum/ # sddm ! -doas cp -r sddm/* /usr/share/sddm +sudo cp -r sddm/* /usr/share/sddm diff --git a/themes/sddm/faces/luca.face.icon b/themes/sddm/faces/luca.face.icon index b778664..e02ac26 100644 Binary files a/themes/sddm/faces/luca.face.icon and b/themes/sddm/faces/luca.face.icon differ diff --git a/themes/sddm/faces/luca.face2.icon b/themes/sddm/faces/luca.face2.icon new file mode 100644 index 0000000..b778664 Binary files /dev/null and b/themes/sddm/faces/luca.face2.icon differ diff --git a/x11/install b/x11/install index a27c8a1..267b2d5 100755 --- a/x11/install +++ b/x11/install @@ -1,11 +1,11 @@ #!/bin/sh # Display : -doas cp -r 20-modesetting.conf /etc/X11/xorg.conf.d/ -doas cp -r modesetting.conf /etc/X11/xorg.conf.d/ +sudo cp -r 20-modesetting.conf /etc/X11/xorg.conf.d/ +sudo cp -r modesetting.conf /etc/X11/xorg.conf.d/ # Mouse : -doas cp -r 40-libinput.conf /etc/X11/xorg.conf.d/ +sudo cp -r 40-libinput.conf /etc/X11/xorg.conf.d/ # Keybord : -doas cp -r 00-keyboard.conf /etc/X11/xorg.conf.d/ +sudo cp -r 00-keyboard.conf /etc/X11/xorg.conf.d/ # Video Driver : -doas cp -r i915.conf /etc/modprobe.d/ +sudo cp -r i915.conf /etc/modprobe.d/