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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue