add waybar and alacritty with a few defaults for testing
This commit is contained in:
parent
990f15ea75
commit
1a95061a21
2 changed files with 74 additions and 1 deletions
|
@ -62,6 +62,8 @@
|
|||
|
||||
# Enable the Hyprland WM functionality for NixOS (xdg portals etc.)
|
||||
programs.hyprland.enable = true;
|
||||
programs.waybar.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb.layout = "gb";
|
||||
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
home.packages = [
|
||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||
# # "Hello, world!" when run.
|
||||
pkgs.wayland
|
||||
# pkgs.wayland
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
|
@ -80,4 +81,74 @@
|
|||
# Autostart using systemd
|
||||
# systemd.enable = true;
|
||||
};
|
||||
# Hyprland configuration
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
bind =
|
||||
[
|
||||
"$mod, F, exec, firefox"
|
||||
", Print, exec, grimblast copy area"
|
||||
"$mod, 1, exec, alacritty"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
builtins.concatLists (builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in [
|
||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
]
|
||||
)
|
||||
10)
|
||||
);
|
||||
exec-once = waybar
|
||||
};
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
output = [
|
||||
"eDP-1"
|
||||
"HDMI-A-1"
|
||||
];
|
||||
modules-left = [ "hyprland/workspaces" "hyprland/mode" "wlr/taskbar" ];
|
||||
modules-center = [ "hyprland/window" "custom/hello-from-waybar" ];
|
||||
modules-right = [ "mpd" "custom/mymodule#with-css-id" "temperature" ];
|
||||
|
||||
"custom/hello-from-waybar" = {
|
||||
format = "hello {}";
|
||||
max-length = 40;
|
||||
interval = "once";
|
||||
exec = pkgs.writeShellScript "hello-from-waybar" ''
|
||||
echo "from within waybar"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
package = pkgs.alacritty;
|
||||
settings = {
|
||||
window.dimensions = {
|
||||
lines = 3;
|
||||
columns = 200;
|
||||
};
|
||||
keyboard.bindings = [
|
||||
{
|
||||
key = "K";
|
||||
mods = "Control";
|
||||
chars = "\\u000c";
|
||||
}
|
||||
];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue