diff options
author | Franck Cuny <franck@fcuny.net> | 2022-02-13 12:03:41 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-02-13 12:03:41 -0800 |
commit | eebd938fa14164f6f9412e2f61f733a43894dda5 (patch) | |
tree | 772f7785a068a3de783b564e46d31934f53e7b02 /users/fcuny/desktop/sway | |
parent | cli: this is not working (diff) | |
download | world-eebd938fa14164f6f9412e2f61f733a43894dda5.tar.gz |
sway: adjust configuration
Create a new directory to have all things related to sway. Add some extra configuration for wofi.
Diffstat (limited to 'users/fcuny/desktop/sway')
-rw-r--r-- | users/fcuny/desktop/sway/default.nix | 39 | ||||
-rw-r--r-- | users/fcuny/desktop/sway/wofi.nix | 19 |
2 files changed, 58 insertions, 0 deletions
diff --git a/users/fcuny/desktop/sway/default.nix b/users/fcuny/desktop/sway/default.nix new file mode 100644 index 0000000..d4d9093 --- /dev/null +++ b/users/fcuny/desktop/sway/default.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: + +{ + imorts = [ + ./wofi.nix + ]; + + home.packages = [ + pkgs.pavucontrol + pkgs.wofi + pkgs.wl-clipboard + pkgs.wf-recorder + ]; + + home.sessionVariables = { + MOZ_ENABLE_WAYLAND = true; + LIBSEAT_BACKEND = "logind"; + }; + + wayland.windowManager.sway = { + enable = true; + systemdIntegration = true; + config = rec { + modifier = "Mod4"; + terminal = "${config.programs.alacritty.package}/bin/alacritty"; + menu = "${pkgs.wofi}/bin/wofi -S run"; + defaultWorkspace = "workspace number 1"; + startup = [ + # Initial lock + { command = "${pkgs.swaylock-effects}/bin/swaylock"; } + # Start idle daemon + { command = "${pkgs.swayidle}/bin/swayidle -w"; } + # Start waybar + { command = "${pkgs.waybar}/bin/waybar"; } + ]; + bars = [ ]; + }; + }; +} diff --git a/users/fcuny/desktop/sway/wofi.nix b/users/fcuny/desktop/sway/wofi.nix new file mode 100644 index 0000000..6368a7a --- /dev/null +++ b/users/fcuny/desktop/sway/wofi.nix @@ -0,0 +1,19 @@ +{ pkgs, config, ... }: + +{ + home.packages = with pkgs; [ + wofi + ]; + + xdg.configFile."wofi/config".text = '' + image_size=48 + columns=3 + allow_images=true + insensitive=true + term=${config.wayland.windowManager.sway.config.terminal} + + run-always_parse_args=true + run-cache_file=/dev/null + run-exec_search=true + ''; +} |