diff --git a/awesome/.idea/codeStyles/codeStyleConfig.xml b/awesome/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/awesome/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/awesome/bindings/bindtotags.lua b/awesome/bindings/bindtotags.lua index 27df697..748feea 100644 --- a/awesome/bindings/bindtotags.lua +++ b/awesome/bindings/bindtotags.lua @@ -8,7 +8,7 @@ local modkey = RC.vars.modkey function _M.get(globalkeys) for i = 1, 9 do globalkeys = gears.table.join(globalkeys, - + -- View tag only awful.key( {modkey}, @@ -19,6 +19,7 @@ function _M.get(globalkeys) if tag then tag:view_only() end + client.emit_signal("tag::switched") end, {description = "View Tag " .. i, group = "Tag"} ), @@ -43,7 +44,7 @@ function _M.get(globalkeys) local screen = awful.screen.focused() local tag = screen.tags[i] if tag then - awful.tag.viewtoggle(tag) + client.focus:move_to_tag(tag) end end, {description = "Move focused client on tag " .. i, group = "Tag"} diff --git a/awesome/bindings/clientkeys.lua b/awesome/bindings/clientkeys.lua index 8ff9b67..a53d6e3 100644 --- a/awesome/bindings/clientkeys.lua +++ b/awesome/bindings/clientkeys.lua @@ -10,7 +10,7 @@ function _M.get() awful.key( { modkey }, "f", - function (c) + function(c) c.fullscreen = not c.fullscreen c:raise() end, @@ -19,24 +19,34 @@ function _M.get() awful.key( { modkey }, "q", - function (c) + function(c) c:kill() end, { description = "Close window", group = "Client" } ), awful.key( - { modkey, "Shift" }, + { modkey, "Control" }, "Space", awful.client.floating.toggle, { description = "Toggle floating window", group = "Client" } ), awful.key( - { modkey, "Control" }, - "r", + { modkey}, + "m", function (c) - awesome.restart() + 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 = "Restart awesome", group = "Client" } + { description = "Unmaximize", group = "client"} ) ) return clientkeys diff --git a/awesome/bindings/globalkeys.lua b/awesome/bindings/globalkeys.lua index 2ded8f2..c1eaeca 100644 --- a/awesome/bindings/globalkeys.lua +++ b/awesome/bindings/globalkeys.lua @@ -112,7 +112,7 @@ function _M.get() { modkey }, "Return", function () - awful.spawn(terminal) + awful.spawn("alacritty -o font.size=8.0") end, {description = "Open terminal", group = "Launcher"} ), @@ -280,6 +280,14 @@ function _M.get() end, { descripton = "Start a Application", group = "Application" } ), + awful.key( + { modkey, "Shift" }, + "e", + function () + awful.spawn("rofi -show power-menu -modi 'power-menu:~/.config/rofi/rofi-power-menu --choices=shutdown/reboot/logout/lockscreen' -theme ~/.config/rofi/powermenu/powermenu.rasi") + end, + { descripton = "Open the exit window", group = "System" } + ), awful.key( { }, "Print", diff --git a/awesome/deco/statusbar.lua b/awesome/deco/statusbar.lua index f10e80f..9505e7e 100644 --- a/awesome/deco/statusbar.lua +++ b/awesome/deco/statusbar.lua @@ -17,10 +17,7 @@ awful.screen.connect_for_each_screen( -- Bar for the layoutbox, taglist and newtag button s.top_left = awful.popup { - widget = { - margins = dpi(10), - widget = wibox.container.margin - }, + widget = wibox.container.background, ontop = false, bg = colors.color["Grey900"], stretch = false, @@ -112,8 +109,8 @@ awful.screen.connect_for_each_screen( s.date = require("theme.crylia.widgets.date")() s.clock = require("theme.crylia.widgets.clock")() s.bluetooth = require("theme.crylia.widgets.bluetooth")() - s.calendar_osd = require("theme.crylia.modules.calendar_osd")() - s.addtag = require("theme.crylia.widgets.addtag")() + s.calendar_osd = require("theme.crylia.modules.calendar_osd") + --s.addtag = require("theme.crylia.widgets.addtag")() s.layoutlist = require("theme.crylia.widgets.layout_list")() s.powerbutton = require("theme.crylia.widgets.power")() @@ -132,11 +129,6 @@ awful.screen.connect_for_each_screen( margins = dpi(6), widget = wibox.container.margin }, - { - s.addtag, - margins = dpi(7), - widget = wibox.container.margin - }, forced_height = 45, layout = wibox.layout.fixed.horizontal }, @@ -236,10 +228,11 @@ awful.screen.connect_for_each_screen( }, layout = wibox.layout.align.vertical } - --[[ s.calendar_osd_container:setup{ + s.calendar_osd_container:setup{ s.calendar_osd, + visible = false, layout = wibox.layout.align.horizontal - } ]] + } -- Signals awesome.connect_signal( diff --git a/awesome/main/signals.lua b/awesome/main/signals.lua index 48cf480..a58c146 100644 --- a/awesome/main/signals.lua +++ b/awesome/main/signals.lua @@ -1,6 +1,8 @@ -- Awesome Libs local awful = require("awful") local beautiful = require("beautiful") +local naughty = require("naughty") + client.connect_signal( "manage", @@ -11,6 +13,41 @@ client.connect_signal( end ) +client.connect_signal( + 'unmanage', + function(c) + if #awful.screen.focused().clients > 0 then + awful.screen.focused().clients[1]:emit_signal( + 'request::activate', + 'mouse_enter', + { + raise = true + } + ) + end + end +) + +client.connect_signal( + 'tag::switched', + function(c) + if #awful.screen.focused().clients > 0 then + awful.screen.focused().clients[1]:emit_signal( + 'request::activate', + 'mouse_enter', + { + raise = true + } + ) + end + end +) + +-- Sloppy focus +client.connect_signal("mouse::enter", function(c) + c:emit_signal("request::activate", "mouse_enter", {raise = false}) +end) + -- Workaround for focused border color, why in the love of god doesnt it work with -- beautiful.border_focus client.connect_signal("focus", function (c) diff --git a/awesome/main/tags.lua b/awesome/main/tags.lua index 7fd2f88..5a34164 100644 --- a/awesome/main/tags.lua +++ b/awesome/main/tags.lua @@ -13,7 +13,7 @@ function _M.get() function (s) tags[s] = awful.tag( { - "1", "2", "3", "4" + "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, RC.layouts[1] diff --git a/awesome/rc.lua b/awesome/rc.lua index bbb25d5..efed895 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -88,6 +88,7 @@ awful.rules.rules = main.rules( require("main.signals") -- Autostart programs -awful.spawn.with_shell("~/.screenlayout/single_screen.sh") +--awful.spawn.with_shell("~/.screenlayout/single_screen.sh") awful.spawn.with_shell("picom --experimental-backends") -awful.spawn.with_shell("xfce4-power-manager") \ No newline at end of file +awful.spawn.with_shell("xfce4-power-manager") +awful.spawn.with_shell("~/.screenlayout/single_screen.sh") diff --git a/awesome/theme/crylia/assets/wallpaper.jpg b/awesome/theme/crylia/assets/wallpaper.jpg new file mode 100644 index 0000000..f6ff102 Binary files /dev/null and b/awesome/theme/crylia/assets/wallpaper.jpg differ diff --git a/awesome/theme/crylia/assets/wallpaper.png b/awesome/theme/crylia/assets/wallpaper.png.backup similarity index 100% rename from awesome/theme/crylia/assets/wallpaper.png rename to awesome/theme/crylia/assets/wallpaper.png.backup diff --git a/awesome/theme/crylia/modules/calendar_osd.lua b/awesome/theme/crylia/modules/calendar_osd.lua index a6374e8..887a6a3 100644 --- a/awesome/theme/crylia/modules/calendar_osd.lua +++ b/awesome/theme/crylia/modules/calendar_osd.lua @@ -3,96 +3,76 @@ local awful = require("awful") local gears = require("gears") local naughty = require("naughty") local dpi = require("beautiful").xresources.apply_dpi -local watch = awful.widget.watch local color = require("theme.crylia.colors") -local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/date/" +local styles = {} -local calendar_osd = function () - - local calendar_osd_time = wibox.widget{ - { - widget = wibox.widget.textbox, - text = os.date("%H-%M-%S"), - id = "clock", - font = "digital-7 italic", - forced_height = dpi(50) - }, - layout = wibox.layout.align.horizontal - } - - ---[[ local create_calendar = function (widget, date) - local d = {year = date.year, month = (date.month or 1), day = (date.day or 1)} - local weekday = tonumber(os.date("%w", os.time(d))) - local default_bg = (weekday == 0 or weekday == 6) and color.color["Grey900"] - local container = wibox.widget { - { - widget, - margins = dpi(2), - widget = wibox.container.margin - }, - shape = function (cr, height, width) - gears.shape.rounded_rect(cr, height, widget) - end, - shape_border_width = dpi(1), - shape_border_color = color.color["Grey800"], - fg = color.color["White"], - bg = color.color["Grey900"], - widget = wibox.container.background - } - end ]] - - local calendar = wibox.widget{ - font = "digital-7 italic", - date = os.date("*t"), - spacing = dpi(15), - --fn_embed = create_calendar, - widget = wibox.widget.calendar.month() - } - - local current_month = calendar:get_date().month - - local update_active_month = function (i) - local date = calendar:get_date() - date.month = date.month + i, - calendar:set_date(nil), - calendar:set_date(date) +styles.month = { + padding = 15, + bg_color = color.color["Grey900"], + border_width = 1, + shape = function (cr, width, height) + gears.shape.rounded_rect(cr, width, height, 5) end - - calendar:buttons( - gears.table.join( - awful.button( - { }, - 4, - function () - update_active_month(-1) - end - ), - awful.button( - { }, - 5, - function () - update_active_month(1) - end - ) - ) - ) - - local calendar_widget = wibox.widget{ +} +styles.normal = { + shape = function (cr, width, height) + gears.shape.rounded_rect(cr, width, height, 5) + end +} +styles.focus = { + fg_color = color.color["Grey900"], + bg_color = color.color["TealA200"], + shape = function (cr, width, height) + gears.shape.rounded_rect(cr, width, height, 5) + end +} +styles.header = { + fg_color = color.color["Teal200"], + markup = function(t) return '' .. t .. '' end, + shape = function (cr, width, height) + gears.shape.rounded_rect(cr, width, height, 5) + end +} +styles.weekday = { + padding = 8, + fg_color = color.color["Teal200"], + markup = function(t) return '' .. t .. '' end, + shape = function (cr, width, height) + gears.shape.rounded_rect(cr, width, height, 5) + end +} +local function decorate_cell(widget, flag, date) + if flag=='monthheader' and not styles.monthheader then + flag = 'header' + end + local props = styles[flag] or {} + if props.markup and widget.get_text and widget.set_markup then + widget:set_markup(props.markup(widget:get_text())) + end + -- Change bg color for weekends + local d = {year=date.year, month=(date.month or 1), day=(date.day or 1)} + local weekday = tonumber(os.date('%w', os.time(d))) + local default_bg = (weekday==0 or weekday==6) and color.color["Grey900"] or color.color["Grey800"] + local ret = wibox.widget { { - calendar_osd_time, - calendar, - layout = wibox.layout.fixed.vertical + widget, + margins = 10, + widget = wibox.container.margin }, - bg = color.color["White"] .. "00", - shape = function (cr, height, width) - gears.shape.rounded_rect(cr, dpi(500), dpi(300)) - end, + shape = props.shape, + shape_border_color = color.color["Grey800"], + shape_border_width = 1, + fg = props.fg_color or '#999999', + bg = props.bg_color or default_bg, widget = wibox.container.background } - - return calendar_widget + return ret end +local cal = wibox.widget { + date = os.date('*t'), + fn_embed = decorate_cell, + widget = wibox.widget.calendar.month +} -return calendar_osd \ No newline at end of file +return cal \ No newline at end of file diff --git a/awesome/theme/crylia/modules/power_menu.lua b/awesome/theme/crylia/modules/power_menu.lua deleted file mode 100644 index cdc3a8e..0000000 --- a/awesome/theme/crylia/modules/power_menu.lua +++ /dev/null @@ -1,19 +0,0 @@ ------------------------------------ --- This is the volume_old module -- ------------------------------------ - --- Awesome Libs -local awful = require("awful") -local color = require("theme.crylia.colors") -local dpi = require("beautiful").xresources.apply_dpi -local gears = require("gears") -local wibox = require("wibox") - --- Icon directory path -local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/audio/" - -return function () - - - -end \ No newline at end of file diff --git a/awesome/theme/crylia/theme_variables.lua b/awesome/theme/crylia/theme_variables.lua index 6cfd91c..a1e7c4d 100644 --- a/awesome/theme/crylia/theme_variables.lua +++ b/awesome/theme/crylia/theme_variables.lua @@ -41,8 +41,8 @@ Theme.menu_border_width = dpi(1) Theme.taglist_fg_focus = colors.color["Grey900"] Theme.taglist_bg_focus = colors.color["White"] -Theme.tooltip_border_color = colors.color["Grey800"] -Theme.tooltip_bg = colors.color["White"] .. "00" +Theme.tooltip_border_color = colors.color["Grey700"] +Theme.tooltip_bg = colors.color["Grey800"] Theme.tooltip_fg = colors.color["White"] Theme.tooltip_border_width = dpi(1) Theme.tooltip_shape = function (cr, width, heigth) diff --git a/awesome/theme/crylia/widgets/power.lua b/awesome/theme/crylia/widgets/power.lua index 4708ff9..4f8bf29 100644 --- a/awesome/theme/crylia/widgets/power.lua +++ b/awesome/theme/crylia/widgets/power.lua @@ -75,6 +75,7 @@ return function () "button::release", function () power_widget.bg = color.color["Red200"] .. "dd" + awful.spawn("rofi -show power-menu -modi 'power-menu:~/.config/rofi/rofi-power-menu --choices=shutdown/reboot/logout/lockscreen' -theme ~/.config/rofi/powermenu/powermenu.rasi") end ) diff --git a/awesome/theme/crylia/widgets/taglist.lua b/awesome/theme/crylia/widgets/taglist.lua index 7de0db7..6e2e779 100644 --- a/awesome/theme/crylia/widgets/taglist.lua +++ b/awesome/theme/crylia/widgets/taglist.lua @@ -65,9 +65,9 @@ local list_update = function (widget, buttons, label, data, objects) tag_widget:buttons(buttons, object) - --local text, bg_color, bg_image, icon, args = label(object, tag_label) + local text, bg_color, bg_image, icon, args = label(object, tag_label) - tag_label:set_text(i) + tag_label:set_text(object.index) if object == awful.screen.focused().selected_tag then tag_widget:set_bg(color.color["White"]) @@ -143,7 +143,7 @@ local list_update = function (widget, buttons, label, data, objects) end end ) - + widget:add(tag_widget) widget:set_spacing(dpi(6)) end @@ -153,7 +153,7 @@ end local tag_list = function (s) return awful.widget.taglist( s, - awful.widget.taglist.filter.all, + awful.widget.taglist.filter.noempty, gears.table.join( awful.button( { }, @@ -200,9 +200,7 @@ local tag_list = function (s) { }, 5, function (t) - if client.focus then - awful.tag.viewprev(t.screen) - end + awful.tag.viewprev(t.screen) end ) ) diff --git a/awesome/theme/crylia/widgets/tasklist.lua b/awesome/theme/crylia/widgets/tasklist.lua index 330b1a8..4fe5e39 100644 --- a/awesome/theme/crylia/widgets/tasklist.lua +++ b/awesome/theme/crylia/widgets/tasklist.lua @@ -43,7 +43,8 @@ local list_update = function (widget, buttons, label, data, objects) task_title, layout = wibox.layout.fixed.horizontal }, - margins = dpi(0), + right = dpi(5), + left = dpi(5), widget = wibox.container.margin }, bg = color.color["White"], diff --git a/picom.conf b/picom.conf index 3afb4eb..1b78a97 100644 --- a/picom.conf +++ b/picom.conf @@ -81,7 +81,7 @@ opacity-rule = [ # ░▀▀░░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀ blur: { - method = "kawase"; + method = "dual_kawase"; strength = 5.0; deviation = 1.0; kernel = "11x11gaussian"; diff --git a/rofi/config.rasi b/rofi/config.rasi deleted file mode 100644 index 3cb7cb2..0000000 --- a/rofi/config.rasi +++ /dev/null @@ -1,119 +0,0 @@ -configuration { - modi: "run,drun,window"; - font: "JetBrainsMono Nerd Font 14"; - terminal: "alacritty"; - icon-theme: "Papirus"; - line-margin: 0; - line-padding: 0; - separator-style: "solid"; - hide-scrollbar: true; - display-drun: "ﬓ"; - display-run: ""; - display-window: "缾"; - show-icons: true; -} - -* { - background: #21212166; - background-alt: #00000000; - background-bar: #f2f2f215; - foreground: #f2f2f2EE; - accent: #3DAEE966; -} - -window { - background-color: @background; - text-color: @foreground; - border: 0px; - border-color: @border; - border-radius: 0px; - width: 100%; - height: 100%; -} - -prompt { - enabled: true; - padding: 0 0.5% 0 0.5%; - margin: 0 1% 0 0; - background-color: @background-alt; - text-color: @foreground; - font: "JetBrainsMono Nerd Font 24"; - -} - -entry { - background-color: @background-alt; - text-color: @foreground; - placeholder-color: @foreground; - expand: true; - horizontal-align: 0; - placeholder: "Search"; - padding: 1% 0 1% 0; - blink: true; -} - -inputbar { - children: [ prompt, entry ]; - background-color: @background-bar; - text-color: @foreground; - expand: false; - border: 0% 0% 0% 0%; - border-radius: 5px; - border-color: @accent; - margin: 0% 25% 0% 25%; - padding: 0.2% 0.5% 0.2% 0.5%; -} - -listview { - background-color: @background-alt; - columns: 3; - spacing: 0%; - cycle: false; - dynamic: true; - layout: vertical; -} - -mainbox { - background-color: @background-alt; - border: 0% 0% 0% 0%; - border-radius: 0% 0% 0% 0%; - border-color: @accent; - children: [ inputbar, listview ]; - spacing: 8%; - padding: 10% 12.5% 10% 12.5%; -} - -element-icon { - background-color: @background; - text-color: inherit; - horizontal-align: 0.5; - vertical-align: 0.5; - border: 0px; -} - -element-text { - background-color: @background; - text-color: inherit; - expand: true; - horizontal-align: 0.5; - vertical-align: 0.5; - margin: 0; -} - -element { - children: [element-icon, element-text]; - orientation: vertical; - background-color: @background-alt; - text-color: @foreground; - padding: 1.5% 0.5% 1.5% 0.5%; - margin: 0.3% 1% 0.3% 1%; - font: "JetBrainsMono Nerd Font 20"; -} - -element selected { - background-color: @background-bar; - text-color: @foreground; - border-radius: 5px; - border: 0px; - border-color: #90CAF9; -} \ No newline at end of file diff --git a/rofi/crylia.rasi b/rofi/crylia.rasi deleted file mode 100644 index 523b337..0000000 --- a/rofi/crylia.rasi +++ /dev/null @@ -1,3 +0,0 @@ -{ - background-color: #fff; -} \ No newline at end of file diff --git a/rofi/run_rofi.sh b/rofi/run_rofi.sh deleted file mode 100755 index 674f2a9..0000000 --- a/rofi/run_rofi.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -options="one -two -three" -theme=${1:-$HOME/.config/rofi/config.rasi} -selection=$(echo -e "${options}" | rofi -dmenu -config $theme) -case "${selection}" in - "one") - notify-send "run_rofi.sh" "one";; - "two") - notify-send "run_rofi.sh" "two";; - "three") - notify-send "run_rofi.sh" "three";; -esac \ No newline at end of file