Ricing rofi

This commit is contained in:
marc
2022-11-21 15:02:20 +01:00
parent ae6a2fafa3
commit 8617646685
10 changed files with 460 additions and 48 deletions

View File

@@ -2,6 +2,7 @@
let
cfg = config.samfelag.modules.app.alacritty;
i3Cfg = config.samfelag.modules.desktop.i3;
in
{
options.samfelag.modules.app.alacritty = {
@@ -9,10 +10,16 @@ in
};
config = lib.mkIf cfg.enable {
fonts.fontconfig.enable = true;
hm.home.packages = with pkgs; [
alacritty
(nerdfonts.override { fonts = [ "Iosevka" ]; })
];
hm.xdg.configFile."alacritty".source = ../../config/.config/alacritty;
samfelag.modules.desktop.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
"${i3Cfg.mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
};
};
}

View File

@@ -61,14 +61,16 @@ in
desktop.i3 = {
enable = true;
laptop = cfg.laptop;
launcher = "${pkgs.rofi}/bin/rofi rofi -show run";
terminal = "${pkgs.alacritty}/bin/alacritty";
locker = "${pkgs.i3lock-blur}/bin/i3lock-color -c 808F85 && sleep 1";
extraStartup = [
{ command = "systemctl --user restart polybar"; always = true; notification = false; }
{ command = "feh --bg-center -B \"${cfg.bgColour}\" -z --no-fehbg ${cfg.wallpapers}"; always = true; notification = false; }
];
extraKeybindings = {
"${cfg.i3.mod}+space" = "exec $HOME/.config/rofi/launcher/launcher.sh";
"${cfg.i3.mod}+End" = "exec $HOME/.config/rofi/powermenu/powermenu.sh";
};
};
};

View File

@@ -3,9 +3,6 @@
let
cfg = config.samfelag.modules.desktop.i3;
mod = "Mod4";
system_mode = "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown";
in {
options.samfelag.modules.desktop.i3 = with lib; {
@@ -15,10 +12,6 @@ in {
laptop = mkEnableOption "Enable features for a laptop (trackpad, battery, etc...)";
launcher = mkOption { type = types.str; };
terminal = mkOption { type = types.str; };
locker = mkOption { type = types.str; };
extraKeybindings = my.mkOpt (types.attrsOf types.str) {};
extraStartup = my.mkOpt (types.listOf types.attrs) [ ];
@@ -110,18 +103,6 @@ in {
"Return" = "mode \"default\"";
"Escape" = "mode \"default\"";
};
"${system_mode}" = {
"l" = "exec --no-startup-id ${cfg.locker}, mode \"default\"";
"e" = "exec --no-startup-id i3-msg exit, mode \"default\"";
"s" = "exec --no-startup-id ${cfg.locker} && systemctl suspend, mode \"default\"";
"h" = "exec --no-startup-id ${cfg.locker} && systemctl hibernate, mode \"default\"";
"r" = "exec --no-startup-id systemctl reboot, mode \"default\"";
"Shift+s" = "exec --no-startup-id systemctl poweroff -i, mode \"default\"";
"Return" = "mode \"default\"";
"Escape" = "mode \"default\"";
};
};
keybindings = {
@@ -171,7 +152,6 @@ in {
# - Modes ------------------------------
"${mod}+r" = "mode \"resize\"";
"${mod}+End" = "mode \"${system_mode}\"";
# - Media ------------------------------
@@ -211,9 +191,6 @@ in {
"${mod}+Shift+8" = "move container to workspace 8; workspace 8";
"${mod}+Shift+9" = "move container to workspace 9; workspace 9";
"${mod}+Shift+0" = "move container to workspace 10; workspace 10";
"${mod}+Return" = "exec ${cfg.terminal}";
"${mod}+space" = "exec ${cfg.launcher}";
} // cfg.extraKeybindings;
};
};

View File

@@ -11,5 +11,7 @@ in
environment.systemPackages = with pkgs; [
rofi
];
hm.xdg.configFile."rofi".source = ../../config/.config/rofi;
};
}

View File

@@ -4,8 +4,10 @@ with lib;
let
cfg = config.samfelag.modules.editors.emacs;
i3Cfg = config.samfelag.modules.desktop.i3;
emacsWithPackages = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages
(epkgs: [epkgs.vterm]));
emacsPackages = epkgs: [
epkgs.vterm
];
emacsWithPackages = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages emacsPackages);
in {
options.samfelag.modules.editors.emacs = {
enable = mkEnableOption "emacs";
@@ -14,25 +16,6 @@ in {
config = mkIf cfg.enable {
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
# home.file.doom-emacs = {
# source = ./doom-emacs;
# target = ".config/doom";
# recursive = true;
# # onChange = "doom upgrade";
# };
# home.programs.emacs = {
# enable = true;
# # package = pkgs.emacsPgtkGcc;
# extraPackages = epkgs: [ epkgs.vterm ];
# };
# home.services.emacs = {
# enable = true;
# client.enable = true;
# socketActivation.enable = true;
# };
environment.systemPackages = with pkgs; [
## Emacs itself
binutils
@@ -97,7 +80,10 @@ in {
env.PATH = [ "$HOME/.config/emacs/bin" ];
home-manager.users.marc.xdg.configFile."doom".source = ../../config/doom;
hm.xdg.configFile."doom" = {
source = ../../config/doom;
recursive = true;
};
system.userActivationScripts = {
installDoomEmacs = ''