Tweak rofi
This commit is contained in:
parent
e37d668817
commit
280fd08a6b
5 changed files with 145 additions and 8 deletions
37
modules/apps/rofi/rofi.nix
Normal file
37
modules/apps/rofi/rofi.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ inputs, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
let cfg = config.modules.apps.rofi;
|
||||
in {
|
||||
options.modules.apps.rofi = { enable = mkBoolOpt false; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${config.user.name} = {
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi.override { plugins = [ pkgs.rofi-calc ]; };
|
||||
terminal = "alacritty";
|
||||
extraConfig = {
|
||||
icon-theme = "Paper";
|
||||
cycle = true;
|
||||
disable-history = false;
|
||||
monitor = "-4";
|
||||
|
||||
# Vim-esque C-j/C-k as up/down in rofi
|
||||
kb-accept-entry = "Return,Control+m,KP_Enter";
|
||||
kb-row-down = "Down,Control+n,Control+j";
|
||||
kb-remove-to-eol = "";
|
||||
kb-row-up = "Up,Control+p,Control+k";
|
||||
kb-remove-char-forward = "";
|
||||
kb-remove-to-sol = "";
|
||||
kb-page-prev = "Control+u";
|
||||
kb-page-next = "Control+d";
|
||||
};
|
||||
theme = ./theme.rasi;
|
||||
};
|
||||
home.packages = with pkgs.unstable; [ paper-icon-theme rofi-power-menu ];
|
||||
};
|
||||
};
|
||||
}
|
||||
101
modules/apps/rofi/theme.rasi
Normal file
101
modules/apps/rofi/theme.rasi
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
* {
|
||||
accent: #83a598;
|
||||
bg: #282828;
|
||||
bg-light: #3c3836;
|
||||
bg-focus: #212121;
|
||||
bg-dark: #1d2021;
|
||||
fg: #fbf1c7;
|
||||
fg-list: #fbf1c7;
|
||||
|
||||
background-color: transparent;
|
||||
text-color: @fg-list;
|
||||
font: @text-font;
|
||||
border-color: @bg-dark;
|
||||
}
|
||||
|
||||
|
||||
/**** Layout ****/
|
||||
window {
|
||||
width: 1000px;
|
||||
y-offset: -50px;
|
||||
anchor: north;
|
||||
location: center;
|
||||
border: 1px;
|
||||
border-radius: 6px;
|
||||
children: [ inputbar, listview ];
|
||||
|
||||
}
|
||||
|
||||
listview {
|
||||
lines: 12;
|
||||
fixed-height: false;
|
||||
/* reverse: true; */
|
||||
columns: 1;
|
||||
scrollbar: true;
|
||||
spacing: 1px;
|
||||
/* Remove strange gap between listview and inputbar */
|
||||
margin: -2px 0 0;
|
||||
}
|
||||
|
||||
/*
|
||||
TODO Not supported in stable branch of rofi
|
||||
@media only (max-height: 1080px) {
|
||||
window {
|
||||
y-offset: -30%;
|
||||
}
|
||||
listview {
|
||||
lines: 14;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
scrollbar {
|
||||
handle-width: 1px;
|
||||
}
|
||||
inputbar {
|
||||
children: [ prompt, entry ];
|
||||
border: 0 0 0;
|
||||
}
|
||||
prompt {
|
||||
padding: 11px;
|
||||
expand: false;
|
||||
border: 0 1px 0 0;
|
||||
margin: 0 -2px 0 0;
|
||||
}
|
||||
entry, element {
|
||||
padding: 10px 13px;
|
||||
}
|
||||
textbox {
|
||||
padding: 24px;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
|
||||
/**** Looks ****/
|
||||
scrollbar {
|
||||
background-color: @bg-dark;
|
||||
handle-color: @accent;
|
||||
border-color: @bg-dark;
|
||||
}
|
||||
listview, inputbar {
|
||||
background-color: @bg-dark;
|
||||
}
|
||||
prompt {
|
||||
text-color: @accent;
|
||||
}
|
||||
entry {
|
||||
background-color: @bg-focus;
|
||||
/* text-color: @fg; */
|
||||
}
|
||||
prompt {
|
||||
background-color: @bg-light;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
}
|
||||
element selected {
|
||||
background-color: @bg-dark;
|
||||
text-color: @accent;
|
||||
}
|
||||
|
|
@ -134,11 +134,6 @@ in {
|
|||
AddressFamily inet
|
||||
'';
|
||||
};
|
||||
rofi = {
|
||||
enable = true;
|
||||
theme = "gruvbox-dark";
|
||||
terminal = "alacritty";
|
||||
};
|
||||
bat.enable = true;
|
||||
jq.enable = true;
|
||||
fzf.enable = true;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ myAdditionalKeys = [
|
|||
("M-S-h", sendMessage (IncMasterN 1)),
|
||||
("M-S-l", sendMessage (IncMasterN (-1))),
|
||||
("M-S-<Return>", windows W.swapMaster),
|
||||
("M-d", spawn "rofi -show drun"),
|
||||
("M-d", spawn "rofi -show drun -show-icons"),
|
||||
("M-s", spawn "rofi -show ssh"),
|
||||
("M-w", spawn "firefox"),
|
||||
("M-i", spawn $ myTerminal ++ " -e htop"),
|
||||
|
|
@ -91,10 +91,11 @@ myAdditionalKeys = [
|
|||
("M-v", spawn $ myTerminal ++ " -e ncmpcpp -s visualizer"),
|
||||
("M-m", spawn $ myTerminal ++ " -e ncmpcpp"),
|
||||
("M-n", spawn $ myTerminal ++ " -e newsboat"),
|
||||
("M-c", spawn $ myTerminal ++ " -e weechat"),
|
||||
("M-c", spawn "rofi -show calc -modi calc -no-show-match -no-sort"),
|
||||
("<Print>", spawn "scrot -e 'mv $f ~/Pictures/Screenshots'"),
|
||||
("S-<Print>", spawn "~/.xmonad/scripts/screenshot.sh"),
|
||||
("M-S-a", spawn $ myTerminal ++ " -e pulsemixer"),
|
||||
("M-S-p", spawn "rofi -show p -modi p:rofi-power-menu"),
|
||||
("M-<Return>", spawn myTerminal),
|
||||
("M-f", sendMessage $ Toggle FULL),
|
||||
-- Switch workspaces and screens
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
modules.desktop.polybar.enable = true;
|
||||
modules = {
|
||||
desktop.polybar.enable = true;
|
||||
apps.rofi.enable = true;
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue