From b20945970ba46999c8c4f234ea0456ca368e179a Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:53:50 +0530 Subject: Using kitty terminal instead of alacritty. Setup xdg-desktop-portal. --- modules/desktop/status-bar/polybar/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'modules/desktop/status-bar/polybar/default.nix') diff --git a/modules/desktop/status-bar/polybar/default.nix b/modules/desktop/status-bar/polybar/default.nix index b8e1907..fb72e5f 100644 --- a/modules/desktop/status-bar/polybar/default.nix +++ b/modules/desktop/status-bar/polybar/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: { options.desktop.status-bar.polybar = { @@ -7,11 +7,13 @@ type = lib.types.str; description = "Command to run polybar."; # This command calculates the width of the polybar to create those gaps - default = '' -MONITOR_WIDTH=$(xrandr | grep '*' | awk '{print $1}' | cut -d'x' -f1 | head -n1); \ -OFFSET=${toString config.desktop.window-manager.gap}; \ + default = toString (pkgs.writeShellScript "polybar-run.sh" '' +#!/bin/sh + +MONITOR_WIDTH=$(xrandr | grep '*' | awk '{print $1}' | cut -d'x' -f1 | head -n1) +OFFSET=${toString config.desktop.window-manager.gap} POLYBAR_WIDTH=$((MONITOR_WIDTH - 2 * OFFSET)) POLYBAR_OFFSET=$OFFSET polybar main & -''; +''); }; }; -- cgit v1.2.3