From d80160264acdacbf3f6ae8f903abb40a06e35617 Mon Sep 17 00:00:00 2001 From: Bad Date: Thu, 15 Jul 2021 18:51:27 +0200 Subject: [PATCH] Switch to rofi --- users/profiles/sway/desktop.nix | 21 ++++++++++++++++++--- users/profiles/sway/laptop.nix | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/users/profiles/sway/desktop.nix b/users/profiles/sway/desktop.nix index 23e1010..8e8675a 100644 --- a/users/profiles/sway/desktop.nix +++ b/users/profiles/sway/desktop.nix @@ -1,15 +1,20 @@ -{ pkgs, ... }: +{ pkgs, lib }: +let +rofi = pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; }; +in { - wayland.windowManager.sway = { + wayland.windowManager.sway = rec { enable = true; config = { - terminal = "${pkgs.alacritty}/bin/alacritty" + terminal = "${pkgs.alacritty}/bin/alacritty"; + menu = "${rofi}/bin/rofi -show combi"; modifier = "Mod4"; input = { "*" = { xkb_layout = "pl"; accel_profile = "flat"; dwt = "disabled"; + pointer_accel = "0.0"; }; }; bars = [{ @@ -32,6 +37,16 @@ export _JAVA_AWT_WM_NONREPARENTING=1 ''; }; + + programs.rofi = { + enable = true; + package = rofi; + theme = "purple"; + extraConfig = { + modi = "combi"; + combi-modi = "drun,emoji"; + }; + }; programs.i3status-rust = { enable = true; diff --git a/users/profiles/sway/laptop.nix b/users/profiles/sway/laptop.nix index c282693..7e8d60a 100644 --- a/users/profiles/sway/laptop.nix +++ b/users/profiles/sway/laptop.nix @@ -1,6 +1,6 @@ { pkgs, lib, ... }: let - desk = (import ./desktop.nix { inherit pkgs; }); + desk = (import ./desktop.nix { inherit pkgs lib; }); desk_blocks = desk.programs.i3status-rust.bars.bar_0.blocks; lap_blocks = [{ block = "backlight"; } { block = "battery"; }] ++ desk_blocks; lap = lib.recursiveUpdate desk { programs.i3status-rust.bars.bar_0.blocks = lap_blocks; };