Updated emacs to wayland

This commit is contained in:
Aleksandr Lebedev 2025-01-27 07:49:58 +01:00
parent fa1edc0995
commit 6b248c9097
4 changed files with 64 additions and 38 deletions

View file

@ -7,19 +7,33 @@
username,
inputs,
...
}: let
in {
}:
let
in
{
imports =
[
./modules/fastfetch
./modules/tmux/home.nix
]
++ lib.optional (hwconfig.useImpermanence) (import ./modules/impermanence/home.nix {
++ lib.optional (hwconfig.useImpermanence) (
import ./modules/impermanence/home.nix {
inherit username;
inherit inputs;
})
++ lib.optional (config.programs.hyprland.enable) ./modules/hyprland/home.nix
++ lib.optional (builtins.pathExists ./homes/${username}) (import ./homes/${username} {inherit username;});
}
)
++ lib.optional (config.programs.hyprland.enable) (
import ./modules/hyprland/home.nix {
inherit pkgs;
inherit username;
inherit inputs;
inherit hwconfig;
inherit lib;
}
)
++ lib.optional (builtins.pathExists ./homes/${username}) (
import ./homes/${username} { inherit username; }
);
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = username;

View file

@ -4,9 +4,11 @@
lib,
inputs,
...
}: let
emacs = pkgs.emacs; #pkgs.emacs-pgtk;
in {
}:
let
emacs = pkgs.emacs-pgtk; # pkgs.emacs; #pkgs.emacs-pgtk;
in
{
#services.emacs.enable = true;
services.emacs.startWithGraphical = true;
#services.emacs.install = true;
@ -16,8 +18,7 @@ in {
(import ./packages.nix {
inherit pkgs;
inherit emacs;
})
.packages;
}).packages;
nixpkgs.overlays = [
inputs.emacs-overlay.overlays.default
];

View file

@ -1,7 +1,18 @@
{ ... }:
{
pkgs,
username,
lib,
hwconfig,
...
}:
{
imports = [
./hyprland.nix
(import ./hyprland.nix {
inherit pkgs;
inherit lib;
inherit hwconfig;
inherit username;
})
#../kando
];
}

View file

@ -4,10 +4,12 @@
hwconfig,
username,
...
}: let
}:
let
toggle_monitors = ./toggle_monitors.sh;
wallpaper-image = ./wallpaper.jpg;
in {
in
{
imports = [
./waybar.nix
./hyprlock.nix
@ -18,8 +20,8 @@ in {
xwayland.enable = true;
settings = {
monitor =
if hwconfig.hostname == "kylekrein-homepc"
then [
if hwconfig.hostname == "kylekrein-homepc" then
[
"DP-1,2560x1440@75,1600x0,1.6"
"DP-3,2560x1440@75,0x0,1.6"
]
@ -34,11 +36,7 @@ in {
};
exec-once = [
"${
if hwconfig.isLaptop
then "brightnessctl set 25%"
else ""
}"
"${if hwconfig.isLaptop then "brightnessctl set 25%" else ""}"
"dbus-update-activation-environment --systemd --all"
"${pkgs.waybar}/bin/waybar &"
"${pkgs.networkmanagerapplet}/bin/nm-applet &"
@ -58,12 +56,14 @@ in {
"$mod" = "SUPER";
"$mainMod" = "$mod";
"$terminal" = "${pkgs.kitty}/bin/kitty";
"$fileManager" = "$terminal ${pkgs.yazi}/bin/yazi";
"$emacs" = "emacsclient -c -a 'emacs'";
"$fileManager" = "$emacs --eval '(dired \"/home/${username}\")'"; # "$terminal ${pkgs.yazi}/bin/yazi";
"$fileManager2" = "${pkgs.kdePackages.dolphin}/bin/dolphin";
"$browser" = "${pkgs.firefox}/bin/firefox";
"$menu" = "${pkgs.wofi}/bin/wofi --show drun";
"$clipboardManager" = "$terminal --class clipse -e 'clipse'";
"$makeRegionScreenshot" = "${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -w 0)\" - | ${pkgs.satty}/bin/satty --early-exit --copy-command 'wl-copy' --filename '-' --initial-tool brush";
"$makeRegionScreenshot" =
"${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -w 0)\" - | ${pkgs.satty}/bin/satty --early-exit --copy-command 'wl-copy' --filename '-' --initial-tool brush";
bind = [
"$mod, T, exec, $terminal"
"$mod, Q, killactive,"
@ -123,7 +123,7 @@ in {
"$mainMod, P, exec, $makeRegionScreenshot"
"$mainMod ALT, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
''$mainMod, E, exec, emacsclient -c -a "send-notify 'Unable to launch Emacs. Daemon is not running'"''
''$mainMod, E, exec, $emacs''
];
bindm = [