From 69fff69c65eb0396a78cef4ba22fdecae532ceb7 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Wed, 1 Jan 2025 19:00:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=96=BC=20Styled=20Rofi,=20calc=20and=20di?= =?UTF-8?q?sk=20apps,=20gcc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Formatted theme for Rofi - Moved Rofi config to .rasi file, because of troubles styling with programs.rofi - Added gnome-calculator and gnome-disk - Added GCC - Open Calc by pressing SUPER + K - Opens terminal in workspace 2 at boot --- development.nix | 1 + gnome/default.nix | 2 ++ home/hyprland/hyprland.conf | 3 ++- home/rofi/catppuccin-mocha.rasi | 20 +++++++------- home/rofi/config.rasi | 19 +++++++++++++ home/rofi/default.nix | 48 +++++++++++++++++++-------------- 6 files changed, 62 insertions(+), 31 deletions(-) create mode 100644 home/rofi/config.rasi diff --git a/development.nix b/development.nix index 572875a..c45b96a 100644 --- a/development.nix +++ b/development.nix @@ -11,6 +11,7 @@ rustup nodejs pnpm + gcc # Required for C, Rust and others # Formatters nixd ]; diff --git a/gnome/default.nix b/gnome/default.nix index 186b885..155389f 100644 --- a/gnome/default.nix +++ b/gnome/default.nix @@ -12,6 +12,8 @@ gnomeExtensions.appindicator gnome-extension-manager loupe + gnome-calculator + gnome-disk-utility ]; programs = { diff --git a/home/hyprland/hyprland.conf b/home/hyprland/hyprland.conf index 7c49585..9966da9 100644 --- a/home/hyprland/hyprland.conf +++ b/home/hyprland/hyprland.conf @@ -36,7 +36,7 @@ $menu = rofi -show drun # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: -exec-once = $browser & $terminal & nextcloud +exec-once = $browser & [workspace 2] $terminal & nextcloud # Status bar exec-once = waybar @@ -306,6 +306,7 @@ bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, B, exec, $browser bind = $mainMod, L, exec, hyprlock +bind = $mainMod, K, exec, [float] gnome-calculator # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l diff --git a/home/rofi/catppuccin-mocha.rasi b/home/rofi/catppuccin-mocha.rasi index 38c0b80..7212eca 100644 --- a/home/rofi/catppuccin-mocha.rasi +++ b/home/rofi/catppuccin-mocha.rasi @@ -1,5 +1,5 @@ * { - bg-col: #1e1e2e; + bg-col: #1e1e2e; bg-col-light: #1e1e2e; border-col: #1e1e2e; selected-col: #1e1e2e; @@ -12,9 +12,9 @@ font: "JetBrainsMono Nerd Font 14"; } -element-text, element-icon , mode-switcher { +element-text, element-icon, mode-switcher { background-color: inherit; - text-color: inherit; + text-color: inherit; } window { @@ -67,7 +67,7 @@ listview { element { padding: 5px; background-color: @bg-col; - text-color: @fg-col ; + text-color: @fg-col; } element-icon { @@ -75,25 +75,25 @@ element-icon { } element selected { - background-color: @selected-col ; - text-color: @fg-col2 ; + background-color: @selected-col; + text-color: @fg-col2; } mode-switcher { spacing: 0; - } +} button { padding: 10px; background-color: @bg-col-light; text-color: @grey; - vertical-align: 0.5; + vertical-align: 0.5; horizontal-align: 0.5; } button selected { - background-color: @bg-col; - text-color: @blue; + background-color: @bg-col; + text-color: @blue; } message { diff --git a/home/rofi/config.rasi b/home/rofi/config.rasi new file mode 100644 index 0000000..1802cf5 --- /dev/null +++ b/home/rofi/config.rasi @@ -0,0 +1,19 @@ +configuration { + disable-history: false; + display-Network: " 󰤨 Network"; + display-drun: "  Apps "; + display-run: "  Run "; + display-window: " 󰕰 Window"; + drun-display-format: "{icon} {name}"; + font: "DejaVu Sans Mono 10"; + hide-scrollbar: true; + icon-theme: "Oranchelo"; + location: 0; + modi: "run,drun,window"; + show-icons: true; + sidebar-mode: true; + terminal: "kitty"; + xoffset: 0; + yoffset: 0; +} +@theme "catppuccin-mocha" \ No newline at end of file diff --git a/home/rofi/default.nix b/home/rofi/default.nix index 636f426..9212666 100644 --- a/home/rofi/default.nix +++ b/home/rofi/default.nix @@ -1,24 +1,32 @@ # App runner -{ ... }: +{ pkgs, ... }: { - programs.rofi = { - enable = true; - # TODO get theme to work - # theme = lib.mkDefault ./catppuccin-mocha.rasi; - extraConfig = { - modi = "run,drun,window"; - icon-theme = "Oranchelo"; - show-icons = true; - terminal = "kitty"; - drun-display-format = "{icon} {name}"; - disable-history = false; - hide-scrollbar = true; - display-drun = "  Apps "; - display-run = "  Run "; - display-window = " 󰕰 Window"; - display-Network = " 󰤨 Network"; - sidebar-mode = true; - }; - }; + + home.packages = with pkgs; [ + rofi-wayland + ]; + + home.file.".config/rofi/config.rasi".source = ./config.rasi; + home.file.".local/share/rofi/themes/catppuccin-mocha.rasi".source = ./catppuccin-mocha.rasi; + +# TODO Use programs.rofi. Theme is not applied correctly +# programs.rofi = { +# enable = true; +# theme = lib.mkDefault "catppuccin-mocha"; +# extraConfig = { +# modi = "run,drun,window"; +# icon-theme = "Oranchelo"; +# show-icons = true; +# terminal = "kitty"; +# drun-display-format = "{icon} {name}"; +# disable-history = false; +# hide-scrollbar = true; +# display-drun = "  Apps "; +# display-run = "  Run "; +# display-window = " 󰕰 Window"; +# display-Network = " 󰤨 Network"; +# sidebar-mode = true; +# }; +# }; }