From f8672b84d61da6ddf27ba33593314f4312a274d9 Mon Sep 17 00:00:00 2001 From: erius Date: Thu, 22 Aug 2024 00:54:08 +0300 Subject: [PATCH] awesome: Switch to autostart with dex picom: remove opacity from all windows expect kitty --- awesome/autorun.sh | 6 +++--- awesome/config/rules.lua | 6 +++++- awesome/rc.lua | 33 +++++---------------------------- 3 files changed, 13 insertions(+), 32 deletions(-) diff --git a/awesome/autorun.sh b/awesome/autorun.sh index b0cffdb..600ee69 100755 --- a/awesome/autorun.sh +++ b/awesome/autorun.sh @@ -3,13 +3,13 @@ run() { if ! pgrep -f "$1" ; then - "$@"& + $@ & fi } -run "xautolock -detectsleep -time 1 -locker '~/.local/bin/lock.sh'" +run "xautolock" "-detectsleep -time 10 -locker '~/.local/bin/lock.sh'" run "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" run "nm-applet" run "picom" -run "openrgb --startminimized -p traaaaa" +run "openrgb" "--startminimized -p traaaaa" diff --git a/awesome/config/rules.lua b/awesome/config/rules.lua index bcee3ed..2f7b673 100644 --- a/awesome/config/rules.lua +++ b/awesome/config/rules.lua @@ -33,9 +33,13 @@ ruled.client.connect_signal('request::rules', function() properties = { screen = 2, tag = '2: Discord' } }) - ruled.client.append_rule({ rule = { class = 'nekoray' }, properties = { screen = 2, tag = '3: VPN' } }) + + ruled.client.append_rule({ + rule = { class = 'firefox' }, + properties = { screen = 2, tag = '1: Web' } + }) end) diff --git a/awesome/rc.lua b/awesome/rc.lua index 86ec919..62be2e0 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -38,32 +38,9 @@ require('config.rules') local awful = require('awful') --- Autorun background daemons -awful.spawn.with_shell('~/.config/awesome/autorun.sh') - --- Autorun windowed apps -local autorunApps = { - { - app = "nekoray", - rules = { screen = 2, tag = "3: VPN" }, - matcher = nil, - unique_id = nil - }, - { - app = "firefox", - rules = { screen = 2, tag = "1: Web" }, - matcher = nil, - unique_id = nil - }, - { - app = "discord", - rules = { screen = 2, tag = "2: Discord" }, - matcher = nil, - unique_id = nil - } -} - -for i = 1, #autorunApps do - awful.spawn.once(autorunApps[i].app, autorunApps[i].rules, autorunApps[i].matcher, autorunApps[i].unique_id) -end +awful.spawn.with_shell( + 'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' .. + 'xrdb -merge <<< "awesome.started:true";' .. + 'dex --environment Awesome --autostart --search-paths "${XDG_CONFIG_HOME:-$HOME/.config}/autostart:${XDG_CONFIG_DIRS:-/etc/xdg}/autostart";' +)