home: rofi -> wmenu

This commit is contained in:
Guanran Wang 2024-07-08 01:06:26 +08:00
parent 09b7862c23
commit 6a986e4a0d
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
4 changed files with 4 additions and 159 deletions

View file

@ -1,20 +0,0 @@
{
pkgs,
lib,
...
}: {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
font = "monospace";
terminal = lib.getExe pkgs.foot;
};
home.packages = with pkgs; [rofi-power-menu];
# Yes, because I have no idea how to use programs.rofi.theme
xdg.configFile."rofi" = {
source = ./rofi;
recursive = true;
};
}

View file

@ -1,4 +0,0 @@
* {
bg: #16161e;
fg: #6a6f87;
}

View file

@ -1,130 +0,0 @@
/*
* Rofi config file
* ~/.config/rofi/config.rasi
*
* Modified from https://github.com/Sinomor/dots/tree/main/.config/bspwm/rofi
* Really clean and cozy dotfiles btw, liked it :D
*/
configuration {
display-drun: ">";
display-clipboard: ">";
drun-display-format: "{name}";
modi: "drun";
}
@import "~/.config/rofi/colors.rasi"
* {
font: "JetBrains Mono SemiBold 14";
separatorcolor: transparent;
border: 0;
margin: 0;
padding: 0;
spacing: 0;
}
window {
width: 420px;
border-radius: 0;
border: 0;
padding: 0;
background-color: @bg;
}
mainbox {
background-color: transparent;
children: [inputbar,listview];
padding: 10;
}
listview {
scrollbar: false;
padding: 2 0;
background-color: transparent;
columns: 1;
lines: 6;
margin: 8 0 0 0;
}
inputbar {
children: [prompt, entry];
background-color: transparent;
border-radius: 0;
}
prompt {
background-color: transparent;
text-color: @fg;
enabled: true;
border-radius: 0;
padding: 4 10 0 10;
}
entry {
background-color: transparent;
text-color: @fg;
placeholder-color: @fg;
border-radius: 0;
placeholder: "Search...";
blink: false;
padding: 4;
}
element {
background-color: transparent;
padding: 10;
border-radius: 0;
}
element-text {
background-color: inherit;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
}
element-icon {
background-color: inherit;
text-color: inherit;
padding: 0 10 0 0;
}
element.normal.normal {
background-color: transparent;
text-color: @fg;
}
element.normal.urgent {
background-color: transparent;
text-color: @fg;
}
element.normal.active {
background-color: transparent;
text-color: @bg;
}
element.selected.normal {
background-color: @fg;
text-color: @bg;
}
element.selected.urgent {
background-color: @fg;
text-color: @bg;
}
element.selected.active {
background-color: @fg;
text-color: @bg;
}
element.alternate.normal {
background-color: transparent;
text-color: @fg;
}
element.alternate.urgent {
background-color: transparent;
text-color: @fg;
}
element.alternate.active {
background-color: transparent;
text-color: @fg;
}

View file

@ -19,7 +19,6 @@ in {
imports = [
../i3status-rust
../mako
../rofi
../swayidle
../swaylock
];
@ -123,10 +122,10 @@ in {
"${modifier}+w" = "exec ${pkgs.xdg-utils}/bin/xdg-open http:";
"${modifier}+e" = "exec ${pkgs.xdg-utils}/bin/xdg-open ~";
# Rofi
"${modifier}+d" = "exec rofi -show drun -show-icons -icon-theme ${config.gtk.iconTheme.name}";
"${modifier}+Shift+d" = "exec ${lib.getExe pkgs.cliphist} list | rofi -dmenu | ${lib.getExe pkgs.cliphist} decode | ${pkgs.wl-clipboard}/bin/wl-copy";
"${modifier}+Shift+Semicolon" = ''exec rofi -modi "power-menu:rofi-power-menu --confirm=reboot/shutdown" -show power-menu'';
# Launcher
"${modifier}+d" = "exec ${lib.getExe' pkgs.wmenu "wmenu-run"}";
"${modifier}+Shift+d" = "exec ${lib.getExe pkgs.cliphist} list | ${lib.getExe pkgs.wmenu} -l 10 | ${lib.getExe pkgs.cliphist} decode | ${lib.getExe' pkgs.wl-clipboard "wl-copy"}";
"${modifier}+Shift+Semicolon" = "exec loginctl lock-session";
# Screenshot
"${modifier}+Shift+s" = "exec ${screenshot} region";