Skip to content

Commit

Permalink
pass
Browse files Browse the repository at this point in the history
  • Loading branch information
number5 committed Jul 21, 2024
1 parent db5a40a commit 9eb7469
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 36 deletions.
20 changes: 13 additions & 7 deletions home/modules/wayland/hyprland/config.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{
config,
lib,
pkgs,
eww,
anyrun,
...
}: let
pointer = config.home.pointerCursor;
anyrun-with-all-plugins = anyrun.packages.${pkgs.system}.anyrun-with-all-plugins;
eww-bin = eww.packages.${pkgs.system}.eww;

toggle = program: service: let
prog = builtins.substring 0 14 program;
runserv = lib.optionalString service "run-as-service";
in "pkill ${prog} || ${runserv} ${program}";
in {
wayland.windowManager.hyprland = {
settings = {
Expand All @@ -20,8 +29,8 @@ in {
"wl-paste --type text --watch cliphist store"
"wl-paste --type image --watch cliphist store"

"${lib.exe eww.packags.eww daemon}"
"${lib.exe eww open bar}"
"${eww-bin}/bin/eww daemon"
"${eww-bin}/bin/eww open bar"
];
xwayland.force_zero_scaling = true;
input = {
Expand Down Expand Up @@ -132,7 +141,6 @@ in {
bind = [
"$MOD, Escape, exec, wlogout -p layer-shell"
# "$MOD, Tab, exec, ags -t overview"
# "$MOD, XF86Calculator, exec, ags -r 'recorder.start()'"

# SSS
"ALT, Print, exec, screenshot-full"
Expand All @@ -143,8 +151,8 @@ in {

#"$MODSHIFT, X, exec, $COLORPICKER"

"$MOD, D, exec, pkill .anyrun-wrapped || run-as-service anyrun"
"$MOD, Return, exec, run-as-service wezterm"
"$MOD, R, exec, ${toggle "${anyrun-with-all-plugins}/bin/anyrun" true}"
"$MOD, Return, exec, run-as-service ${pkgs.wezterm}/bin/wezterm"
"CTRL_ALT, L, exec, loginctl lock-session"

"$MOD, Q, killactive"
Expand Down Expand Up @@ -214,7 +222,6 @@ in {
bindm = ["$MOD, mouse:272, movewindow" "$MOD, mouse:273, resizewindow"];
windowrulev2 = [
# "opacity 0.90 0.90,class:^(org.wezfurlong.wezterm)$"
# "opacity 0.90 0.90,class:^(foot)$"
# "opacity 0.90 0.90,class:^(Brave-browser)$"
# "opacity 0.90 0.90,class:^(brave-browser)$"
# "opacity 0.90 0.90,class:^(firefox)$"
Expand Down Expand Up @@ -254,7 +261,6 @@ in {
"float,title:^(branchdialog)$"
"float,title:^(Confirm to replace files)$"
"float,title:^(File Operation Progress)$"
"float,class:^(com.github.Aylur.ags)$"
"float,class:^(mpv)$"
"float,class:^(org.telegram.desktop)"
"size 380 690,class:^(org.telegram.desktop)"
Expand Down
70 changes: 43 additions & 27 deletions home/modules/wayland/hyprland/default.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,50 @@
_: {
inputs,
pkgs,
{
self,
eww,
anyrun,
...
}: {
imports = [
./config.nix
./rules.nix
];

home = {
packages = with pkgs; [
seatd
jaq
];
config,
pkgs,
lib,
...
}: let
hypr-config = import ./config.nix {
eww = eww;
anyrun = anyrun;
lib = lib;
config = config;
pkgs = pkgs;
};
# enable hyprland
wayland.windowManager.hyprland = {
enable = true;
rules = import ./rules.nix;
in {
imports = [ rules ];
config =
hypr-config
// {
home = {
packages = with pkgs; [
seatd
jaq
];
};

# enable hyprland
wayland.windowManager.hyprland = {
enable = true;

# plugins = with inputs.hyprland-plugins.packages.${pkgs.system}; [
# # hyprbars
# # hyprexpo
# ];
# plugins = with inputs.hyprland-plugins.packages.${pkgs.system}; [
# # hyprbars
# # hyprexpo
# ];

systemd = {
variables = ["--all"];
extraCommands = [
"systemctl --user stop graphical-session.target"
"systemctl --user start hyprland-session.target"
];
systemd = {
variables = ["--all"];
extraCommands = [
"systemctl --user stop graphical-session.target"
"systemctl --user start hyprland-session.target"
];
};
};
};
};
}
2 changes: 0 additions & 2 deletions parts/home_configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ in {
{systemd.user.startServices = "legacy";}
inputs.sops-nix.homeManagerModules.sops
inputs.catppuccin.homeManagerModules.catppuccin
# inputs.hyprland.homeManagerModules.default
inputs.anyrun.homeManagerModules.default
]
++ config.modules
Expand All @@ -113,7 +112,6 @@ in {

finalHome = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = config.nixpkgs.legacyPackages.${config.system};
# extraSpecialArgs.inputs = {inherit inputs;};
modules = config.finalModules;
};
};
Expand Down

0 comments on commit 9eb7469

Please sign in to comment.