Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rofi: opacity broken #901

Open
nonetrix opened this issue Feb 24, 2025 · 3 comments
Open

rofi: opacity broken #901

nonetrix opened this issue Feb 24, 2025 · 3 comments
Labels
bug Something isn't working properly

Comments

@nonetrix
Copy link

nonetrix commented Feb 24, 2025

Opacity doesn't appear to work in Rofi despite having the following set

    opacity = {
      terminal = 0.9;
      popups = 0.9;
      desktop = 0.9;
      applications = 0.9;
    };
{pkgs, ...}: let
  global = import ../../../../global-var.nix;
in {
  nixpkgs.overlays = [
    (final: prev: {
      rofimoji = prev.rofimoji.override {rofi = prev.rofi-wayland;};
    })
  ];

  environment.systemPackages = with pkgs; [
    rofimoji
  ];
  home-manager.users.${global.username} = {
    pkgs,
    config,
    libs,
    ...
  }: {
    programs.rofi = {
      enable = true;
      package = pkgs.rofi-wayland;

      plugins = [pkgs.rofi-emoji];

      extraConfig = {
        modi = "run,drun,window";
        icon-theme = "Oranchelo";
        show-icons = true;
        terminal = "ghostty";
        drun-display-format = "{icon} {name}";
        location = 0;
        disable-history = false;
        hide-scrollbar = true;
        display-drun = "   Apps ";
        display-run = "   Run ";
        display-window = "󰍲   Window";
        display-Network = " 󰤨  Network";
        sidebar-mode = true;
      };

      theme = let
        inherit (config.lib.formats.rasi) mkLiteral;
      in {
          window = {
            height = mkLiteral "300px";
            width = mkLiteral "500px";
            border = mkLiteral "2px";
            border-radius = mkLiteral "12px";
        };
      };
    };
  };
}

Image

P.s. Accent support would be nice too, very inconsistent atm

@trueNAHO
Copy link
Collaborator

Opacity doesn't appear to work in Rofi despite having the following set

    opacity = {
      terminal = 0.9;
      popups = 0.9;
      desktop = 0.9;
      applications = 0.9;
    };

Does it work with lower opacity values? The rofiOpacity value is not properly rounded:

rofiOpacity = builtins.toString (
builtins.ceil (config.stylix.opacity.popups * 100)
);

Otherwise, there might be a problem with our string declaration:

mkLiteral "rgba ( ${r}, ${g}, ${b}, ${opacity} % )";

P.s. Accent support would be nice too, very inconsistent atm

Indeed.

@nonetrix
Copy link
Author

Lower opacity only seems to effect opacity of selection
Image

@danth danth added the bug Something isn't working properly label Feb 24, 2025
@danth danth changed the title Opacity broken in Rofi rofi: opacity broken Feb 24, 2025
@nonetrix
Copy link
Author

Oh and my old config I made by manually tweaking the Catppuccin config works fine so isn't issue with Rofi I would think
https://github.com/nonetrix/nixdots/blob/master/graphical/rofi.nix for people in future it's this commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

3 participants