diff --git a/flake.lock b/flake.lock index e2fc5bf..db044c2 100644 --- a/flake.lock +++ b/flake.lock @@ -55,6 +55,22 @@ "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": { "inputs": { "nixpkgs-lib": [ @@ -101,6 +117,24 @@ "inputs": { "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": { "lastModified": 1685518550, "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", @@ -116,6 +150,28 @@ } }, "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": { "nixpkgs": [ "nixvim", @@ -222,6 +278,26 @@ "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": { "locked": { "lastModified": 1693471703, @@ -238,6 +314,22 @@ "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": { "locked": { "lastModified": 1704194953, @@ -271,6 +363,22 @@ } }, "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": { "lastModified": 1704194953, "narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", @@ -292,7 +400,7 @@ "nixpkgs": [ "nixpkgs" ], - "pre-commit-hooks": "pre-commit-hooks" + "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { "lastModified": 1704535566, @@ -311,8 +419,36 @@ "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", - "flake-utils": "flake-utils", + "flake-utils": [ + "kde2nix", + "flake-utils" + ], "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": [ "nixvim", "nixpkgs" @@ -342,7 +478,8 @@ "anyrun": "anyrun", "home-manager": "home-manager", "hyprland": "hyprland", - "nixpkgs": "nixpkgs_4", + "kde2nix": "kde2nix", + "nixpkgs": "nixpkgs_5", "nixvim": "nixvim" } }, @@ -376,6 +513,21 @@ "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": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 0a9ed5c..2b98635 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; hyprland.url = "github:hyprwm/hyprland"; + kde2nix.url = "github:nix-community/kde2nix"; }; outputs = { @@ -24,6 +25,7 @@ nixvim, anyrun, hyprland, + kde2nix, ... } @ inputs: let inherit (nixpkgs.lib) genAttrs listToAttrs; @@ -35,8 +37,6 @@ allowUnfree = true; allowUnsupportedSystem = true; experimental-features = "nix-command flakes"; - }; - nix.settings = { substituters = ["https://hyprland.cachix.org"]; trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; }; @@ -45,6 +45,7 @@ anyrunPlugins = anyrun.packages.${prev.system}; hyprland = hyprland.packages.${prev.system}.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/nixos/hid-fanatecff ./hosts/${hostname} + kde2nix.nixosModules.plasma6 home-manager.nixosModules.home-manager { _module.args = {inherit username;}; diff --git a/home/desktops/hyprland/ags/assets/Lakeside-2-1.jpg b/home/desktops/hyprland/ags/assets/Lakeside-2-1.jpg new file mode 100644 index 0000000..a9dee5e Binary files /dev/null and b/home/desktops/hyprland/ags/assets/Lakeside-2-1.jpg differ diff --git a/home/desktops/hyprland/ags/assets/Lakeside-2-10.jpg b/home/desktops/hyprland/ags/assets/Lakeside-2-10.jpg new file mode 100644 index 0000000..942d209 Binary files /dev/null and b/home/desktops/hyprland/ags/assets/Lakeside-2-10.jpg differ diff --git a/home/desktops/hyprland/ags/js/options.js b/home/desktops/hyprland/ags/js/options.js index 458bd96..3c574fa 100644 --- a/home/desktops/hyprland/ags/js/options.js +++ b/home/desktops/hyprland/ags/js/options.js @@ -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", diff --git a/home/desktops/hyprland/ags/js/settings/hyprland.js b/home/desktops/hyprland/ags/js/settings/hyprland.js index 5db435b..cb311b8 100644 --- a/home/desktops/hyprland/ags/js/settings/hyprland.js +++ b/home/desktops/hyprland/ags/js/settings/hyprland.js @@ -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); + ]); } diff --git a/home/desktops/hyprland/ags/js/settings/setup.js b/home/desktops/hyprland/ags/js/settings/setup.js index 8bcb1c0..083fb6c 100644 --- a/home/desktops/hyprland/ags/js/settings/setup.js +++ b/home/desktops/hyprland/ags/js/settings/setup.js @@ -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(); diff --git a/home/desktops/hyprland/ags/js/themes.js b/home/desktops/hyprland/ags/js/themes.js index 2b027a0..8d434b9 100644 --- a/home/desktops/hyprland/ags/js/themes.js +++ b/home/desktops/hyprland/ags/js/themes.js @@ -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, diff --git a/home/desktops/hyprland/darkman.nix b/home/desktops/hyprland/darkman.nix index ee258ab..3212d4e 100644 --- a/home/desktops/hyprland/darkman.nix +++ b/home/desktops/hyprland/darkman.nix @@ -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} - ''; }; }; } diff --git a/home/desktops/hyprland/default.nix b/home/desktops/hyprland/default.nix index 080fafc..872775a 100644 --- a/home/desktops/hyprland/default.nix +++ b/home/desktops/hyprland/default.nix @@ -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 diff --git a/home/desktops/hyprland/keybinds.nix b/home/desktops/hyprland/keybinds.nix index e4adb0e..08c40ae 100644 --- a/home/desktops/hyprland/keybinds.nix +++ b/home/desktops/hyprland/keybinds.nix @@ -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" diff --git a/home/desktops/hyprland/monitors.nix b/home/desktops/hyprland/monitors.nix deleted file mode 100644 index 606058a..0000000 --- a/home/desktops/hyprland/monitors.nix +++ /dev/null @@ -1,5 +0,0 @@ -[ - "DP-1,highrr,0x0,1" - "DP-3,highrr,1920x0,1" - "HDMI-A-1,highrr,0x1080,1,transform,2" -] diff --git a/home/desktops/none/default.nix b/home/desktops/none/default.nix new file mode 100644 index 0000000..6462967 --- /dev/null +++ b/home/desktops/none/default.nix @@ -0,0 +1 @@ +{...}: {} diff --git a/hosts/MONSTER/default.nix b/hosts/MONSTER/default.nix index 490dd3c..e8759f1 100644 --- a/hosts/MONSTER/default.nix +++ b/hosts/MONSTER/default.nix @@ -47,9 +47,6 @@ "boot.shell_on_fail" "vt.global_cursor_default=0" # no cursor blinking "fbdev=1" # NVIDIA - "video=DP-1:1920x1080@240" - "video=DP-3:2560x1440@75" - "video=HDMI-A-1:1920x1080@75" ]; consoleLogLevel = 0; initrd.verbose = false; @@ -119,8 +116,7 @@ # Configure keymap in X11 console.useXkbConfig = true; services.xserver = { - layout = "us"; - xkbVariant = "altgr-intl"; + layout = "cc1-thea"; extraLayouts.cc1-thea = { description = "A CC1 optimized layout"; languages = ["eng" "ger"]; @@ -151,6 +147,9 @@ services.getty.loginOptions = "-p -f -- \\u"; # preserve environment programs.hyprland.enable = true; programs.fish.enable = true; + security.sudo.configFile = '' + Defaults env_reset,pwfeedback,insults,passprompt="󰟵 " + ''; users.defaultUserShell = pkgs.fish; users.users.${username} = { isNormalUser = true;