From f5f047a6f534c7b84856963af384f8d95bba6577 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 1 Jul 2024 10:09:52 -0500 Subject: [PATCH] updating how the configs config --- .config/ags/config.js | 28 +++++++++++++++++++++++++++- .config/ags/notifications.js | 6 +++++- .config/ags/style.css | 11 +++++------ home/modules/hyprland.nix | 5 ++--- modules/emacs.nix | 2 ++ scripts/startup.sh | 13 ------------- 6 files changed, 41 insertions(+), 24 deletions(-) delete mode 100755 scripts/startup.sh diff --git a/.config/ags/config.js b/.config/ags/config.js index d893edb..f53d21b 100644 --- a/.config/ags/config.js +++ b/.config/ags/config.js @@ -6,16 +6,42 @@ const audio = await Service.import('audio') import { NotificationPopups } from "./notifications.js" +function map_workspaces(id) { + switch (id) { + case 1: + return Widget.Label(""); + break; + case 2: + return Widget.Label(""); + break; + case 3: + return Widget.Label("󰈙"); + break; + case 4: + return Widget.Label("󰍨"); + break; + case 5: + return Widget.Label(""); + break; + case 9: + return Widget.Label(""); + break; + default: + return Widget.Label(`${id}`); + } +} + function workspaces() { const active = hyprland.active.workspace.bind("id"); const workspaces = hyprland.bind("workspaces") .as(ws => ws.map(({ id }) => id === -99 ? "" : Widget.Button({ onClicked: () => hyprland.messageAsync(`dispatch workspace ${id}`), - child: Widget.Label(`${id}`), + child: map_workspaces(id), class_name: active.as(i => `${i === id ? "focused" : ""}`), }))) return Widget.Box({ class_name: "workspaces", + spacing: 6, children: workspaces, }) } diff --git a/.config/ags/notifications.js b/.config/ags/notifications.js index 32dbdab..e3a517c 100644 --- a/.config/ags/notifications.js +++ b/.config/ags/notifications.js @@ -14,6 +14,8 @@ function NotificationIcon({ app_entry, app_icon, image }) { let icon = "dialog-information-symbolic" if (Utils.lookUpIcon(app_icon)) icon = app_icon + else + icon = "auth-fingerprint-symbolic" if (app_entry && Utils.lookUpIcon(app_entry)) icon = app_entry @@ -75,6 +77,7 @@ function Notification(n) { { class_name: `notification ${n.urgency}`, vertical: true, + spacing: 0, }, Widget.Box([ icon, @@ -92,6 +95,7 @@ function Notification(n) { export function NotificationPopups(monitor = 0) { const list = Widget.Box({ vertical: true, + spacing: 4, children: notifications.popups.map(Notification), }) @@ -114,7 +118,7 @@ export function NotificationPopups(monitor = 0) { class_name: "notification-popups", anchor: ["bottom", "right"], child: Widget.Box({ - css: "min-width: 2px; min-height: 2px;", + // css: "min-width: 2px; min-height: 2px;", class_name: "notifications", vertical: true, child: list, diff --git a/.config/ags/style.css b/.config/ags/style.css index 3eaff66..bf807db 100644 --- a/.config/ags/style.css +++ b/.config/ags/style.css @@ -124,7 +124,7 @@ window.notification-popups box.notifications { min-width: 100px; border-radius: 20px; padding: 1em; - margin: 1em; + /* margin: 1em; */ background-color: @backtransparent; } @@ -135,16 +135,15 @@ window.notification-popups box.notifications { } .notif-icon image { - font-size: 28px; + font-size: 22px; /* to center the icon */ - margin: 5px; + /* margin: 5px; */ color: @base0C; } .notif-icon box { min-width: 38px; min-height: 38px; - border-radius: 7px; } .notif-title { @@ -158,8 +157,8 @@ window.notification-popups box.notifications { } .notif-actions .notif-action-button { - margin: 0 .4em; - margin-top: .8em; + /* margin: 0 .4em; */ + /* margin-top: .8em; */ } .notif-actions .notif-action-button:first-child { diff --git a/home/modules/hyprland.nix b/home/modules/hyprland.nix index 218b5e3..9ad0f59 100644 --- a/home/modules/hyprland.nix +++ b/home/modules/hyprland.nix @@ -237,7 +237,7 @@ in "SUPER,v,exec,cliphist list | rofi -p '󱃔 ' -dmenu -theme ~/.config/rofi/launchers-git/laptop-rbw-wayland.rasi | cliphist decode | wl-copy" "SUPER,B,exec,/home/chris/bin/fflof" "SUPER,A,exec,alacritty --class pulsemixer -e pulsemixer" - "SUPERCTRL,i,exec,alacritty --class btop -e btm" + "SUPERCTRL,i,exec,alacritty --class btop -e btop" ",Print,exec,screenshot" "SUPERSHIFT,mouse_down,exec,zoomin in" "SUPERSHIFT,mouse_up,exec,zoomin out" @@ -296,7 +296,7 @@ in "SUPERALT,a,movetoworkspace,special:agenda" "SUPER,g,togglespecialworkspace,agenda" - "SUPERSHIFT,g,exec,waybar.sh" + "SUPERSHIFT,g,exec,ags --toggle-window 'bar0'" "SUPERALT,n,exec,eww update rightside=true" ]; @@ -333,7 +333,6 @@ in # "dunst" "ags" "rbw-agent" - "/home/chris/bin/startup.sh" "hyprctl dispatch --batch 'splitratio 1; splitration -0.35'" "dbus-update-activation-environment --systemd --all" "batmon.lisp" diff --git a/modules/emacs.nix b/modules/emacs.nix index fc784c7..4dab319 100644 --- a/modules/emacs.nix +++ b/modules/emacs.nix @@ -158,6 +158,8 @@ with lib; elpaPackages.ement mastodon qrencode + just-mode + justl gcmh mu4e use-package diff --git a/scripts/startup.sh b/scripts/startup.sh deleted file mode 100755 index 15c08e5..0000000 --- a/scripts/startup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -kwalletd5 & -systemctl --user stop jellyfin-mpv-shim.service & -systemctl --user stop nextcloud-client.service & -systemctl --user stop emacs.service & -killall .jellyfin-mpv-shim -/usr/lib/kdeconnectd & -nm-applet & -rbw-agent & -emacs --daemon & -nextcloud --background & -batmon.lisp &