From aec5f723e3eb3282f6d8c3a7a1a714521ecf5e0c Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Wed, 24 Apr 2024 15:44:33 -0400 Subject: [PATCH] fixed some styling issues --- configs/hypr/hyprland.conf | 13 +++++++++---- configs/waybar/config.jsonc | 24 ++++++++++++------------ configs/waybar/style.css | 17 +++++++++++++++++ modules/optional/hyprland.nix | 20 ++++++++++++++++++++ modules/os/core.nix | 13 +++++++++++-- 5 files changed, 69 insertions(+), 18 deletions(-) create mode 100644 configs/waybar/style.css diff --git a/configs/hypr/hyprland.conf b/configs/hypr/hyprland.conf index 17728a2..42e7211 100644 --- a/configs/hypr/hyprland.conf +++ b/configs/hypr/hyprland.conf @@ -17,6 +17,7 @@ input { sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } + general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 5 @@ -77,6 +78,9 @@ misc { force_default_wallpaper = 0 } +xwayland { + force_zero_scaling = true +} # device:epic-mouse-v1 { # sensitivity = -0.5 # } @@ -110,6 +114,8 @@ bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 +bind = $mainMod, right, workspace, +1 +bind = $mainMod, left, workspace, -1 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspace, 1 @@ -129,10 +135,6 @@ bind = $mainMod SHIFT, left, resizeactive, -10 0 bind = $mainMod SHIFT, up, resizeactive, 0 -10 bind = $mainMod SHIFT, down, resizeactive, 0 10 -# Example special workspace (scratchpad) -bind = $mainMod, S, togglespecialworkspace, magic -bind = $mainMod SHIFT, S, movetoworkspace, special:magic - # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 @@ -140,3 +142,6 @@ bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow + +# Window Rules +windowrulev2=fakefullscreen, class:^(code-url-handler)$ diff --git a/configs/waybar/config.jsonc b/configs/waybar/config.jsonc index ef078a0..17e1e7b 100644 --- a/configs/waybar/config.jsonc +++ b/configs/waybar/config.jsonc @@ -4,25 +4,25 @@ "position": "top", "spacing": 4, // Gaps between modules (4px) "modules-left": [ - "hyprland/workspaces" -// "hyprland/submap" + "keyboard-state", + "hyprland/workspaces" + // "hyprland/submap" ], "modules-center": [ + "clock" + // "power-profiles-daemon" ], "modules-right": [ // "mpd", - "idle_inhibitor", - "pulseaudio", + // "idle_inhibitor", + // "pulseaudio", "network", - "power-profiles-daemon", "cpu", "memory", "temperature", - "backlight", - "keyboard-state", - "battery", - "clock", - "tray" + // "backlight", + "battery" + // "tray" ], "keyboard-state": { "numlock": true, @@ -76,11 +76,11 @@ "format-alt": "{:%Y-%m-%d}" }, "cpu": { - "format": "{usage}% ", + "format": "{usage}%", "tooltip": false }, "memory": { - "format": "{}% " + "format": "{}%" }, "temperature": { // "thermal-zone": 2, diff --git a/configs/waybar/style.css b/configs/waybar/style.css new file mode 100644 index 0000000..4d7b85e --- /dev/null +++ b/configs/waybar/style.css @@ -0,0 +1,17 @@ +/* @import "macchiato.css";*/ + +/** { + color: @text; +}*/ + +/*window#waybar { + background-color: shade(@base, 0.9); + border: 2px solid alpha(@crust, 0.3); + padding-left: 1em; + padding-right: 1em; +} +*/ + +* { + font-family: "Arimo Nerd Font", "Font Awesome 6 Free"; +} \ No newline at end of file diff --git a/modules/optional/hyprland.nix b/modules/optional/hyprland.nix index 0e67ad8..4c3d002 100644 --- a/modules/optional/hyprland.nix +++ b/modules/optional/hyprland.nix @@ -1,3 +1,4 @@ +{ user }: { pkgs, ... }: { programs.hyprland.enable = true; @@ -11,4 +12,23 @@ services.mpd.enable = true; services.pipewire.enable = true; services.pipewire.wireplumber.enable = true; + security.polkit.enable = true; + users.users.${user.name}.extraGroups = [ + "input" + ]; + systemd = { + user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; } diff --git a/modules/os/core.nix b/modules/os/core.nix index 757079a..e4b7e5d 100644 --- a/modules/os/core.nix +++ b/modules/os/core.nix @@ -55,9 +55,18 @@ # Fonts fonts = { packages = with pkgs; [ - (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; }) + # (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; }) + fira-code + fira-code-symbols + font-awesome + liberation_ttf + mplus-outline-fonts.githubRelease + nerdfonts + noto-fonts + noto-fonts-emoji + proggyfonts ]; - + fontDir.enable = true; fontconfig = { enable = true; defaultFonts = {