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

158
flake.lock generated
View File

@@ -55,6 +55,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@@ -101,6 +117,24 @@
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
@@ -116,6 +150,28 @@
} }
}, },
"gitignore": { "gitignore": {
"inputs": {
"nixpkgs": [
"kde2nix",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
@@ -222,6 +278,26 @@
"type": "github" "type": "github"
} }
}, },
"kde2nix": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_4",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1704378678,
"narHash": "sha256-cKyRey93E9ikisnzDB/DcPC8zu1iiK5miDQ5WoGg1ek=",
"owner": "nix-community",
"repo": "kde2nix",
"rev": "b123e781c912109c41c34d7778b970c9d8e403b7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "kde2nix",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1693471703, "lastModified": 1693471703,
@@ -238,6 +314,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": {
"locked": {
"lastModified": 1685801374,
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1704194953, "lastModified": 1704194953,
@@ -271,6 +363,22 @@
} }
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": {
"lastModified": 1704367582,
"narHash": "sha256-mAm6fl0VtONvT03ia/MzXKHAxNMWLYZMTV7VpXRBiho=",
"owner": "K900",
"repo": "nixpkgs",
"rev": "e06ffa09d0041a8864bf4304674953a7cf3acaf4",
"type": "github"
},
"original": {
"owner": "K900",
"ref": "qt6ening",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1704194953, "lastModified": 1704194953,
"narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", "narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=",
@@ -292,7 +400,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks_2"
}, },
"locked": { "locked": {
"lastModified": 1704535566, "lastModified": 1704535566,
@@ -311,8 +419,36 @@
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": [
"kde2nix",
"flake-utils"
],
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [
"kde2nix",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1703939133,
"narHash": "sha256-Gxe+mfOT6bL7wLC/tuT2F+V+Sb44jNr8YsJ3cyIl4Mo=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "9d3d7e18c6bc4473d7520200d4ddab12f8402d38",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"gitignore": "gitignore_2",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
@@ -342,7 +478,8 @@
"anyrun": "anyrun", "anyrun": "anyrun",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixpkgs": "nixpkgs_4", "kde2nix": "kde2nix",
"nixpkgs": "nixpkgs_5",
"nixvim": "nixvim" "nixvim": "nixvim"
} }
}, },
@@ -376,6 +513,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"wlroots": { "wlroots": {
"flake": false, "flake": false,
"locked": { "locked": {

View File

@@ -15,6 +15,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprland.url = "github:hyprwm/hyprland"; hyprland.url = "github:hyprwm/hyprland";
kde2nix.url = "github:nix-community/kde2nix";
}; };
outputs = { outputs = {
@@ -24,6 +25,7 @@
nixvim, nixvim,
anyrun, anyrun,
hyprland, hyprland,
kde2nix,
... ...
} @ inputs: let } @ inputs: let
inherit (nixpkgs.lib) genAttrs listToAttrs; inherit (nixpkgs.lib) genAttrs listToAttrs;
@@ -35,8 +37,6 @@
allowUnfree = true; allowUnfree = true;
allowUnsupportedSystem = true; allowUnsupportedSystem = true;
experimental-features = "nix-command flakes"; experimental-features = "nix-command flakes";
};
nix.settings = {
substituters = ["https://hyprland.cachix.org"]; substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
}; };
@@ -45,6 +45,7 @@
anyrunPlugins = anyrun.packages.${prev.system}; anyrunPlugins = anyrun.packages.${prev.system};
hyprland = hyprland.packages.${prev.system}.hyprland; hyprland = hyprland.packages.${prev.system}.hyprland;
xdg-desktop-portal-hyprland = hyprland.packages.${prev.system}.xdg-desktop-portal-hyprland; xdg-desktop-portal-hyprland = hyprland.packages.${prev.system}.xdg-desktop-portal-hyprland;
ags = ags.packages.${prev.system}.default;
}) })
]; ];
}); });
@@ -61,6 +62,7 @@
modules = [ modules = [
./modules/nixos/hid-fanatecff ./modules/nixos/hid-fanatecff
./hosts/${hostname} ./hosts/${hostname}
kde2nix.nixosModules.plasma6
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
_module.args = {inherit username;}; _module.args = {inherit username;};

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", category: "Bar",
title: "No. workspaces on bar and overview", title: "No. workspaces on bar and overview",
note: "Set it to 0 to make it dynamic", 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 border_width = options.border.width.value;
const radii = options.radii.value; const radii = options.radii.value;
const drop_shadow = options.desktop.drop_shadow.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 inactive_border = options.hypr.inactive_border.value;
const accent = getColor(options.theme.accent.accent.value); const accent = getColor(options.theme.accent.accent.value);
const batch = []; sendBatch([
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(
`general:border_size ${border_width}`, `general:border_size ${border_width}`,
`general:gaps_out ${wm_gaps}`, `general:gaps_out ${wm_gaps}`,
`general:gaps_in ${Math.floor(wm_gaps / 2)}`, `general:gaps_in ${Math.floor(wm_gaps / 2)}`,
@@ -66,7 +56,5 @@ export async function setupHyprland() {
`general:col.inactive_border ${inactive_border}`, `general:col.inactive_border ${inactive_border}`,
`decoration:rounding ${radii}`, `decoration:rounding ${radii}`,
`decoration:drop_shadow ${drop_shadow ? "yes" : "no"}`, `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 Notifications from "resource:///com/github/Aylur/ags/service/notifications.js";
import options from "../options.js"; import options from "../options.js";
import icons from "../icons.js"; import icons from "../icons.js";
import { reloadScss, scssWatcher } from "./scss.js"; import { reloadScss } from "./scss.js";
import { wallpaper } from "./wallpaper.js"; import { wallpaper } from "./wallpaper.js";
import { hyprlandInit, setupHyprland } from "./hyprland.js"; import { hyprlandInit, setupHyprland } from "./hyprland.js";
import { globals } from "./globals.js"; import { globals } from "./globals.js";
@@ -11,15 +11,16 @@ import { showAbout } from "../about/about.js";
import Gtk from "gi://Gtk"; import Gtk from "gi://Gtk";
export function init() { export function init() {
console.log("init settings");
notificationBlacklist(); notificationBlacklist();
warnOnLowBattery(); warnOnLowBattery();
globals(); globals();
tmux(); tmux();
gsettigsColorScheme(); gsettigsColorScheme();
gtkFontSettings(); gtkFontSettings();
scssWatcher();
dependandOptions(); dependandOptions();
console.log("init scss");
reloadScss(); reloadScss();
hyprlandInit(); hyprlandInit();
setupHyprland(); setupHyprland();

View File

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

View File

@@ -57,14 +57,6 @@
lng = 13.405; lng = 13.405;
}; };
darkModeScripts = { darkModeScripts = {
gtk-theme =
/*
bash
*/
''
${pkgs.dconf}/bin/dconf write \
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
'';
kitty-theme = kitty-theme =
/* /*
bash 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 ${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 = { lightModeScripts = {
gtk-theme =
/*
bash
*/
''
${pkgs.dconf}/bin/dconf write \
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
'';
kitty-theme = kitty-theme =
/* /*
bash 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 ${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, config,
pkgs, pkgs,
lib,
... ...
}: { }: {
imports = [ imports = [
@@ -27,8 +28,6 @@
"GIO_EXTRA_MODULES,${pkgs.gnome.gvfs}/lib/gio/modules" "GIO_EXTRA_MODULES,${pkgs.gnome.gvfs}/lib/gio/modules"
]; ];
exec-once = [ exec-once = [
"swww init"
"ags -b hypr"
"systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XAUTHORITY" "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XAUTHORITY"
"dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XAUTHORITY" "dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XAUTHORITY"
"gnome-keyring-daemon --start --components=secrets" "gnome-keyring-daemon --start --components=secrets"
@@ -42,29 +41,33 @@
"col.active_border" = "rgba(0DB7D4FF)"; "col.active_border" = "rgba(0DB7D4FF)";
"col.inactive_border" = "rgba(31313600)"; "col.inactive_border" = "rgba(31313600)";
layout = "dwindle"; layout = "master";
resize_on_border = true; resize_on_border = true;
}; };
dwindle.preserve_split = true; master = {
dwindle.pseudotile = true; orientation = "center";
new_is_master = false;
always_center_master = true;
mfact = 0.4;
};
input = { input = {
accel_profile = "flat"; accel_profile = "flat";
kb_layout = "cc1-thea"; kb_layout = "cc1-thea";
# kb_options = "grp:alt_shift_toggle"; mouse_refocus = false;
numlock_by_default = true;
}; };
bind = import ./keybinds.nix; bind = import ./keybinds.nix;
bindm = import ./mousebinds.nix; bindm = import ./mousebinds.nix;
bindr = [ bindr = [
"SUPER,SUPER_L,exec,pkill anyrun || anyrun" "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 = [ workspace = [
"special:calc,border:false,gapsout:200,on-created-empty:[noanim;silent] kitty -e qalc" "special:calc,border:false,gapsout:200,on-created-empty:[noanim;silent] kitty -e qalc"
]; ];
windowrule = [
"pseudo,^(steam)$"
];
windowrulev2 = [ windowrulev2 = [
# Games # Games
## AC2 ## AC2
@@ -129,6 +132,32 @@
enable = true; enable = true;
configDir = ./ags; 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.kitty = import ./kitty.nix {inherit pkgs;};
programs.anyrun = import ./anyrun.nix {inherit pkgs;}; programs.anyrun = import ./anyrun.nix {inherit pkgs;};
services.udiskie.enable = true; services.udiskie.enable = true;
@@ -163,12 +192,7 @@
]; ];
})) }))
*/ */
swww # AGS
# ags
glib
brightnessctl
ydotool
sassc
# gnome packages # gnome packages
evince evince
gnome.gvfs gnome.gvfs

View File

@@ -4,7 +4,12 @@
"SUPER,C,togglespecialworkspace,calc" "SUPER,C,togglespecialworkspace,calc"
"SUPER_SHIFT,C,exec,hyprpicker" "SUPER_SHIFT,C,exec,hyprpicker"
"SUPER_SHIFT,V,exec,slurp | grim -g - - | wl-copy" "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,up,movewindow,u"
"SUPER_SHIFT,down,movewindow,d" "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"
]

View File

@@ -0,0 +1 @@
{...}: {}

View File

@@ -47,9 +47,6 @@
"boot.shell_on_fail" "boot.shell_on_fail"
"vt.global_cursor_default=0" # no cursor blinking "vt.global_cursor_default=0" # no cursor blinking
"fbdev=1" # NVIDIA "fbdev=1" # NVIDIA
"video=DP-1:1920x1080@240"
"video=DP-3:2560x1440@75"
"video=HDMI-A-1:1920x1080@75"
]; ];
consoleLogLevel = 0; consoleLogLevel = 0;
initrd.verbose = false; initrd.verbose = false;
@@ -119,8 +116,7 @@
# Configure keymap in X11 # Configure keymap in X11
console.useXkbConfig = true; console.useXkbConfig = true;
services.xserver = { services.xserver = {
layout = "us"; layout = "cc1-thea";
xkbVariant = "altgr-intl";
extraLayouts.cc1-thea = { extraLayouts.cc1-thea = {
description = "A CC1 optimized layout"; description = "A CC1 optimized layout";
languages = ["eng" "ger"]; languages = ["eng" "ger"];
@@ -151,6 +147,9 @@
services.getty.loginOptions = "-p -f -- \\u"; # preserve environment services.getty.loginOptions = "-p -f -- \\u"; # preserve environment
programs.hyprland.enable = true; programs.hyprland.enable = true;
programs.fish.enable = true; programs.fish.enable = true;
security.sudo.configFile = ''
Defaults env_reset,pwfeedback,insults,passprompt="󰟵 "
'';
users.defaultUserShell = pkgs.fish; users.defaultUserShell = pkgs.fish;
users.users.${username} = { users.users.${username} = {
isNormalUser = true; isNormalUser = true;