From a4ef5a74ef04e0cbdd7bbaf7e544396806080db0 Mon Sep 17 00:00:00 2001 From: vorboyvo Date: Tue, 17 Dec 2024 21:56:38 -0500 Subject: [PATCH] Updated fonts and symbols stuff. --- hosts/randolph/home.nix | 21 +++++++++++++++------ snippets/sway.nix | 25 +++++++++++++++++-------- snippets/waybar.nix | 8 ++++---- 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/hosts/randolph/home.nix b/hosts/randolph/home.nix index 1145f25..44c1d3a 100644 --- a/hosts/randolph/home.nix +++ b/hosts/randolph/home.nix @@ -99,6 +99,7 @@ rec { imv vlc pavucontrol + font-manager ] ++ # Basic graphical apps [ libreoffice @@ -122,9 +123,9 @@ rec { olympus shticker-book-unwritten ] ++ # Games - [ swaybg bemenu j4-dmenu-desktop ] ++ # Sway- and Wayland-related packages [ noto-fonts + inter redhat-official-fonts overpass ibm-plex @@ -132,10 +133,12 @@ rec { archivo highway-gothic merriweather-sans + paratype-pt-sans paratype-pt-serif libertinus roboto - font-awesome + openmoji-black + openmoji-color ] ++ # Fonts # [ papirus-icon-theme ] ++ # Icons # [ vanilla-dmz ] ++ # Cursor @@ -173,9 +176,15 @@ rec { }; # configure fonts correctly - fonts.fontconfig.enable = true; - xdg.configFile."fontconfig/conf.d/20-default.fonts.conf".source = - ../../extra/20-default-fonts.conf; + fonts.fontconfig = { + enable = true; + defaultFonts = { + sansSerif = [ "Inter" "Noto Sans" "DejaVu Sans" ]; + serif = [ "Noto Serif" "DejaVu Serif" ]; + monospace = [ "Noto Mono" ]; + emoji = [ "OpenMoji Color" ]; + }; + }; # terminal emulator programs.alacritty.enable = true; @@ -219,7 +228,7 @@ rec { enable = true; settings = { global = { - font = "Red Hat Display 12"; + font = "Inter 12"; mouse_left_click = "do_action, close_current"; mouse_middle_click = "close_all"; mouse_right_click = "close_current"; diff --git a/snippets/sway.nix b/snippets/sway.nix index 431bb9f..7f1eeb9 100644 --- a/snippets/sway.nix +++ b/snippets/sway.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }@inputs: +{ lib, pkgs, config, ... }@inputs: let extra = ../extra; @@ -8,18 +8,17 @@ let changebrightness = pkgs.writeShellScript "changebrightness" (builtins.readFile "${scripts}/changebrightness.sh"); mod = "Mod4"; - dmenuCommand = builtins.readFile "${scripts}/dmenu.sh"; shutdownMenu = pkgs.writeShellScript "shutdownmenu" (builtins.readFile "${scripts}/shutdownmenu.sh"); backgroundImage = "${extra}/kuwaitboat.jpg"; -in { +in rec { wayland.windowManager.sway = { enable = true; config = rec { terminal = "${pkgs.lib.getExe inputs.config.defaultPrograms.terminal}"; modifier = mod; fonts = { - names = [ "Red Hat Display" ]; + names = [ "Inter" ]; style = "Regular"; size = 12.0; }; @@ -65,7 +64,7 @@ in { XF86AudioMedia = "dunstctl set-paused toggle; dunstify -a 'dunst_mute_key' -u low -h string:x-dunst-stack-tag:dunst_mute_key 'Notifications mute toggled'"; XF86PowerOff = - "exec DMENU_COMMAND='${dmenuCommand}' bash ${shutdownMenu}"; + "exec DMENU_COMMAND='rofi -dmenu -prompt=\"Sélectionnez :\"' bash ${shutdownMenu}"; "${mod}+Pause" = XF86PowerOff; } // { "${mod}+space" = ''input "*" xkb_switch_layout next''; @@ -73,9 +72,10 @@ in { "${mod}+Home" = "move workspace to output left"; "${mod}+End" = "move workspace to output right"; } // { }); - menu = "j4-dmenu-desktop --no-generic --term=${ - terminal - } --dmenu='${dmenuCommand}'"; + # menu = "j4-dmenu-desktop --no-generic --term=${ + # terminal + # } --dmenu='${dmenuCommand}'"; + menu = "${pkgs.lib.getExe config.programs.rofi.package} -modes \"drun,run\" -show-icons -show drun"; focus.followMouse = false; }; extraConfig = '' @@ -112,4 +112,13 @@ in { '' + # Clamshell mode ""; }; + + programs.rofi = { + enable = true; + font = "Inter 12"; + package = pkgs.rofi-wayland; + theme = "android_notification"; + }; + + home.packages = with pkgs; [ swaybg bemenu j4-dmenu-desktop ]; } diff --git a/snippets/waybar.nix b/snippets/waybar.nix index 0ffe73a..fa9d467 100644 --- a/snippets/waybar.nix +++ b/snippets/waybar.nix @@ -27,7 +27,7 @@ rec { pulseaudio = { format = "{volume}% {icon} {format_source}"; format-bluetooth = "{volume}% {icon} {format_source}"; - format-muted = "{volume}%  {format_source}"; + format-muted = "{volume}% 🔇 {format_source}"; format-source = "{volume}% "; format-source-muted = "{volume}% "; format-icons = [ "" "" ]; @@ -38,7 +38,7 @@ rec { on-scroll-down = ""; }; network = { - format-wifi = "{essid} ({signalStrength}%) "; + format-wifi = "{essid} ({signalStrength}%) "; format-ethernet = "{ipaddr}/{cidr} "; tooltip-format = "{ifname} via {gwaddr} "; format-linked = "{ifname} (No IP) "; @@ -59,7 +59,7 @@ rec { on-click = "exec blueman-manager"; on-click-right = "exec bluetoothctl disconnect"; }; - cpu = { format = "{usage}% "; }; + cpu = { format = "{usage}% 😀"; }; memory = { format = "{used:0.1f}GB/{total:0.1f}GB "; }; disk = { format = "{used} "; @@ -99,7 +99,7 @@ rec { }]; style = '' * { - font-family: FontAwesome, Red Hat Display, sans-serif; + font-family: Inter, "OpenMoji Black", sans-serif; font-size: 12pt; min-height: 20pt; }