basic rofi and more macos cleanup

This commit is contained in:
Noah Masur 2022-05-07 09:24:17 -04:00
parent 43571c66dd
commit 4540327cb8
27 changed files with 155 additions and 23 deletions

View File

@ -34,10 +34,11 @@
{
networking.hostName = "desktop";
gui.enable = true;
gui.compositor.enable = true;
}
home-manager.nixosModules.home-manager
./hosts/desktop/hardware-configuration.nix
./modules/common.nix
./hosts/common.nix
./modules/hardware
./modules/system
./modules/desktop

View File

@ -13,12 +13,12 @@
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/f0313f58-971a-46e3-9191-909fe5eb7f7e";
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/FB26-799C";
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};

View File

@ -1,4 +1,8 @@
{ config, pkgs, lib, ... }: {
{ config, pkgs, lib, ... }:
let fontName = "Victor Mono";
in {
config = lib.mkIf config.gui.enable {
@ -6,7 +10,16 @@
[
pkgs.victor-mono # Used for Vim and Terminal
];
fonts.fontconfig.defaultFonts.monospace = [ "Victor Mono" ];
fonts.fontconfig.defaultFonts.monospace = [ fontName ];
home-manager.users.${config.user} = {
xsession.windowManager.i3.config.fonts = {
names = [ "pango:${fontName}" ];
# style = "Regular";
# size = 11.0;
};
programs.rofi.font = "${fontName} 14";
};
};

View File

@ -78,15 +78,10 @@
};
floating.modifier = modifier;
focus = {
mouseWarping = false;
mouseWarping = true;
newWindow = "urgent";
followMouse = false;
};
fonts = {
names = [ "pango:Victor Mono" "FontAwesome 12" ];
# style = "Regular";
# size = 11.0;
};
keybindings = {
# PulseAudio adjust volume

View File

@ -6,20 +6,20 @@
services.picom = {
enable = true;
blur = true;
blur = false;
blurExclude = [ ];
# extraOptions = ''
# shadow-radius = 20
# '';
extraOptions = ''
shadow-radius = 20
corner-radius = 10
blur-size = 20
rounded-corners-exclude = [
"window_type = 'dock'",
"class_g = 'i3-frame'"
]
'';
# extraOptions = ''
# shadow-radius = 20
# corner-radius = 10
# blur-size = 20
# rounded-corners-exclude = [
# "window_type = 'dock'",
# "class_g = 'i3-frame'"
# ]
# '';
fade = false;
experimentalBackends = true;
inactiveDim = "0.05";
@ -30,11 +30,11 @@
opacityRule = [
"0:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_HIDDEN'" # Hide tabbed windows
];
shadow = true;
shadow = false;
shadowExclude = [ ];
shadowOffsets = [ (-10) (-10) ];
shadowOpacity = "0.5";
vSync = false;
vSync = true;
};
xsession.windowManager.i3.config.startup = [{

View File

@ -8,7 +8,130 @@
enable = true;
cycle = true;
location = "center";
pass = { };
plugins = [ pkgs.rofi-calc pkgs.rofi-emoji ];
terminal = "${pkgs.alacritty}/bin/alacritty";
theme = let
inherit (config.home-manager.users.${config.user}.lib.formats.rasi)
mkLiteral;
in {
# Inspired by https://github.com/sherubthakur/dotfiles/blob/master/users/modules/desktop-environment/rofi/launcher.rasi
"*" = {
background-color = mkLiteral config.gui.colorscheme.base00;
foreground-color = mkLiteral config.gui.colorscheme.base07;
text-color = mkLiteral config.gui.colorscheme.base07;
border-color = mkLiteral config.gui.colorscheme.base04;
width = 512;
};
# Holds the entire window
"#window" = {
transparency = "real";
background-color = mkLiteral config.gui.colorscheme.base00;
text-color = mkLiteral config.gui.colorscheme.base07;
border = mkLiteral "4px";
border-color = mkLiteral config.gui.colorscheme.base04;
border-radius = mkLiteral "4px";
width = mkLiteral "600px";
x-offset = 10;
y-offset = 40;
padding = mkLiteral "15px";
};
# Wrapper around bar and results
"#mainbox" = {
background-color = mkLiteral config.gui.colorscheme.base00;
border = mkLiteral "0px";
border-radius = mkLiteral "0px";
border-color = mkLiteral config.gui.colorscheme.base04;
children = map mkLiteral [ "inputbar" "listview" ];
spacing = mkLiteral "10px";
padding = mkLiteral "10px";
};
# Unknown
"#textbox-prompt-colon" = {
expand = false;
str = ":";
margin = mkLiteral "0px 0.3em 0em 0em";
text-color = mkLiteral config.gui.colorscheme.base07;
};
# Command prompt left of the input
"#prompt" = { enabled = false; };
# Actual text box
"#entry" = {
placeholder-color = mkLiteral config.gui.colorscheme.base03;
expand = true;
horizontal-align = "0";
placeholder = "Search Applications";
padding = mkLiteral "0px 0px 0px 5px";
blink = true;
};
# Top bar
"#inputbar" = {
children = map mkLiteral [ "prompt" "entry" ];
border = mkLiteral "1px";
border-radius = mkLiteral "4px";
padding = mkLiteral "6px";
};
# Results
"#listview" = {
background-color = mkLiteral config.gui.colorscheme.base00;
padding = mkLiteral "0px";
columns = 1;
lines = 8;
spacing = "5px";
cycle = true;
dynamic = true;
layout = "vertical";
};
# Each result
"#element" = {
orientation = "vertical";
border-radius = mkLiteral "0px";
padding = mkLiteral "5px 0px 5px 5px";
};
"#element.selected" = {
border = mkLiteral "1px";
border-radius = mkLiteral "4px";
border-color = mkLiteral config.gui.colorscheme.base07;
background-color = mkLiteral config.gui.colorscheme.base04;
text-color = mkLiteral config.gui.colorscheme.base00;
};
"#element-text" = {
expand = true;
# horizontal-align = mkLiteral "0.5";
vertical-align = mkLiteral "0.5";
margin = mkLiteral "0px 2.5px 0px 2.5px";
};
"#element-text.selected" = {
background-color = mkLiteral config.gui.colorscheme.base04;
text-color = mkLiteral config.gui.colorscheme.base00;
};
# Not sure how to get icons
"#element-icon" = {
size = mkLiteral "64px";
border = mkLiteral "0px";
background-color = mkLiteral config.gui.colorscheme.base00;
};
"#element-icon.selected" = {
background-color = mkLiteral config.gui.colorscheme.base04;
text-color = mkLiteral config.gui.colorscheme.base00;
};
};
xoffset = 0;
yoffset = 0;
extraConfig = { kb-cancel = "Escape,Super+space"; };
};
gui.launcherCommand = "${pkgs.rofi}/bin/rofi -show run";