From d4f511d8ce543391004d884440dbdd9f1be53a3e Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 4 Jun 2020 13:34:09 -0500 Subject: [PATCH 1/2] some changes --- awesome/module/notifications.lua | 38 +++++++++++++++------------ awesome/rc.lua | 44 ++++++++++++++++---------------- 2 files changed, 43 insertions(+), 39 deletions(-) diff --git a/awesome/module/notifications.lua b/awesome/module/notifications.lua index b32baa1..0420001 100644 --- a/awesome/module/notifications.lua +++ b/awesome/module/notifications.lua @@ -15,9 +15,9 @@ naughty.config.defaults.ontop = true naughty.config.defaults.icon_size = dpi(32) naughty.config.defaults.timeout = 5 naughty.config.defaults.title = 'System Notification' -naughty.config.defaults.margin = dpi(16) +naughty.config.defaults.margin = dpi(20) naughty.config.defaults.border_width = 0 -naughty.config.defaults.position = 'top_right' +naughty.config.defaults.position = 'bottom_middle' naughty.config.defaults.shape = function(cr, w, h) gears.shape.rounded_rect(cr, w, h, dpi(6)) end -- Apply theme variables @@ -44,11 +44,11 @@ ruled.notification.connect_signal('request::rules', function() ruled.notification.append_rule { rule = { urgency = 'critical' }, properties = { - font = 'SF Pro Text Bold 10', + font = 'VictorMono Nerd Font 10', bg = '#ff0000', fg = '#ffffff', margin = dpi(16), - position = 'top_right', + position = 'bottom_middle', implicit_timeout = 0 } } @@ -57,11 +57,11 @@ ruled.notification.connect_signal('request::rules', function() ruled.notification.append_rule { rule = { urgency = 'normal' }, properties = { - font = 'SF Pro Text Regular 10', + font = 'VictorMono Nerd Font 10', bg = beautiful.transparent, fg = beautiful.fg_normal, margin = dpi(16), - position = 'top_right', + position = 'bottom_middle', implicit_timeout = 5 } } @@ -70,11 +70,11 @@ ruled.notification.connect_signal('request::rules', function() ruled.notification.append_rule { rule = { urgency = 'low' }, properties = { - font = 'SF Pro Text Regular 10', + font = 'VictorMono Nerd Font 10', bg = beautiful.transparent, fg = beautiful.fg_normal, margin = dpi(16), - position = 'top_right', + position = 'bottom_middle', implicit_timeout = 5 } } @@ -117,7 +117,7 @@ naughty.connect_signal("request::display", function(n) local actions_template = wibox.widget { notification = n, base_layout = wibox.widget { - spacing = dpi(0), + spacing = dpi(4), layout = wibox.layout.flex.horizontal }, widget_template = { @@ -126,7 +126,7 @@ naughty.connect_signal("request::display", function(n) { { id = 'text_role', - font = 'SF Pro Text Regular 10', + font = 'VictorMono Nerd Font 10', widget = wibox.widget.textbox }, widget = wibox.container.place @@ -135,10 +135,10 @@ naughty.connect_signal("request::display", function(n) }, bg = beautiful.groups_bg, shape = gears.shape.rounded_rect, - forced_height = dpi(30), + forced_height = dpi(35), widget = wibox.container.background }, - margins = dpi(4), + margins = dpi(8), widget = wibox.container.margin }, style = { underline_normal = false, underline_selected = true }, @@ -164,7 +164,7 @@ naughty.connect_signal("request::display", function(n) { { markup = n.app_name or 'System Notification', - font = 'SF Pro Text Bold 10', + font = 'VictorMono Nerd Font 10', align = 'center', valign = 'center', widget = wibox.widget.textbox @@ -217,7 +217,7 @@ naughty.connect_signal("request::display", function(n) margins = dpi(0), widget = wibox.container.margin, }, - bg = beautiful.transparent, + bg = beautiful.bg_normal, widget = wibox.container.background, }, -- Notification action list @@ -226,7 +226,7 @@ naughty.connect_signal("request::display", function(n) spacing = dpi(4), layout = wibox.layout.fixed.vertical, }, - bg = beautiful.transparent, + bg = beautiful.bg_normal, id = "background_role", widget = naughty.container.background, }, @@ -240,13 +240,17 @@ naughty.connect_signal("request::display", function(n) }, -- Anti-aliasing container -- Real BG - bg = beautiful.background, + bg = beautiful.bg_normal, -- This will be the anti-aliased shape of the notification shape = gears.shape.rounded_rect, widget = wibox.container.background }, -- Margin of the fake BG to have a space between notification and the screen edge - margins = dpi(5),--beautiful.notification_margin, + -- margins = dpi(15),--beautiful.notification_margin, + right = dpi(20), + left = dpi(20), + bottom = dpi(20), + top = dpi(5), widget = wibox.container.margin } diff --git a/awesome/rc.lua b/awesome/rc.lua index c81efed..fc4f3dc 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -51,30 +51,30 @@ require('module.dynamic-wallpaper') -- require('module.lockscreen') --- {{{ Error handling --- Check if awesome encountered an error during startup and fell back to --- another config (This code will only ever execute for the fallback config) -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end +-- -- {{{ Error handling +-- -- Check if awesome encountered an error during startup and fell back to +-- -- another config (This code will only ever execute for the fallback config) +-- if awesome.startup_errors then +-- naughty.notify({ preset = naughty.config.presets.critical, +-- title = "Oops, there were errors during startup!", +-- text = awesome.startup_errors }) +-- end --- Handle runtime errors after startup -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - -- Make sure we don't go into an endless error loop - if in_error then return end - in_error = true +-- -- Handle runtime errors after startup +-- do +-- local in_error = false +-- awesome.connect_signal("debug::error", function (err) +-- -- Make sure we don't go into an endless error loop +-- if in_error then return end +-- in_error = true - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = tostring(err) }) - in_error = false - end) -end --- }}} +-- naughty.notify({ preset = naughty.config.presets.critical, +-- title = "Oops, an error happened!", +-- text = tostring(err) }) +-- in_error = false +-- end) +-- end +-- -- }}} -- {{{ Variable definitions -- Themes define colours, icons, font and wallpapers. From 3488174a8363e088b109b65a3a1f157bb22be2ad Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 1 Jul 2020 11:26:52 -0500 Subject: [PATCH 2/2] Adding lots of changes --- awesome/module/notifications.lua | 11 +- awesome/module/volume-osd.lua | 27 ++- awesome/rc.lua | 187 ++++++++++++++---- awesome/theme.lua | 21 +- awesome/widget/clickable-container/init.lua | 1 + awesome/widget/network/init.lua | 2 +- awesome/widget/package-updater/init.lua | 4 +- awesome/widget/volume/init.lua | 150 ++++++++++++++ awesome/widget/volume/volume-slider.lua | 4 +- .../navbar_tabs_oneliner_tabs_on_left.css | 4 +- firefox/chrome/userChrome.css | 22 +++ firefox/chrome/userChrome.css.tri.bak | 30 +++ firefox/chrome/userChrome.orig.css | 30 +++ picom.conf | 12 +- rofi/config | 2 +- rofi/config.rasi | 8 +- rofi/launchers-git/blurry.rasi | 9 +- rofi/launchers-git/blurry_full.rasi | 32 ++- rofi/launchers-git/launcher.sh | 4 +- 19 files changed, 462 insertions(+), 98 deletions(-) create mode 100644 awesome/widget/volume/init.lua create mode 100644 firefox/chrome/userChrome.css.tri.bak create mode 100644 firefox/chrome/userChrome.orig.css diff --git a/awesome/module/notifications.lua b/awesome/module/notifications.lua index 0420001..88957e7 100644 --- a/awesome/module/notifications.lua +++ b/awesome/module/notifications.lua @@ -49,7 +49,7 @@ ruled.notification.connect_signal('request::rules', function() fg = '#ffffff', margin = dpi(16), position = 'bottom_middle', - implicit_timeout = 0 + implicit_timeout = 15 } } @@ -62,7 +62,7 @@ ruled.notification.connect_signal('request::rules', function() fg = beautiful.fg_normal, margin = dpi(16), position = 'bottom_middle', - implicit_timeout = 5 + implicit_timeout = 8 } } @@ -228,6 +228,7 @@ naughty.connect_signal("request::display", function(n) }, bg = beautiful.bg_normal, id = "background_role", + shape = gears.shape.rounded_rect, widget = naughty.container.background, }, strategy = "min", @@ -247,9 +248,9 @@ naughty.connect_signal("request::display", function(n) }, -- Margin of the fake BG to have a space between notification and the screen edge -- margins = dpi(15),--beautiful.notification_margin, - right = dpi(20), - left = dpi(20), - bottom = dpi(20), + right = dpi(10), + left = dpi(10), + bottom = dpi(10), top = dpi(5), widget = wibox.container.margin } diff --git a/awesome/module/volume-osd.lua b/awesome/module/volume-osd.lua index 681fdec..7179097 100644 --- a/awesome/module/volume-osd.lua +++ b/awesome/module/volume-osd.lua @@ -11,7 +11,7 @@ local spawn = require('awful.spawn') screen.connect_signal("request::desktop_decoration", function(s) - s.show_vol_osd = false + s.show_vol_osd = true local osd_header = wibox.widget { text = 'Volume', @@ -59,7 +59,7 @@ screen.connect_signal("request::desktop_decoration", function(s) local volume_level = vol_osd_slider:get_value() - spawn('amixer -D pulse sset Master ' .. volume_level .. '%', false) + spawn('amixer set Master ' .. volume_level .. '%', false) -- Update textbox widget text osd_value.text = volume_level .. '%' @@ -141,8 +141,8 @@ screen.connect_signal("request::desktop_decoration", function(s) maximum_height = osd_height, maximum_width = osd_width, offset = dpi(5), - shape = gears.shape.rectangle, - bg = beautiful.transparent, + shape = gears.shape.rounded_rect, + bg = "#282a36", preferred_anchors = 'middle', preferred_positions = {'left', 'right', 'top', 'bottom'}, @@ -167,7 +167,6 @@ screen.connect_signal("request::desktop_decoration", function(s) widget = wibox.container.margin }, - bg = beautiful.background, shape = gears.shape.rounded_rect, widget = wibox.container.background() } @@ -214,12 +213,12 @@ screen.connect_signal("request::desktop_decoration", function(s) if right_panel and left_panel then if right_panel.visible then - awful.placement.bottom_left(focused.volume_osd_overlay, { margins = { + awful.placement.bottom_left(focused.volume_osd_overlay, { margins = { left = osd_margin + left_panel.width, right = 0, top = 0, bottom = osd_margin, - }, + }, parent = focused } ) return @@ -228,37 +227,37 @@ screen.connect_signal("request::desktop_decoration", function(s) if right_panel then if right_panel.visible then - awful.placement.bottom_left(focused.volume_osd_overlay, { margins = { + awful.placement.bottom_left(focused.volume_osd_overlay, { margins = { left = osd_margin, right = 0, top = 0, bottom = osd_margin, - }, + }, parent = focused } ) return end end - awful.placement.bottom_right(focused.volume_osd_overlay, { margins = { + awful.placement.centered(focused.volume_osd_overlay, { margins = { left = 0, right = osd_margin, - top = 0, + top = dpi(800), bottom = osd_margin, - }, + }, parent = focused } ) end awesome.connect_signal( - 'module::volume_osd:show', + 'module::volume_osd:show', function(bool) placement_placer() awful.screen.focused().volume_osd_overlay.visible = bool if bool then timer_rerun() awesome.emit_signal( - 'module::brightness_osd:show', + 'module::brightness_osd:show', false ) else diff --git a/awesome/rc.lua b/awesome/rc.lua index fc4f3dc..83658b6 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -5,6 +5,8 @@ pcall(require, "luarocks.loader") -- Standard awesome library local gears = require("gears") local awful = require("awful") +local xresources = require("beautiful.xresources") +local dpi = xresources.apply_dpi require("awful.autofocus") -- Widget and layout library local wibox = require("wibox") @@ -19,6 +21,8 @@ local hotkeys_popup = require("awful.hotkeys_popup") require("awful.hotkeys_popup.keys") +-- require('layout') + -- Widgets to add -- local batteryarc_widget = require("awesome-wm-widget.batteryarc-widget.batteryarc") @@ -46,7 +50,7 @@ require('module.backdrop') -- require('module.menu') require('module.volume-osd') require('module.brightness-osd') -require('module.dynamic-wallpaper') +-- require('module.dynamic-wallpaper') -- require('module.battery-notifier') -- require('module.lockscreen') @@ -95,6 +99,7 @@ altkey = "Mod1" -- Table of layouts to cover with awful.layout.inc, order matters. awful.layout.layouts = { + awful.layout.suit.magnifier, awful.layout.suit.tile, awful.layout.suit.floating, -- awful.layout.suit.tile.left, @@ -106,7 +111,6 @@ awful.layout.layouts = { awful.layout.suit.spiral.dwindle, awful.layout.suit.max, -- awful.layout.suit.max.fullscreen, - -- awful.layout.suit.magnifier, -- awful.layout.suit.corner.nw, -- awful.layout.suit.corner.ne, -- awful.layout.suit.corner.sw, @@ -201,12 +205,57 @@ end -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) screen.connect_signal("property::geometry", set_wallpaper) + +-- mynewpanel:setup { +-- layout = wibox.layout.align.horizontal, +-- expand = "outside", +-- { -- Left widgets +-- layout = wibox.layout.align.horizontal, +-- -- wibox.container.margin (s.mytaglist,25,0,0,0), +-- -- wibox.container.margin (s.mytasklist,25,25,0,0), -- Middle widget +-- -- s.myemptywidget, +-- spacing = 15 +-- }, +-- -- mytextclock, +-- { -- Right widgets +-- layout = wibox.layout.align.horizontal, +-- -- s.myemptywidget, +-- -- s.myemptywidget, +-- -- s.myrightwidgets, +-- }, +-- } + awful.screen.connect_for_each_screen(function(s) -- Wallpaper set_wallpaper(s) -- Each screen has its own tag table. - awful.tag({ "main", "www", "code", "fun"}, s, awful.layout.layouts[1]) + awful.tag({ "◉", "◉", "◉", "◉"}, s, awful.layout.layouts[1]) + + + yoffset = dpi(35) + xoffset = dpi(18) + + mypanel = wibox + ({ + x = s.geometry.x + xoffset, + y = s.geometry.height - yoffset, + height = dpi(25), + width = s.geometry.width - (xoffset * 2), + ontop = true, + stretch = false, + type = "dock", + screen = s, + shape = gears.shape.rounded_bar, + -- widget = wibox.widget.textbox + bg = beautiful.bg_normal, + fg = beautiful.fg_normal, + opacity = 0.65, + }) + + mypanel:struts { + bottom = dpi(30) + } -- Create a promptbox for each screen s.mypromptbox = awful.widget.prompt() @@ -226,8 +275,11 @@ awful.screen.connect_for_each_screen(function(s) } -- Create a systray widget - s.mysystray = wibox.widget.systray() - + s.mysystray = { + wibox.widget.systray(), + -- bg = "#00FF0066", + widget = wibox.container.background, + } -- Create a tasklist widget -- s.mytasklist = awful.widget.tasklist { -- screen = s, @@ -251,7 +303,7 @@ awful.screen.connect_for_each_screen(function(s) spacing_widget = { { forced_width = 5, - forced_height = 30, + forced_height = dpi(20), -- shape = gears.shape.circle, widget = wibox.widget.separator }, @@ -271,7 +323,7 @@ awful.screen.connect_for_each_screen(function(s) id = 'icon_role', widget = wibox.widget.imagebox, }, - margins = 4, + margins = 2, widget = wibox.container.margin, }, { @@ -288,45 +340,88 @@ awful.screen.connect_for_each_screen(function(s) widget = wibox.container.background, }, } - -- Create the wibox - s.mywibox = awful.wibar({ position = "bottom", screen = s }) -- Create Battery, Network, and Volume widget s.battery = require('widget.battery')() s.network = require('widget.network')() - -- s.volume = require('widget.volume-slider')() + s.volume = require('widget.volume')() s.updater = require('widget.package-updater')() + -- Create the wibox + -- s.mywibox = awful.wibar({ + -- y = s.geometry.y + dpi(1080) - yoffset, + -- position = "bottom", + -- screen = s}) + s.myrightwidgets = - { -- Right widgets - layout = wibox.layout.align.horizontal, - s.mytasklist, -- Middle widget - s.mysystray, - s.mylayoutbox, + { + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + s.volume, + s.mysystray, + s.updater, + s.network, + s.battery, + wibox.container.margin (s.mylayoutbox,0,25,0,0), + }, + -- bg = "#00FF0066", + widget = wibox.container.background, } + -- Empty widget to use for spacing + s.myemptywidget = wibox.widget{ + markup = '', + align = '', + valign = '', + widget = wibox.widget.textbox + } -- Add widgets to the wibox - s.mywibox:setup { + -- s.mywibox:setup { + -- layout = wibox.layout.align.horizontal, + -- expand = "outside", + -- { -- Left widgets + -- layout = wibox.layout.align.horizontal, + -- wibox.container.margin (s.mytaglist,25,0,0,0), + -- wibox.container.margin (s.mytasklist,25,25,0,0), -- Middle widget + -- s.myemptywidget, + -- spacing = 15 + -- }, + -- mytextclock, + -- { -- Right widgets + -- layout = wibox.layout.align.horizontal, + -- s.myemptywidget, + -- s.myemptywidget, + -- s.myrightwidgets, + -- }, + -- } + + -- Add widgets to the wibox + mypanel:setup { layout = wibox.layout.align.horizontal, + expand = "outside", { -- Left widgets - layout = wibox.layout.fixed.horizontal, - wibox.container.margin (s.mytaglist,25,0,0,0), - s.mypromptbox, + layout = wibox.layout.align.horizontal, + wibox.container.margin (s.mytaglist,15,0,-3,0), + wibox.container.margin (s.mytasklist,25,25,0,0), -- Middle widget + s.myemptywidget, spacing = 15 }, - wibox.container.margin (s.mytasklist,35,35,0,0), -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - s.mysystray, - -- s.volume, - s.updater, - s.network, - s.battery, mytextclock, - wibox.container.margin (s.mylayoutbox,0,25,0,0), + { -- Right widgets + layout = wibox.layout.align.horizontal, + s.myemptywidget, + s.myemptywidget, + s.myrightwidgets, }, + visible = true, } + + mypanel.visible = true + -- return mypanel end) -- }}} +testwibox = wibox {x = 20, y = 10, width = 10, height = 10, ontop = true, bg = "#000000"} + +testwibox:to_widget() -- {{{ Mouse bindings root.buttons(gears.table.join( awful.button({ }, 3, function () mymainmenu:toggle() end), @@ -403,6 +498,12 @@ globalkeys = gears.table.join( awful.key({ modkey, "Shift" }, "q", awesome.quit, {description = "quit awesome", group = "awesome"}), + -- Programs + awful.key({ modkey, }, "b", function () awful.spawn("firefox") end, + {description = "open firefox", group = "apps"}), + awful.key({ modkey, }, "e", function () awful.spawn("emacsclient -c") end, + {description = "open emacs frame connected to server", group = "apps"}), + 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, @@ -434,13 +535,17 @@ globalkeys = gears.table.join( -- Volume Keys awful.key({}, "XF86AudioLowerVolume", function () - awful.util.spawn("amixer -q -D pulse sset Master 5%-", false) + awful.util.spawn("amixer set Master 5%-", false) + awesome.emit_signal('widget::volume') + awesome.emit_signal('module::volume_osd:show', true) end), awful.key({}, "XF86AudioRaiseVolume", function () - awful.util.spawn("amixer -q -D pulse sset Master 5%+", false) + awful.util.spawn("amixer -q set Master 5%+", false) + awesome.emit_signal('widget::volume') + awesome.emit_signal('module::volume_osd:show', true) end), awful.key({}, "XF86AudioMute", function () - awful.util.spawn("amixer -D pulse set Master 1+ toggle", false) + awful.util.spawn("amixer set Master 1+ toggle", false) end), -- Media Keys awful.key({}, "XF86AudioPlay", function() @@ -493,7 +598,7 @@ clientkeys = gears.table.join( c:raise() end, {description = "toggle fullscreen", group = "client"}), - awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end, + awful.key({ modkey, }, "q", function (c) c:kill() end, {description = "close", group = "client"}), awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , {description = "toggle floating", group = "client"}), @@ -632,12 +737,15 @@ awful.rules.rules = { "Wpa_gui", "veromix", "xtightvncviewer", + "mpv", + "gl", "feh"}, -- 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. + "remove images?" -- darktable delete window. }, role = { "AlarmWindow", -- Thunderbird's calendar. @@ -659,8 +767,14 @@ awful.rules.rules = { -- Set Feh center { rule = {class = "feh"}, properties = { - placement = awful.placement.centered + placement = awful.placement.centered, + floating = true }}, + { rule = {class = "mpv"}, + properties = { + floating = true + } + }, } -- }}} @@ -720,9 +834,9 @@ client.connect_signal("request::titlebars", function(c) end) -- Enable sloppy focus, so that focus follows mouse. -client.connect_signal("mouse::enter", function(c) - c:emit_signal("request::activate", "mouse_enter", {raise = false}) -end) +-- client.connect_signal("mouse::enter", function(c) +-- c:emit_signal("request::activate", "mouse_enter", {raise = false}) +-- end) client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) @@ -735,3 +849,4 @@ awful.spawn.with_shell("libinput-gestures-setup start") awful.spawn.with_shell("flameshot") awful.spawn.with_shell("feh --bg-fill ~/Pictures/wallpapers/RoyalKing.png") awful.spawn.with_shell("/usr/lib/polkit-kde-authentication-agent-1") +awful.spawn.with_shell("emacs -daemon") diff --git a/awesome/theme.lua b/awesome/theme.lua index 9e6cf2f..f2cb7b7 100644 --- a/awesome/theme.lua +++ b/awesome/theme.lua @@ -15,10 +15,13 @@ local theme = {} theme.font = "VictorMono Nerd Font SemiBold 10" +-- COLORS +-- Try to build a theme off of SNAZZY theme.bg_normal = "#282a36" +theme.bg_light = "#34353e" theme.bg_focus = "#43454f" -theme.bg_urgent = "#ff5c57" theme.bg_minimize = "#78787e" +theme.bg_urgent = "#ff5c57" theme.bg_systray = theme.bg_normal theme.fg_normal = "#a5a5a9" @@ -48,7 +51,7 @@ theme.border_marked = "#00000000" --theme.taglist_bg_focus = "#ff0000" -- Generate taglist squares: -local taglist_square_size = dpi(8) +local taglist_square_size = dpi(0) theme.taglist_squares_sel = theme_assets.taglist_squares_sel( taglist_square_size, theme.fg_normal ) @@ -86,17 +89,17 @@ theme.menu_width = dpi(100) theme.wibar_shape = gears.shape.rounded_bar theme.wibar_bg = theme.bg_normal theme.wibar_fg = theme.fg_normal --- theme.wibar_y = 1030 --- theme.wibar_x = 0 +theme.wibar_y = 1030 +theme.wibar_x = 0 -- theme.wibar_stretch = false -theme.wibar_border_width = dpi(5) -theme.wibar_border_color = nil +theme.wibar_border_width = dpi(0) +theme.wibar_border_color = "" -- theme.wibar_ontop = nil -- theme.wibar_cursor = nil -theme.wibar_opacity = 0.7 +theme.wibar_opacity = 0.6 -- theme.wibar_type = nil -theme.wibar_width = dpi(1900) -theme.wibar_height = dpi(30) +theme.wibar_width = dpi(1850) +-- theme.wibar_height = dpi(20) -- theme.wibar_bgimage = nil -- Define the image to load diff --git a/awesome/widget/clickable-container/init.lua b/awesome/widget/clickable-container/init.lua index 0ebff66..da0ca99 100644 --- a/awesome/widget/clickable-container/init.lua +++ b/awesome/widget/clickable-container/init.lua @@ -5,6 +5,7 @@ function build(widget) local container = wibox.widget { widget, + -- bg = beautiful.theme_bg, widget = wibox.container.background } local old_cursor, old_wibox diff --git a/awesome/widget/network/init.lua b/awesome/widget/network/init.lua index 38dc463..91508bb 100755 --- a/awesome/widget/network/init.lua +++ b/awesome/widget/network/init.lua @@ -56,7 +56,7 @@ local return_button = function() local widget_button = wibox.widget { { widget, - margins = dpi(7), + margins = dpi(2), widget = wibox.container.margin }, widget = clickable_container diff --git a/awesome/widget/package-updater/init.lua b/awesome/widget/package-updater/init.lua index c131f3b..1d53e16 100644 --- a/awesome/widget/package-updater/init.lua +++ b/awesome/widget/package-updater/init.lua @@ -40,7 +40,7 @@ local return_button = function() local widget_button = wibox.widget { { widget, - margins = dpi(7), + margins = dpi(2), widget = wibox.container.margin }, widget = clickable_container @@ -119,4 +119,4 @@ local return_button = function() end -return return_button \ No newline at end of file +return return_button diff --git a/awesome/widget/volume/init.lua b/awesome/widget/volume/init.lua new file mode 100644 index 0000000..e728e8b --- /dev/null +++ b/awesome/widget/volume/init.lua @@ -0,0 +1,150 @@ +local wibox = require('wibox') +local gears = require('gears') +local awful = require('awful') +local beautiful = require('beautiful') +local naughty = require('naughty') + +local watch = awful.widget.watch +local spawn = awful.spawn + +local dpi = beautiful.xresources.apply_dpi + +local icons = require('theme.icons') + +local return_widget = function () + +local slider = wibox.widget { + nil, + { + id = 'vol_slider', + bar_shape = gears.shape.rounded_rect, + bar_height = dpi(2), + bar_color = '#ffffff20', + bar_active_color = '#f2f2f2EE', + handle_color = '#ffffff', + handle_shape = gears.shape.circle, + handle_width = dpi(15), + handle_border_color = '#00000012', + handle_border_width = dpi(1), + maximum = 100, + widget = wibox.widget.slider, + }, + nil, + expand = 'none', + layout = wibox.layout.align.vertical +} + +local volume_slider = slider.vol_slider + +volume_slider:connect_signal( + 'property::value', + function() + + local volume_level = volume_slider:get_value() + + spawn('amixer sset Master ' .. + volume_level .. '%', + false + ) + + -- Update volume osd + awesome.emit_signal( + 'module::volume_osd', + volume_level + ) + + end +) + +volume_slider:buttons( + gears.table.join( + awful.button( + {}, + 4, + nil, + function() + if volume_slider:get_value() > 100 then + volume_slider:set_value(100) + return + end + volume_slider:set_value(volume_slider:get_value() + 5) + end + ), + awful.button( + {}, + 5, + nil, + function() + if volume_slider:get_value() < 0 then + volume_slider:set_value(0) + return + end + volume_slider:set_value(volume_slider:get_value() - 5) + end + ) + ) +) + + +local update_slider = function() + awful.spawn.easy_async_with_shell( + [[bash -c "amixer get Master"]], + function(stdout) + + local volume = string.match(stdout, '(%d?%d?%d)%%') + + -- debugging + -- naughty.notify{ title = "Volume changed", message = volume} + volume_slider:set_value(tonumber(volume)) + end + ) + +end + +-- Update on startup +update_slider() + +-- The emit will come from the global keybind +awesome.connect_signal( + 'widget::volume', + function() + update_slider() + end +) + +-- The emit will come from the OSD +awesome.connect_signal( + 'widget::volume:update', + function(value) + volume_slider:set_value(tonumber(value)) + end +) + +local volume_setting = wibox.widget { + { + { + { + image = icons.volume, + resize = true, + widget = wibox.widget.imagebox + }, + top = dpi(2), + bottom = dpi(2), + widget = wibox.container.margin + }, + slider, + spacing = dpi(2), + layout = wibox.layout.fixed.horizontal + + }, + left = dpi(2), + right = dpi(2), + forced_width = dpi(140), + -- forced_height = dpi(48), + widget = wibox.container.margin +} + +return volume_setting +end + +return return_widget diff --git a/awesome/widget/volume/volume-slider.lua b/awesome/widget/volume/volume-slider.lua index 6e16e63..4458240 100644 --- a/awesome/widget/volume/volume-slider.lua +++ b/awesome/widget/volume/volume-slider.lua @@ -39,7 +39,7 @@ volume_slider:connect_signal( local volume_level = volume_slider:get_value() - spawn('amixer -D pulse sset Master ' .. + spawn('amixer set Master ' .. volume_level .. '%', false ) @@ -85,7 +85,7 @@ volume_slider:buttons( local update_slider = function() awful.spawn.easy_async_with_shell( - [[bash -c "amixer -D pulse sget Master"]], + [[bash -c "amixer sget Master"]], function(stdout) local volume = string.match(stdout, '(%d?%d?%d)%%') diff --git a/firefox/chrome/chrome/navbar_tabs_oneliner_tabs_on_left.css b/firefox/chrome/chrome/navbar_tabs_oneliner_tabs_on_left.css index e3370ae..aae6a3d 100644 --- a/firefox/chrome/chrome/navbar_tabs_oneliner_tabs_on_left.css +++ b/firefox/chrome/chrome/navbar_tabs_oneliner_tabs_on_left.css @@ -1,5 +1,5 @@ /* Modify these to change relative widths or default height */ -#navigator-toolbox{ --uc-navigationbar-width: 11vw; --uc-toolbar-height: 30px; --window-drag-space-width: 20px} +#navigator-toolbox{ --uc-navigationbar-width: 11vw; --uc-toolbar-height: 29px; --window-drag-space-width: 20px} /* Override for other densities */ :root[uidensity="compact"] > #navigator-toolbox{ --uc-toolbar-height: 32px;} :root[uidensity="touch"] > #navigator-toolbox{ --uc-toolbar-height: 40px; } @@ -16,6 +16,7 @@ #toolbar-menubar[inactive]{ margin-bottom: calc(0px - var(--uc-toolbar-height)); margin-left: 0px; + height: calc(--uc-toolbar-height) !important; } #TabsToolbar > .titlebar-buttonbox-container, @@ -29,7 +30,6 @@ #TabsToolbar{ margin-right: calc(0px + var(--uc-navigationbar-width)); /* Remove empty space above tabs so that tabs are clickable at very top of screen */ - margin-top: -2px; margin-left: 10px; z-index: 10; } diff --git a/firefox/chrome/userChrome.css b/firefox/chrome/userChrome.css index eec82f5..18e8748 100644 --- a/firefox/chrome/userChrome.css +++ b/firefox/chrome/userChrome.css @@ -1,14 +1,23 @@ /* Example file enabling theme + some features */ /* material firefox imports */ + /* @import "global/variables.css"; */ + /* @import "global/global.css"; */ + /* @import "icons/icons.css"; */ + /* @import "tabbar/tabbar.css"; */ + /* @import "navbar/navbar.css"; */ + /* @import "personalbar/personalbar.css"; */ + /* @import "popup/popup.css"; */ + /* @import "urlbar/urlbar.css"; */ + /* @import "findbar/findbar.css"; */ /*@import url(chrome/theme_color_variables.css); @@ -16,15 +25,28 @@ @import url(chrome/theme_sidebar.css); @import url(chrome/theme_popups_and_menus.css); @import url(chrome/theme_additional_windows.css);*/ + /* @import url(chrome/status_inside_urlbar.css); */ + /*@import url(chrome/navigation_buttons_inside_urlbar.css);*/ + @import url(chrome/tab_close_button_always_on_hover.css); + @import url(chrome/button_effect_scale_onclick.css); + @import url(chrome/blank_page_background.css); + /* @import url(chrome/navbar_tabs_oneliner.css); */ + @import url(chrome/navbar_tabs_oneliner_tabs_on_left.css); + /* @import url(chrome/navbar_notabs.css); */ + /* @import url(chrome/page_action_buttons_on_hover.css); */ + @import url(chrome/autohide_sidebar.css); + @import url(chrome/menubar_in_toolbar.css); + @import url(chrome/hide_toolbox_top_bottom_borders.css); + diff --git a/firefox/chrome/userChrome.css.tri.bak b/firefox/chrome/userChrome.css.tri.bak new file mode 100644 index 0000000..eec82f5 --- /dev/null +++ b/firefox/chrome/userChrome.css.tri.bak @@ -0,0 +1,30 @@ +/* Example file enabling theme + some features */ + +/* material firefox imports */ +/* @import "global/variables.css"; */ +/* @import "global/global.css"; */ +/* @import "icons/icons.css"; */ +/* @import "tabbar/tabbar.css"; */ +/* @import "navbar/navbar.css"; */ +/* @import "personalbar/personalbar.css"; */ +/* @import "popup/popup.css"; */ +/* @import "urlbar/urlbar.css"; */ +/* @import "findbar/findbar.css"; */ + +/*@import url(chrome/theme_color_variables.css); +@import url(chrome/theme_toolbars.css); +@import url(chrome/theme_sidebar.css); +@import url(chrome/theme_popups_and_menus.css); +@import url(chrome/theme_additional_windows.css);*/ +/* @import url(chrome/status_inside_urlbar.css); */ +/*@import url(chrome/navigation_buttons_inside_urlbar.css);*/ +@import url(chrome/tab_close_button_always_on_hover.css); +@import url(chrome/button_effect_scale_onclick.css); +@import url(chrome/blank_page_background.css); +/* @import url(chrome/navbar_tabs_oneliner.css); */ +@import url(chrome/navbar_tabs_oneliner_tabs_on_left.css); +/* @import url(chrome/navbar_notabs.css); */ +/* @import url(chrome/page_action_buttons_on_hover.css); */ +@import url(chrome/autohide_sidebar.css); +@import url(chrome/menubar_in_toolbar.css); +@import url(chrome/hide_toolbox_top_bottom_borders.css); diff --git a/firefox/chrome/userChrome.orig.css b/firefox/chrome/userChrome.orig.css new file mode 100644 index 0000000..eec82f5 --- /dev/null +++ b/firefox/chrome/userChrome.orig.css @@ -0,0 +1,30 @@ +/* Example file enabling theme + some features */ + +/* material firefox imports */ +/* @import "global/variables.css"; */ +/* @import "global/global.css"; */ +/* @import "icons/icons.css"; */ +/* @import "tabbar/tabbar.css"; */ +/* @import "navbar/navbar.css"; */ +/* @import "personalbar/personalbar.css"; */ +/* @import "popup/popup.css"; */ +/* @import "urlbar/urlbar.css"; */ +/* @import "findbar/findbar.css"; */ + +/*@import url(chrome/theme_color_variables.css); +@import url(chrome/theme_toolbars.css); +@import url(chrome/theme_sidebar.css); +@import url(chrome/theme_popups_and_menus.css); +@import url(chrome/theme_additional_windows.css);*/ +/* @import url(chrome/status_inside_urlbar.css); */ +/*@import url(chrome/navigation_buttons_inside_urlbar.css);*/ +@import url(chrome/tab_close_button_always_on_hover.css); +@import url(chrome/button_effect_scale_onclick.css); +@import url(chrome/blank_page_background.css); +/* @import url(chrome/navbar_tabs_oneliner.css); */ +@import url(chrome/navbar_tabs_oneliner_tabs_on_left.css); +/* @import url(chrome/navbar_notabs.css); */ +/* @import url(chrome/page_action_buttons_on_hover.css); */ +@import url(chrome/autohide_sidebar.css); +@import url(chrome/menubar_in_toolbar.css); +@import url(chrome/hide_toolbox_top_bottom_borders.css); diff --git a/picom.conf b/picom.conf index a6fb7fb..bf6fed9 100644 --- a/picom.conf +++ b/picom.conf @@ -34,18 +34,18 @@ shadow = true; # The blur radius for shadows, in pixels. (defaults to 12) # shadow-radius = 12 -shadow-radius = 15; +shadow-radius = 12; # The opacity of shadows. (0.0 - 1.0, defaults to 0.75) -shadow-opacity = .75 +shadow-opacity = .85 # The left offset for shadows, in pixels. (defaults to -15) # shadow-offset-x = -15 -shadow-offset-x = -17; +shadow-offset-x = 3; # The top offset for shadows, in pixels. (defaults to -15) # shadow-offset-y = -15 -shadow-offset-y = -17; +shadow-offset-y = 3; # Avoid drawing shadows on dock/panel windows. This option is deprecated, # you should use the *wintypes* option in your config file instead. @@ -481,9 +481,9 @@ log-level = "info"; # wintypes: { - normal = { fade = false; shadow = false; } + normal = { fade = false; shadow = true; } tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; - dock = { shadow = false; } + dock = { shadow = true; } dnd = { shadow = false; } popup_menu = { opacity = 0.8; } dropdown_menu = { opacity = 0.8; } diff --git a/rofi/config b/rofi/config index 0406648..5f99e24 100644 --- a/rofi/config +++ b/rofi/config @@ -1 +1 @@ -rofi.theme: /usr/share/rofi/themes/Arc-Dark.rasi +// rofi.theme: /usr/share/rofi/themes/Arc-Dark.rasi diff --git a/rofi/config.rasi b/rofi/config.rasi index 89f1246..d7a80ac 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -3,8 +3,8 @@ configuration { show-icons: true; icon-theme: "Papirus"; - location: 5; - yoffset: -50; - xoffset: -20; + // location: 5; + // yoffset: -50; + // xoffset: -20; } -@import "/usr/share/rofi/themes/android_notification.rasi" +// @import "/usr/share/rofi/themes/android_notification.rasi" diff --git a/rofi/launchers-git/blurry.rasi b/rofi/launchers-git/blurry.rasi index 818fb89..ea04a38 100644 --- a/rofi/launchers-git/blurry.rasi +++ b/rofi/launchers-git/blurry.rasi @@ -11,7 +11,7 @@ configuration { font: "VictorMono Nerd Font 11"; show-icons: true; icon-theme: "Papirus"; - display-drun: "⮞"; + display-drun: ""; drun-display-format: "{name} {description}"; threads: 0; scroll-method: 0; @@ -66,9 +66,9 @@ inputbar { prompt { enabled: true; - padding: -5px 10px 0px 8px; + padding: 0px 10px 0px 5px; background-color: @transparent; - font: "FantasqueSansMono Nerd Font 16"; + // font: "FantasqueSansMono Nerd Font 16"; border: 0px; } @@ -77,9 +77,10 @@ entry { placeholder-color: @foreground; expand: true; horizontal-align: 0; - placeholder: "Search"; + // placeholder: "Search"; blink: true; border: 0px; + padding: 0px 0px 0px 10px; } case-indicator { diff --git a/rofi/launchers-git/blurry_full.rasi b/rofi/launchers-git/blurry_full.rasi index 5275c61..7cddd84 100644 --- a/rofi/launchers-git/blurry_full.rasi +++ b/rofi/launchers-git/blurry_full.rasi @@ -1,3 +1,4 @@ +/*-*- mode: css; -*-*/ /* * * Author : Aditya Shakya (adi1090x) @@ -8,14 +9,15 @@ */ configuration { - font: "Noto Sans 10"; + font: "VictorMono Nerd Font 11"; show-icons: true; icon-theme: "Papirus"; + display-drun: " "; drun-display-format: "{name}"; threads: 0; scroll-method: 0; disable-history: false; - fullscreen: false; + fullscreen: true; hide-scrollbar: true; sidebar-mode: false; } @@ -34,6 +36,7 @@ configuration { window { transparency: "real"; background-color: @background; + border: 0px; text-color: @foreground; height: 100%; width: 100%; @@ -44,7 +47,9 @@ window { } prompt { - enabled: false; + background-color: @background; + text-color: @foreground; + enabled: true; } @@ -52,8 +57,8 @@ inputbar { background-color: @background-alt; text-color: @foreground; expand: false; - border-radius: 6px; - margin: 0px 430px 0px 430px; + border-radius: 60px; + margin: 0px 230px 0px 230px; padding: 10px 10px 10px 10px; position: north; } @@ -78,15 +83,15 @@ case-indicator { listview { background-color: @background; - columns: 7; - spacing: 4px; + columns: 5; + spacing: 15px; cycle: false; dynamic: true; layout: vertical; } mainbox { - background-color: @background-color; + background-color: @background; children: [ inputbar, listview ]; spacing: 25px; padding: 70px 135px 55px 135px; @@ -96,27 +101,34 @@ element { background-color: @background; text-color: @foreground; orientation: vertical; - border-radius: 9px; + border-radius: 15px; padding: 20px 0px 20px 0px; } element-icon { size: 65px; + background-color: @background; border: 0px; } element-text { expand: true; + background-color: @background; horizontal-align: 0.5; vertical-align: 0.5; margin: 5px 10px 0px 10px; } +element normal.normal, +element alternate.normal { + background-color: @background; +} + element normal.urgent, element alternate.urgent { background-color: @urgent; text-color: @foreground; - border-radius: 9px; + border-radius: 15px; } element normal.active, diff --git a/rofi/launchers-git/launcher.sh b/rofi/launchers-git/launcher.sh index 098fdc4..a277807 100755 --- a/rofi/launchers-git/launcher.sh +++ b/rofi/launchers-git/launcher.sh @@ -12,6 +12,6 @@ # gnome_do slingshot appdrawer appfolder column # row row_center screen row_dock row_dropdown -style="blurry" +style="blurry_full" -rofi -no-lazy-grab -show drun -modi drun,window,calc,ssh,run,emoji -theme launchers-git/"$style".rasi & sleep 0.3 && xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -name rofi +rofi -no-lazy-grab -show drun -modi drun,window,calc,ssh,run,emoji -theme launchers-git/"$style".rasi