Skip to content

Commit

Permalink
feat(rofi: powermenu): update rasi to use common theme
Browse files Browse the repository at this point in the history
  • Loading branch information
d4ilyrun committed Nov 1, 2023
1 parent 5b66356 commit 22f7197
Show file tree
Hide file tree
Showing 17 changed files with 315 additions and 726 deletions.
32 changes: 16 additions & 16 deletions applications/rofi/config.rasi
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ element-text, element-icon , mode-switcher {
window {
height: 360px;
border: 3px;
border-color: @border-col;
background-color: @bg-col;
border-color: @grey;
background-color: @background;
}

mainbox {
background-color: @bg-col;
background-color: @background;
}

inputbar {
children: [prompt,entry];
background-color: @bg-col;
background-color: @background;
border-radius: 5px;
padding: 2px;
}

prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
text-color: @background;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
Expand All @@ -41,8 +41,8 @@ textbox-prompt-colon {
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
text-color: @foreground;
background-color: @background;
}

listview {
Expand All @@ -51,22 +51,22 @@ listview {
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
background-color: @bg-col;
background-color: @background;
}

element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
background-color: @background;
text-color: @foreground ;
}

element-icon {
size: 25px;
}

element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
background-color: @selected ;
text-color: @foreground-alt ;
}

mode-switcher {
Expand All @@ -75,19 +75,19 @@ mode-switcher {

button {
padding: 10px;
background-color: @bg-col-light;
background-color: @background-alt;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}

button selected {
background-color: @bg-col;
background-color: @background;
text-color: @blue;
}

message {
background-color: @bg-col-light;
background-color: @background-alt;
margin: 2px;
padding: 2px;
border-radius: 5px;
Expand All @@ -97,6 +97,6 @@ textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
background-color: @background-alt;
}

30 changes: 23 additions & 7 deletions applications/rofi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,23 @@ let
inherit (config.dotfiles.folders) applications;
inherit (config.dotfiles.extraOptions) terminal;
defaultTerminal = "${pkgs.alacritty}/bin/alacritty";

copyConfigs = names: builtins.listToAttrs (
map
(name: pkgs.lib.attrsets.nameValuePair
"rofi/theme/${name}.rasi"
{
enable = true;
source = "${applications}/rofi/${name}.rasi";
}
)
names
);

in
{
xdg.configFile = copyConfigs [ "config" "powermenu" ];

programs.rofi = {
enable = true;
terminal = defaultTerminal;
Expand All @@ -18,16 +33,14 @@ in
cycle = false;

extraConfig = {
modi = "drun,run,window,calc,emoji";
modi = "drun,run,window";
font = "JetBrainsMono Nerd Font Medium 14";
location = 0;

drun-display-format = "{icon} {name}";
display-window = " ";
display-window = "  Windows ";
display-drun = "  Apps ";
display-run = "  Run ";
display-Network = " 󰤨 Network";
display-power = "Powermenu: ";

show-icons = true;
sidebar-mode = true;
Expand All @@ -41,9 +54,12 @@ in
xsession.windowManager.i3.config.keybindings = pkgs.lib.mkOptionDefault {
"Mod4+d" = "exec rofi -show drun -show drun -show-icons -terminal ${terminal}";
"Mod4+Shift+d" = "exec rofi -sho-icons -show window";
"Mod4+Shift+e" = "exec ${import ./powermenu { inherit config pkgs; }}";
"Mod4+Shift+e" = "exec ${applications}/rofi/scripts/powermenu.sh";
"Mod4+Shift+c" = "exec rofi -show calc -modi calc -display-calc 󰃬 -terse | xsel -b";
"Mod4+Shift+w" = "exec ${applications}/rofi/network/rofi-network-manager.sh";
"Mod4+Shift+w" = "exec ${applications}/rofi/scripts/network.sh";
"Mod4+comma" = "exec rofi -modi emoji -show emoji -emoji-mode insert";
};
}
} // (
# Copy all config files into the config folder
{ }
)
123 changes: 0 additions & 123 deletions applications/rofi/notifs/rofi_notif_center.sh

This file was deleted.

Loading

0 comments on commit 22f7197

Please sign in to comment.