feat: customize ags more

This commit is contained in:
2024-01-07 18:33:36 +01:00
parent ee757cb6ed
commit e5796d4d6e
14 changed files with 223 additions and 84 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@@ -267,7 +267,7 @@ export default {
}),
},
workspaces: Option(0, {
workspaces: Option(10, {
category: "Bar",
title: "No. workspaces on bar and overview",
note: "Set it to 0 to make it dynamic",

View File

@@ -45,20 +45,10 @@ export async function setupHyprland() {
const border_width = options.border.width.value;
const radii = options.radii.value;
const drop_shadow = options.desktop.drop_shadow.value;
const bar_style = options.bar.style.value;
const bar_pos = options.bar.position.value;
const inactive_border = options.hypr.inactive_border.value;
const accent = getColor(options.theme.accent.accent.value);
const batch = [];
JSON.parse(await Hyprland.sendMessage("j/monitors")).forEach(({ name }) => {
const v = bar_pos === "top" ? `-${wm_gaps},0,0,0` : `0,-${wm_gaps},0,0`;
if (bar_style !== "normal") batch.push(`monitor ${name},addreserved,${v}`);
else batch.push(`monitor ${name},addreserved,0,0,0,0`);
});
batch.push(
sendBatch([
`general:border_size ${border_width}`,
`general:gaps_out ${wm_gaps}`,
`general:gaps_in ${Math.floor(wm_gaps / 2)}`,
@@ -66,7 +56,5 @@ export async function setupHyprland() {
`general:col.inactive_border ${inactive_border}`,
`decoration:rounding ${radii}`,
`decoration:drop_shadow ${drop_shadow ? "yes" : "no"}`,
);
sendBatch(batch);
]);
}

View File

@@ -3,7 +3,7 @@ import Battery from "resource:///com/github/Aylur/ags/service/battery.js";
import Notifications from "resource:///com/github/Aylur/ags/service/notifications.js";
import options from "../options.js";
import icons from "../icons.js";
import { reloadScss, scssWatcher } from "./scss.js";
import { reloadScss } from "./scss.js";
import { wallpaper } from "./wallpaper.js";
import { hyprlandInit, setupHyprland } from "./hyprland.js";
import { globals } from "./globals.js";
@@ -11,15 +11,16 @@ import { showAbout } from "../about/about.js";
import Gtk from "gi://Gtk";
export function init() {
console.log("init settings");
notificationBlacklist();
warnOnLowBattery();
globals();
tmux();
gsettigsColorScheme();
gtkFontSettings();
scssWatcher();
dependandOptions();
console.log("init scss");
reloadScss();
hyprlandInit();
setupHyprland();

View File

@@ -8,12 +8,16 @@ export default [
Theme({
name: "Kitty Dark",
icon: "󰄛",
"desktop.wallpaper.img": WP + "kittybl.jpeg",
"desktop.screen_corners": false,
"bar.style": "floating",
"desktop.wallpaper.img": WP + "Lakeside-2-1.jpg",
}),
Theme({
name: "Kitty Light",
icon: "󰄛",
"desktop.wallpaper.img": WP + "kitty.jpeg",
"desktop.screen_corners": false,
"bar.style": "floating",
"desktop.wallpaper.img": WP + "Lakeside-2-10.jpg",
...lightColors,
"theme.widget.bg": "$accent",
"theme.widget.opacity": 64,

View File

@@ -57,14 +57,6 @@
lng = 13.405;
};
darkModeScripts = {
gtk-theme =
/*
bash
*/
''
${pkgs.dconf}/bin/dconf write \
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
'';
kitty-theme =
/*
bash
@@ -72,24 +64,8 @@
''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${config.home.homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Frappe
'';
wallpaper =
/*
bash
*/
''
${pkgs.coreutils}/bin/ln -sf ${./wallpapers/Lakeside-2/Lakeside-2-1.jpg} ${wallpaperPath}
${pkgs.swww}/bin/swww img ${wallpaperPath}
'';
};
lightModeScripts = {
gtk-theme =
/*
bash
*/
''
${pkgs.dconf}/bin/dconf write \
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
'';
kitty-theme =
/*
bash
@@ -97,14 +73,6 @@
''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${config.home.homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Latte
'';
wallpaper =
/*
bash
*/
''
${pkgs.coreutils}/bin/ln -sf ${./wallpapers/Lakeside-2/Lakeside-2-10.jpg} ${wallpaperPath}
${pkgs.swww}/bin/swww img ${wallpaperPath}
'';
};
};
}

View File

@@ -1,6 +1,7 @@
{
config,
pkgs,
lib,
...
}: {
imports = [
@@ -27,8 +28,6 @@
"GIO_EXTRA_MODULES,${pkgs.gnome.gvfs}/lib/gio/modules"
];
exec-once = [
"swww init"
"ags -b hypr"
"systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XAUTHORITY"
"dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XAUTHORITY"
"gnome-keyring-daemon --start --components=secrets"
@@ -42,29 +41,33 @@
"col.active_border" = "rgba(0DB7D4FF)";
"col.inactive_border" = "rgba(31313600)";
layout = "dwindle";
layout = "master";
resize_on_border = true;
};
dwindle.preserve_split = true;
dwindle.pseudotile = true;
master = {
orientation = "center";
new_is_master = false;
always_center_master = true;
mfact = 0.4;
};
input = {
accel_profile = "flat";
kb_layout = "cc1-thea";
# kb_options = "grp:alt_shift_toggle";
numlock_by_default = true;
mouse_refocus = false;
};
bind = import ./keybinds.nix;
bindm = import ./mousebinds.nix;
bindr = [
"SUPER,SUPER_L,exec,pkill anyrun || anyrun"
];
monitor = import ./monitors.nix;
monitor = [
"DP-1,highrr,0x0,1,bitdepth,10"
"DP-1,addreserved,200,0,0,0"
"DP-3,highrr,3840x400,1,bitdepth,10"
];
workspace = [
"special:calc,border:false,gapsout:200,on-created-empty:[noanim;silent] kitty -e qalc"
];
windowrule = [
"pseudo,^(steam)$"
];
windowrulev2 = [
# Games
## AC2
@@ -129,6 +132,32 @@
enable = true;
configDir = ./ags;
};
xdg.configFile.ags.onChange = ''
${pkgs.procps}/bin/pkill -u $USER -USR2 ags || true
'';
systemd.user.services.ags = {
Unit = {
Description = "ags";
PartOf = ["graphical-session.target" "tray.target"];
};
Service = {
ExecStart = "${pkgs.ags}/bin/ags";
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
Restart = "on-failure";
KillMode = "mixed";
Environment = "PATH=/run/current-system/sw/bin/:${with pkgs;
lib.makeBinPath [
swww
sassc
glib
brightnessctl
ydotool
]}";
};
Install = {
WantedBy = ["graphical-session.target"];
};
};
programs.kitty = import ./kitty.nix {inherit pkgs;};
programs.anyrun = import ./anyrun.nix {inherit pkgs;};
services.udiskie.enable = true;
@@ -163,12 +192,7 @@
];
}))
*/
swww
# ags
glib
brightnessctl
ydotool
sassc
# AGS
# gnome packages
evince
gnome.gvfs

View File

@@ -4,7 +4,12 @@
"SUPER,C,togglespecialworkspace,calc"
"SUPER_SHIFT,C,exec,hyprpicker"
"SUPER_SHIFT,V,exec,slurp | grim -g - - | wl-copy"
"SUPER,P,pseudo,"
"SUPER,P,togglefloating,"
"SUPER,P,pin,"
"SUPER,D,fullscreen,1"
"SUPER,D,movetoworkspace,empty"
"SUPER,V,fullscreen,0"
"SUPER,V,movetoworkspace,empty"
"SUPER_SHIFT,up,movewindow,u"
"SUPER_SHIFT,down,movewindow,d"

View File

@@ -1,5 +0,0 @@
[
"DP-1,highrr,0x0,1"
"DP-3,highrr,1920x0,1"
"HDMI-A-1,highrr,0x1080,1,transform,2"
]