From 4f9fdae94809d712e97fbd008c8680fd56e3820b Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Fri, 23 Dec 2022 20:43:09 +0100 Subject: [PATCH] [home] Change screen layouts with autorandr. --- autorandr/.config/autorandr/postswitch | 11 +++++++++++ conf/home/desktop.scm | 15 ++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 autorandr/.config/autorandr/postswitch diff --git a/autorandr/.config/autorandr/postswitch b/autorandr/.config/autorandr/postswitch new file mode 100755 index 0000000..54a46cc --- /dev/null +++ b/autorandr/.config/autorandr/postswitch @@ -0,0 +1,11 @@ +#!/bin/sh +# Copyright (c) 2022 Jakub Czajka +# License: GPL-3.0 or later. +# +# postswitch - Script executed after the layout switch. + +if [ `which wallpaper` ]; then + wallpaper +fi + +dunstify "🖵 Profile: ${AUTORANDR_CURRENT_PROFILE}" diff --git a/conf/home/desktop.scm b/conf/home/desktop.scm index db0e976..54027f7 100644 --- a/conf/home/desktop.scm +++ b/conf/home/desktop.scm @@ -9,8 +9,21 @@ #:use-module (conf home status-bar) #:use-module (conf home wallpaper) #:use-module (conf home xcompmgr) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xorg) #:use-module (gnu services) - #:export (desktop-services)) + #:export (autorandr-services + desktop-services)) + +(define autorandr-services + (list (service home-program-service-type + (home-program-configuration + (packages + (list autorandr + xrandr)) + (dotfiles + (list "autorandr/.config/autorandr/postswitch")))) + notify-service)) (define desktop-services (list status-bar-service -- 2.39.5