From 7606fc5369084e17415acc54b2c23ee9025992ea Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 1 Oct 2021 06:03:25 -0500 Subject: [PATCH] making awesome notifications better --- awesome/init.fnl | 28 +++++++++++++++++----------- awesome/theme.lua | 1 + scripts/nyxtlof | 4 ++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/awesome/init.fnl b/awesome/init.fnl index b60e0f5..0be2ece 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -52,6 +52,19 @@ (local bling (require "bling")) ;; (local awestore (require "awestore")) +(set naughty.config.defaults.position "bottom_middle") +(set naughty.config.defaults.margin 10) +(set naughty.config.defaults.border_width 0) +(set naughty.config.defaults.hover_timeout 5) +(set naughty.config.defaults.max_width (dpi 500)) + +;; { +;; :rule { } +;; :properties { +;; :border-width 0 +;; :border_color "#000000" +;; :opacity 0.9 +;; :shape gears.shape.rounded_rect}} ;; This is used later as the default terminal and editor to run. (var terminal "alacritty") (var editor (or (os.getenv "EDITOR") "emacsclient")) @@ -619,15 +632,7 @@ (ruled.notification.connect_signal "request::rules" (fn [] - (ruled.notification.append_rules notifications - ;; { - ;; :rule { } - ;; :properties { - ;; :border-width 0 - ;; :border_color "#000000" - ;; :opacity 0.9 - ;; :shape gears.shape.rounded_rect}} - ))) + (ruled.notification.append_rules notifications))) ;; Signals ;; Signal function to execute when a new client appears. @@ -690,13 +695,14 @@ (awful.spawn.once "picom --experimental-backend") (awful.spawn.once "/usr/lib/polkit-kde-authentication-agent-1") -(awful.spawn.once "feh --bg-fill /usr/share/wallpapers/Flow/contents/images/5120x2880.jpg") +(awful.spawn.once "feh --bg-fill /home/chris/Pictures/wallpapers/tech.jpg") (awful.spawn.once "caffeine") (awful.spawn.once "bluetoothctl power on") (awful.spawn.once "nextcloud --background") (awful.spawn.once "rbw-agent") -(awful.spawn.once "jellyfin-mpv-shim") +(awful.spawn.once "killall jellyfin-mpv-shim && jellyfin-mpv-shim") (awful.spawn.once "xset r rate 220 90") +(awful.spawn.once "/usr/lib/kdeconnectd") (awful.spawn.once "autorandr -c") (awful.spawn.once "xcape -e 'Super_L=Super_L|Control_L|Escape'") ;; (awful.spawn.once "latte-dock") diff --git a/awesome/theme.lua b/awesome/theme.lua index 4af3162..eaf03be 100644 --- a/awesome/theme.lua +++ b/awesome/theme.lua @@ -98,6 +98,7 @@ theme.notification_margin = dpi(10) theme.notification_border_width = 0 theme.notification_shape = gears.shape.rounded_rect theme.notification_position = "bottom_middle" +theme.notification_spacing = 10.0 -- notification_[border_color|border_width|shape|opacity] -- Variables set for theming the menu: diff --git a/scripts/nyxtlof b/scripts/nyxtlof index 9c47aac..6a7d5e3 100755 --- a/scripts/nyxtlof +++ b/scripts/nyxtlof @@ -10,7 +10,7 @@ if pgrep -x nyxt > /dev/null; then # echo $emacsrg if [ -z $nyxtrg ]; then - env GDK_SCALE=2 GDK_DPI_SCALE=0.5 nyxt + nyxt exit else wmctrl -ia $nyxtrg @@ -29,5 +29,5 @@ if pgrep -x nyxt > /dev/null; then fi else echo not running - env GDK_SCALE=2 GDK_DPI_SCALE=0.5 nyxt + nyxt fi