From 9ea030ab7d35e2b083f57b257c6c3efa3a192b38 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 2 Feb 2023 17:57:16 +0100 Subject: rofi: add rofi-calc, with sway binding --- usecases/desktop/graphical/rofi.nix | 16 ++++++++++++++-- usecases/desktop/graphical/sway.nix | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'usecases/desktop') diff --git a/usecases/desktop/graphical/rofi.nix b/usecases/desktop/graphical/rofi.nix index e43d461..741e7da 100644 --- a/usecases/desktop/graphical/rofi.nix +++ b/usecases/desktop/graphical/rofi.nix @@ -6,7 +6,10 @@ _inputs: { home-manager.users.minijackson.programs.rofi = { enable = true; - package = with pkgs; rofi-wayland.override {plugins = [rofi-emoji];}; + plugins = with pkgs; [ + rofi-emoji + rofi-calc + ]; # TODO: there is a better way theme = with config.theme.colors; @@ -36,7 +39,7 @@ _inputs: { } mainbox { - children: [inputbar, listview]; + children: [inputbar, message, listview]; border: 1px solid; border-color: ${dimForeground}; } @@ -58,6 +61,15 @@ _inputs: { padding: 12px 0; } + message { + padding: 12px; + background-color: ${background2}; + } + + textbox { + background-color: inherit; + } + entry { background-color: inherit; padding: 12px 0; diff --git a/usecases/desktop/graphical/sway.nix b/usecases/desktop/graphical/sway.nix index 2586105..96ea14b 100644 --- a/usecases/desktop/graphical/sway.nix +++ b/usecases/desktop/graphical/sway.nix @@ -154,6 +154,8 @@ _inputs: { "${modifier}+m" = "exec ${pkgs.swaylock}/bin/swaylock"; + "${modifier}+c" = "exec rofi -show calc -modi calc -no-sort -no-persist-history -calc-command 'echo -n {result} | wl-copy'"; + "XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 5"; "XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 5"; "XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer -t"; -- cgit v1.2.3