From 4cd0255ba4edd1a909816bf4c55be354bafb4d30 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Sat, 15 Feb 2025 09:18:09 -0500 Subject: [PATCH] stylix for BG waybar mechabar --- dot_config/flake/flake.lock | 180 +++- dot_config/flake/flake.nix | 4 + dot_config/flake/home/common.nix | 2 + dot_config/flake/home/stylix.nix | 7 +- dot_config/flake/home/wash/wash.nix | 897 +++++++++++++++--- dot_config/flake/nixos/wash/configuration.nix | 2 + run_home-manager.sh.tmpl | 4 - run_nix-rebuild.sh | 5 + 8 files changed, 924 insertions(+), 177 deletions(-) delete mode 100644 run_home-manager.sh.tmpl create mode 100755 run_nix-rebuild.sh diff --git a/dot_config/flake/flake.lock b/dot_config/flake/flake.lock index 8468f33..c8a6bcf 100644 --- a/dot_config/flake/flake.lock +++ b/dot_config/flake/flake.lock @@ -102,6 +102,38 @@ "type": "github" } }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1734969791, + "narHash": "sha256-A9PxLienMYJ/WUvqFie9qXrNC2MeRRYw7TG/q7DRjZg=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "92f4890bd150fc9d97b61b3583680c0524a8cafe", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -139,12 +171,39 @@ } }, "flake-utils_3": { + "inputs": { + "systems": [ + "stylix", + "systems" + ] + }, "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": [ + "stylix", + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -168,27 +227,6 @@ "type": "github" } }, - "flake-utils_3": { - "inputs": { - "systems": [ - "stylix", - "systems" - ] - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "fromYaml": { "flake": false, "locked": { @@ -325,11 +363,11 @@ ] }, "locked": { - "lastModified": 1733572789, - "narHash": "sha256-zjO6m5BqxXIyjrnUziAzk4+T4VleqjstNudSqWcpsHI=", + "lastModified": 1736373539, + "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", "owner": "nix-community", "repo": "home-manager", - "rev": "c7ffc9727d115e433fd884a62dc164b587ff651d", + "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", "type": "github" }, "original": { @@ -456,13 +494,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1733550349, - "narHash": "sha256-NcGumB4Lr6KSDq+nIqXtNA8QwAQKDSZT7N9OTGWbTrs=", + "lastModified": 1737569578, + "narHash": "sha256-6qY0pk2QmUtBT9Mywdvif0i/CLVgpCjMUn6g9vB+f3M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e2605d0744c2417b09f8bf850dfca42fcf537d34", + "rev": "47addd76727f42d351590c905d9d1905ca895b82", "type": "github" }, "original": { @@ -480,7 +518,8 @@ "lix-module": "lix-module", "nixgl": "nixgl", "nixpkgs": "nixpkgs_3", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs-unstable": "nixpkgs-unstable", + "stylix": "stylix" } }, "rust-overlay": { @@ -512,22 +551,22 @@ "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", "flake-compat": "flake-compat", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_5", - "systems": "systems_2", + "nixpkgs": "nixpkgs_4", + "systems": "systems_3", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1736381946, - "narHash": "sha256-k66y4eMHZiJO3N43wuZOdoRmGmNwIj3EZq6NGK+AEM8=", + "lastModified": 1739392863, + "narHash": "sha256-mU+aYnob+7Ycu/tU9oFoweIJwdjLj0uxcp+I1czH4DM=", "owner": "danth", "repo": "stylix", - "rev": "c62df1918d178ade64dc8a2df99e78a5d5f20514", + "rev": "dfa4128b453d424c9fe3ef919776e722c0b766cb", "type": "github" }, "original": { @@ -566,6 +605,71 @@ "repo": "default", "type": "github" } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1729501581, + "narHash": "sha256-1ohEFMC23elnl39kxWnjzH1l2DFWWx4DhFNNYDTYt54=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "f0e7f7974a6441033eb0a172a0342e96722b4f14", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } } }, "root": "root", diff --git a/dot_config/flake/flake.nix b/dot_config/flake/flake.nix index c523251..608e63a 100644 --- a/dot_config/flake/flake.nix +++ b/dot_config/flake/flake.nix @@ -57,6 +57,9 @@ specialArgs = {inherit inputs outputs;}; modules = [ lix-module.nixosModules.default + + stylix.nixosModules.stylix + ./nixos/wash/configuration.nix home-manager.nixosModules.home-manager @@ -64,6 +67,7 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; + home-manager.backupFileExtension = "bak"; home-manager.extraSpecialArgs = {inherit inputs outputs;}; home-manager.users.tyler = import ./home/wash/wash.nix; } diff --git a/dot_config/flake/home/common.nix b/dot_config/flake/home/common.nix index 4392098..b457efc 100644 --- a/dot_config/flake/home/common.nix +++ b/dot_config/flake/home/common.nix @@ -66,7 +66,9 @@ programs.helix = { enable = true; + package = inputs.helix.packages.${pkgs.system}.default; settings = { + theme = "catppuccin_macchiato"; editor = { auto-format = false; #gutters = ["line-numbers", "diagnostics", "diff"] diff --git a/dot_config/flake/home/stylix.nix b/dot_config/flake/home/stylix.nix index 48777e4..8e7ec0f 100644 --- a/dot_config/flake/home/stylix.nix +++ b/dot_config/flake/home/stylix.nix @@ -15,9 +15,12 @@ in { }; enable = true; + autoEnable = false; - targets.alacritty.enable = false; + # targets.alacritty.enable = false; # targets.helix.enable = false; - targets.gtk.flatpakSupport.enable = false; + # targets.waybar.enable = true; + # targets.sway.enable = true; + # targets.gtk.flatpakSupport.enable = false; }; } diff --git a/dot_config/flake/home/wash/wash.nix b/dot_config/flake/home/wash/wash.nix index 44925b6..3f6b194 100644 --- a/dot_config/flake/home/wash/wash.nix +++ b/dot_config/flake/home/wash/wash.nix @@ -6,48 +6,440 @@ mod = "Mod4"; term = "kitty"; menu = "wmenu-run"; + image = pkgs.fetchurl { + url = "https://www.pixelstalk.net/wp-content/uploads/image11/Get-Glittery-blue-4K-wallpaper-with-a-calm-cool-sparkle.jpg"; + sha256 = "sha256-inZkyQsiF+aqgj2IK2AKN9STYLJBzG+QQCzw/X7cdcw="; + }; in { - imports = [../common.nix ../gnome.nix ../home-backup.nix ../gui.nix]; + imports = [../stylix.nix ../common.nix ../gnome.nix ../home-backup.nix ../gui.nix]; - programs.feh.enable = true; programs.waybar = { enable = true; style = '' + @define-color main-fg #cdd6f4; + @define-color main-bg #11111b; + @define-color main-br #cdd6f4; + + @define-color active-bg #9399b2; + @define-color active-fg #11111b; + + @define-color hover-bg #313244; + @define-color hover-fg rgba(205, 214, 244, 0.75); + + @define-color white #ffffff; + @define-color black #000000; + + /* Module Colors */ + + @define-color module-fg #f5e0dc; + @define-color workspaces #181825; + + @define-color cpuinfo #181825; + @define-color memory #1e1e2e; + @define-color cpu #313244; + @define-color distro-fg #000000; + @define-color distro-bg #9399b2; + @define-color time #313244; + @define-color date #1e1e2e; + @define-color tray #181825; + + @define-color pulseaudio #181825; + @define-color backlight #1e1e2e; + @define-color battery #313244; + @define-color power #9399b2; + + /* State Colors */ + + @define-color warning #f9e2af; + @define-color critical #f38ba8; + @define-color charging #cdd6f4; + * { font-size: 15px; - font-family: "CodeNewRoman Nerd Font Propo"; + font-family: "JetBrainsMono Nerd Font"; + font-weight: bold; + min-height: 0; + padding: 0; + border: none; + margin: 0; } window#waybar { - all:unset; + background: @main-bg; } - .modules-left { - padding: 7px; - margin: 10 0 5 10; - border-radius: 10px; - background: alpha(@background, .6); - box-shadow: 0px 0px 2px rgba(0, 0, 0, .6); + window#waybar > box { + background-color: transparent; + box-shadow: 0 0 2px 1px rgba(0, 0, 0, 1); + margin: 2px; } - .modules-center { - padding: 7px; - margin: 10 0 5 0; - border-radius: 10px; - background: alpha(@background, .6); - box-shadow: 0px 0px 2px rgab(0, 0, 0, .6); - } - - .modules-right { - padding: 7px; - margin: 10 0 5 0; - border-radius: 10px; - background: alpha(@background, .6); - box-shadow: 0px 0px 2px rgab(0, 0, 0, .6); - } + /* === Tooltip === */ tooltip { - background: @background + background: @main-bg; + border: solid; + border-width: 1.5px; + border-radius: 8px; + border-color: @main-br; + } + + tooltip label { + color: @main-fg; + font-weight: normal; + margin: -1.5px 3px; + } + + /* === Workspace Buttons === */ + + #workspaces button { + color: @main-fg; + border-radius: 8px; + box-shadow: none; + margin: 2px 0; + padding: 0 2px; + transition: none; + } + + #workspaces button:hover { + color: @hover-fg; + background: @hover-bg; + text-shadow: none; + box-shadow: none; + } + + #workspaces button.active { + color: @active-fg; + background: @hover-bg; + text-shadow: 0 0 2px rgba(0, 0, 0, 0.6); + box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.4); + margin: 2px; + padding: 0 6px; + } + + /* === General === */ + + #custom-ws, + #workspaces, + #window, + #custom-cpuinfo, + #memory, + /* #custom-cpu, */ + #cpu, + #idle_inhibitor, + #clock, + #custom-wifi, + #bluetooth, + #custom-update, + #custom-media, + #pulseaudio, + /* #custom-backlight, */ + #backlight, + #battery, + #custom-power { + opacity: 1; + color: @module-fg; + padding: 0 4px; + text-shadow: 0 0 2px rgba(0, 0, 0, 0.6); + } + + #custom-left1, + #custom-left2, + #custom-left3, + #custom-left4, + #custom-left5, + #custom-left6, + #custom-left7, + #custom-left8 { + margin-bottom: 0; + text-shadow: -2px 0 2px rgba(0, 0, 0, 0.5); + } + + #custom-right1, + #custom-right2, + #custom-right3, + #custom-right4, + #custom-right5 { + margin-bottom: 0; + padding-right: 3px; + text-shadow: 2px 0 2px rgba(0, 0, 0, 0.5); + } + + /* === Modules === */ + + /* == Window Icon == */ + #custom-ws { + background: @main-bg; + } + + /* == Workspaces == */ + + #custom-left1 { + color: @workspaces; + background: @main-bg; + margin-bottom: 0; + padding-left: 2px; + } + #workspaces { + background: @workspaces; + } + #custom-right1 { + color: @workspaces; + background: @main-bg; + text-shadow: 3px 0 2px rgba(0, 0, 0, 0.4); + margin-bottom: 0; + } + + /* == Temperature == */ + #custom-paddc { + padding-right: 22px; + } + #custom-left2 { + color: @cpuinfo; + background: @main-bg; + padding-left: 3px; + } + + #custom-cpuinfo { + background: @cpuinfo; + padding-left: 1px; + padding-right: 0; + } + + /* == Memory == */ + #custom-left3 { + color: @memory; + background: @cpuinfo; + padding-left: 3px; + } + #memory { + background: @memory; + padding-left: 1px; + padding-right: 0; + } + #memory.warning { + color: @warning; + } + #memory.critical { + color: @critical; + } + + /* == CPU == */ + #custom-left4 { + color: @cpu; + background: @memory; + padding-left: 3px; + } + #custom-cpu { + background: @cpu; + } + #custom-leftin1 { + color: @cpu; + margin-bottom: -1px; + } + + /* == Distro Icon == */ + #custom-left5 { + color: @distro-bg; + background: @main-bg; + text-shadow: -2px 0 2px rgba(0, 0, 0, 0.6); + margin-bottom: -2px; + padding-left: 3px; + } + #custom-distro { + color: @distro-fg; + background: @distro-bg; + margin: 0 -1px -2px 0; + padding: 0 0 0 3px; + text-shadow: 0 0 1.5px rgba(0, 0, 0, 1); + } + #custom-right2 { + color: @distro-bg; + background: @main-bg; + margin-bottom: -2px; + } + + /* == Time == */ + #custom-rightin1 { + color: @time; + margin-bottom: -1px; + } + #idle_inhibitor { + background: @time; + margin-right: -2px; + padding: 0 0 0 7px; + } + #idle_inhibitor:hover { + color: @hover-fg; + text-shadow: none; + box-shadow: none; + } + #clock.time { + background: @time; + padding: 0 3px 0 0; + } + #custom-right3 { + color: @time; + background: @date; + } + + /* == Date == */ + #clock.date { + background: @date; + } + #clock.date:hover { + color: @hover-fg; + text-shadow: none; + box-shadow: none; + } + #custom-right4 { + color: @date; + background: @tray; + } + + /* == Tray == */ + #custom-wifi { + padding-left: 5px; + padding-right: 8px; + background: @tray; + } + #custom-wifi:hover { + color: @hover-fg; + text-shadow: none; + box-shadow: none; + } + + #bluetooth { + padding-right: 5px; + background: @tray; + } + #bluetooth:hover { + color: @hover-fg; + text-shadow: none; + box-shadow: none; + } + + #custom-update { + padding-right: 8px; + background: @tray; + } + #custom-update:hover { + color: @hover-fg; + text-shadow: none; + box-shadow: none; + } + #custom-right5 { + color: @tray; + background: @main-bg; + } + + /* == Output Device == */ + #custom-left6 { + color: @pulseaudio; + background: @main-bg; + padding-left: 3px; + } + #pulseaudio { + background: @pulseaudio; + } + #pulseaudio:hover { + color: @hover-fg; + text-shadow: none; + box-shadow: none; + } + + /* == Brightness == */ + #custom-left7 { + color: @backlight; + background: @pulseaudio; + padding-left: 2px; + } + #custom-backlight { + background: @backlight; + } + + /* == Battery == */ + #custom-left8 { + color: @battery; + background: @backlight; + padding-left: 2px; + } + #battery { + color: @module-fg; + background: @battery; + } + #battery.warning { + color: @warning; + } + #battery.critical { + color: @critical; + } + #battery.charging { + color: @charging; + } + + /* == Power Button == */ + #custom-leftin2 { + color: @battery; + background: @main-bg; + margin-bottom: -1px; + } + #custom-power { + color: @main-bg; + background: @power; + text-shadow: 0 0 2px rgba(0, 0, 0, 0.6); + box-shadow: 1px 0 2px 1px rgba(0, 0, 0, 0.6); + border-radius: 10px; + margin: 2px 4px 2px 0; + padding: 0 6px 0 9px; + } + #custom-power:hover { + color: @hover-fg; + background: @hover-bg; + text-shadow: none; + box-shadow: none; + } + + + /* <<--< FONT SIZES >-->> */ + + * { + font-size: 15px; + } + + /* left and right arrows */ + #custom-left1, + #custom-left2, + #custom-left3, + #custom-left4, + #custom-left5, + #custom-left6, + #custom-left7, + #custom-left8, + #custom-right1, + #custom-right2, + #custom-right3, + #custom-right4, + #custom-right5 { + font-size: 19.68px; + } + + /* left and right inverse */ + #custom-leftin1, + #custom-leftin2, + #custom-rightin1 { + font-size: 20.5px; + } + + /* distro icon */ + #custom-distro { + font-size: 19.6px; + } + + /* distro arrows override */ + #custom-left5, + #custom-right2 { + font-size: 20.68px; } ''; @@ -57,58 +449,303 @@ in { position = "top"; reload_style_on_change = true; - modules-left = ["clock" "tray"]; - modules-center = ["sway/workspaces"]; - modules-right = ["battery"]; + modules-left = [ + "custom/ws" + "custom/left1" + "sway/workspaces" + "custom/right1" + "custom/paddw" + "sway/window" + ]; + modules-center = [ + "custom/paddc" + "custom/left2" + "custom/cpuinfo" + + "custom/left3" + "memory" + + "custom/left4" + "custom/cpu" + "custom/leftin1" + + "custom/left5" + "custom/distro" + "custom/right2" + + "custom/rightin1" + "idle_inhibitor" + "clock#time" + "custom/right3" + + "clock#date" + "custom/right4" + + "custom/wifi" + "bluetooth" + "custom/update" + "custom/right5" + ]; + modules-right = [ + "custom/media" + + "custom/left6" + "pulseaudio" + + "custom/left7" + "custom/backlight" + + "custom/left8" + "battery" + + "custom/leftin2" + "custom/power" + ]; + + "custom/ws" = { + format = "  "; + tooltip = false; + min-length = 3; + max-length = 3; + }; "sway/workspaces" = { format = "{icon}"; - format-icons = { - active = ""; - default = ""; - empty = ""; + persistent-workspaces = { + "1" = []; + "2" = []; + "3" = []; + "4" = []; }; }; - "clock" = { - format = "{:%I:%M:%S %p} "; - interval = 1; + "custom/cpuinfo" = { + exec = "~/.config/waybar/scripts/cpu-temp.sh"; + return-type = "json"; + format = "{}"; + tooltip = true; + interval = 5; + min-length = 8; + max-length = 8; + }; + + memory = { + states = { + warning = 75; + critical = 90; + }; + + format = "󰘚 {percentage}%"; + format-critical = "󰀦 {percentage}%"; + tooltip = true; + tooltip-format = "Memory Used: {used:0.1f} GB / {total:0.1f} GB"; + interval = 5; + min-length = 7; + max-length = 7; + }; + + "custom/cpu" = { + exec = "~/.config/waybar/scripts/cpu-usage.sh"; + return-type = "json"; + tooltip = true; + interval = 5; + min-length = 6; + max-length = 6; + }; + + "custom/distro" = { + format = " "; + tooltip = false; + }; + + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󱑎 "; + deactivated = "󱑂 "; + }; + + tooltip = true; + tooltip-format-activated = "Presentation Mode"; + tooltip-format-deactivated = "Idle Mode"; + start-activated = false; + }; + + "clock#time" = { + format = "{:%H:%M}"; + tooltip = true; + tooltip-format = "Standard Time: {:%I:%M %p}"; + min-length = 6; + max-length = 6; + }; + + "clock#date" = { + format = "󰨳 {:%m-%d}"; tooltip-format = "{calendar}"; + calendar = { + mode = "month"; + mode-mon-col = 6; + on-clock-right = "mode"; + format = { - today = "{}"; + months = "{}"; + weekdays = "{}"; + today = "{}"; }; }; + actions = { - on-click-right = "shift_down"; - on-clock = "shift_up"; + on-click = "mode"; + on-click-right = "mode"; }; + + min-length = 8; + max-length = 8; + }; + + "custom/wifi" = { + exec = "~/.config/waybar/scripts/wifi-status.sh"; + return-type = "json"; + format = "{}"; + tooltip = true; + on-click = "~/.config/waybar/scripts/wifi-menu.sh"; + on-clock-right = "kitty --title '󰤨 Network Manager TUI' bash -c nmtui"; + interval = 1; + min-length = 1; + max-length = 2; + }; + + bluetooth = { + format = "󰂰"; + format-disabled = "󰂲"; + format-connected = "󰂱"; + format-connected-battery = "󰂱"; + + tooltip-format = "{num_connections} connected"; + tooltip-format-disabled = "Bluetooth disabled"; + tooltip-format-connected = "{num_connections} connected\n{device_enumerate}"; + tooltip-format-enumerate-connected = "{device_alias}"; + tooltip-format-enumerate-connected-battery = "{device_alias}: {device_battery_percentage}%"; + + on-click = "~/.config/waybar/scripts/bluetooth-menu.sh"; + on-click-right = "kitty --title '󰂯 Bluetooth TUI' bash -c bluetui"; + interval = 1; + min-length = 1; + max-length = 1; + }; + + "custom/update" = { + min-length = 1; + max-length = 1; }; battery = { - interval = 30; states = { - good = 95; - warning = 30; - critical = 20; + warning = 20; + critical = 10; }; - format = "{capacity}% {icon}"; - format-charging = "{capacicty}% 󰂄"; - format-plugged = "{capacity}% 󰂄 "; - format-alt = "{time} {icon}"; - format-icons = [ - "󰁻" - "󰁼" - "󰁾" - "󰂀" - "󰂂" - "󰁹" - ]; + + format = "{icon} {capacity}%"; + format-icons = ["󰂎" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + format-charging = "󱘖 {capacity}%"; + + tooltip-format = "Discharging: {time}"; + tooltip-format-charging = "Charging: {time}"; + interval = 1; + min-length = 6; + max-length = 6; }; - tray = { - icon-size = 14; - spacing = 10; + "custom/power" = { + format = " "; + tooltip = true; + tooltip-format = "Power Menu"; + on-click = "~/.config/waybar/scripts/power-menu.sh"; + }; + + # Padding + "custom/paddw" = { + format = " "; + tooltip = false; + }; + "custom/paddc" = { + format = " "; + tooltip = false; + }; + + ##### Arrows + # Left + "custom/left1" = { + format = ""; + tooltip = false; + }; + "custom/left2" = { + format = ""; + tooltip = false; + }; + "custom/left3" = { + format = ""; + tooltip = false; + }; + "custom/left4" = { + format = ""; + tooltip = false; + }; + "custom/left5" = { + format = ""; + tooltip = false; + }; + + "custom/left6" = { + format = ""; + tooltip = false; + }; + + "custom/left7" = { + format = ""; + tooltip = false; + }; + + "custom/left8" = { + format = ""; + tooltip = false; + }; + + # Right + "custom/right1" = { + format = ""; + tooltip = false; + }; + "custom/right2" = { + format = ""; + tooltip = false; + }; + "custom/right3" = { + format = ""; + tooltip = false; + }; + "custom/right4" = { + format = ""; + tooltip = false; + }; + "custom/right5" = { + format = ""; + tooltip = false; + }; + + "custom/leftin1" = { + "format" = ""; + "tooltip" = false; + }; + "custom/leftin2" = { + "format" = ""; + "tooltip" = false; + }; + + "custom/rightin1" = { + format = ""; + tooltip = false; }; }; }; @@ -117,14 +754,16 @@ in { wayland.windowManager.sway = { enable = true; checkConfig = true; - config = { - output."*".scale = "1"; + config = rec { + output."*" = { + scale = "1"; + bg = "${image} fill"; + }; startup = [ - {command = "feh .config/flake/wallpaper.jpp";} + # {command = "swaybg -i .config/flake/wallpaper.jpg";} ]; - # Home row direction keys, like vim up = "k"; left = "h"; @@ -165,16 +804,16 @@ in { }; }; - ### Key bindings - # - # Basics: - keybindings = { + ### Key bindings + # + # Basics: + # Start a terminal "${mod}+Return" = "exec ${term}"; # Kill focused window - "${mod}+Shift+q" = "kill"; + "${mod}+q" = "kill"; # Start launcher "${mod}+d" = "exec ${menu}"; @@ -184,18 +823,69 @@ in { "${mod}+r" = "mode resize"; - # Moving around: + #### Moving around: # Move your focus around - # "${mod}+$left" = "focus left"; - # "${mod}+$down" = "focus down"; - # "${mod}+$up" = "focus up"; - # "${mod}+$right" = "focus right"; - # Or use $mod+[up|down|left|right] "${mod}+Left" = "focus left"; "${mod}+Down" = "focus down"; "${mod}+Up" = "focus up"; "${mod}+Right" = "focus right"; + + # Exit sway (logs you out of your Wayland session) + "${mod}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'"; + + ## Window + # Move the focused window with the same, but add Shift + "${mod}+Shift+${left}" = "move left"; + "${mod}+Shift+${down}" = "move down"; + "${mod}+Shift+${up}" = "move up"; + "${mod}+Shift+${right}" = "move right"; + # Ditto, with arrow keys + "${mod}+Shift+Left" = "move left"; + "${mod}+Shift+Down" = "move down"; + "${mod}+Shift+Up" = "move up"; + "${mod}+Shift+Right" = "move right"; + + ## Workspaces + + # Switch to workspace + "${mod}+1" = "workspace number 1"; + "${mod}+2" = "workspace number 2"; + "${mod}+3" = "workspace number 3"; + "${mod}+4" = "workspace number 4"; + "${mod}+5" = "workspace number 5"; + "${mod}+6" = "workspace number 6"; + "${mod}+7" = "workspace number 7"; + "${mod}+8" = "workspace number 8"; + "${mod}+9" = "workspace number 9"; + "${mod}+0" = "workspace number 10"; + # Move focused container to workspace + "${mod}+Shift+1" = "move container to workspace number 1"; + "${mod}+Shift+2" = "move container to workspace number 2"; + "${mod}+Shift+3" = "move container to workspace number 3"; + "${mod}+Shift+4" = "move container to workspace number 4"; + "${mod}+Shift+5" = "move container to workspace number 5"; + "${mod}+Shift+6" = "move container to workspace number 6"; + "${mod}+Shift+7" = "move container to workspace number 7"; + "${mod}+Shift+8" = "move container to workspace number 8"; + "${mod}+Shift+9" = "move container to workspace number 9"; + "${mod}+Shift+0" = "move container to workspace number 10"; + + ## Layout + + # You can "split" the current object of your focus with + # $mod+b or $mod+v, for horizontal and vertical splits + # respectively. + "${mod}+b" = "splith"; + "${mod}+v" = "splitv"; + + # Switch the current container between different layout styles + "${mod}+s" = "layout stacking"; + "${mod}+w" = "layout tabbed"; + "${mod}+e" = "layout toggle split"; + + # Make the current focus fullscreen + "${mod}+f" = "fullscreen"; }; # Drag floating windows by holding down $mod and left mouse button. @@ -205,63 +895,8 @@ in { # mouse button for dragging. # floating_modifier $mod normal - # Exit sway (logs you out of your Wayland session) - # bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' - - # # Move the focused window with the same, but add Shift - # bindsym $mod+Shift+$left move left - # bindsym $mod+Shift+$down move down - # bindsym $mod+Shift+$up move up - # bindsym $mod+Shift+$right move right - # # Ditto, with arrow keys - # bindsym $mod+Shift+Left move left - # bindsym $mod+Shift+Down move down - # bindsym $mod+Shift+Up move up - # bindsym $mod+Shift+Right move right - # # - # # Workspaces: - # # - # # Switch to workspace - # bindsym $mod+1 workspace number 1 - # bindsym $mod+2 workspace number 2 - # bindsym $mod+3 workspace number 3 - # bindsym $mod+4 workspace number 4 - # bindsym $mod+5 workspace number 5 - # bindsym $mod+6 workspace number 6 - # bindsym $mod+7 workspace number 7 - # bindsym $mod+8 workspace number 8 - # bindsym $mod+9 workspace number 9 - # bindsym $mod+0 workspace number 10 - # # Move focused container to workspace - # bindsym $mod+Shift+1 move container to workspace number 1 - # bindsym $mod+Shift+2 move container to workspace number 2 - # bindsym $mod+Shift+3 move container to workspace number 3 - # bindsym $mod+Shift+4 move container to workspace number 4 - # bindsym $mod+Shift+5 move container to workspace number 5 - # bindsym $mod+Shift+6 move container to workspace number 6 - # bindsym $mod+Shift+7 move container to workspace number 7 - # bindsym $mod+Shift+8 move container to workspace number 8 - # bindsym $mod+Shift+9 move container to workspace number 9 - # bindsym $mod+Shift+0 move container to workspace number 10 - # # Note: workspaces can have any name you want, not just numbers. - # # We just use 1-10 as the default. - # # # # Layout stuff: # # - # # You can "split" the current object of your focus with - # # $mod+b or $mod+v, for horizontal and vertical splits - # # respectively. - # bindsym $mod+b splith - # bindsym $mod+v splitv - - # # Switch the current container between different layout styles - # bindsym $mod+s layout stacking - # bindsym $mod+w layout tabbed - # bindsym $mod+e layout toggle split - - # # Make the current focus fullscreen - # bindsym $mod+f fullscreen - # # Toggle the current focus between tiling and floating mode # bindsym $mod+Shift+space floating toggle @@ -320,11 +955,6 @@ in { # # Special key to take a screenshot with grim # bindsym Print exec grim - # - # Status Bar: - # - # Read `man 5 sway-bar` for more information about this section. - bars = [ { command = "waybar"; @@ -340,6 +970,7 @@ in { packages = with pkgs; [ ventoy + swaybg (config.lib.nixGL.wrap renderdoc) ]; diff --git a/dot_config/flake/nixos/wash/configuration.nix b/dot_config/flake/nixos/wash/configuration.nix index f5fe33d..25bc46e 100644 --- a/dot_config/flake/nixos/wash/configuration.nix +++ b/dot_config/flake/nixos/wash/configuration.nix @@ -8,6 +8,7 @@ }: { imports = [ # Include the results of the hardware scan. + ../../home/stylix.nix ./hardware-configuration.nix ]; @@ -107,6 +108,7 @@ environment.systemPackages = with pkgs; [ sqlite vscode + lm_sensors ]; fonts.packages = with pkgs; [ diff --git a/run_home-manager.sh.tmpl b/run_home-manager.sh.tmpl deleted file mode 100644 index 1157cab..0000000 --- a/run_home-manager.sh.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -home-manager switch --flake ~/.config/flake/ -darwin-rebuild switch --flake ~/.config/flake/ diff --git a/run_nix-rebuild.sh b/run_nix-rebuild.sh new file mode 100755 index 0000000..9f425d1 --- /dev/null +++ b/run_nix-rebuild.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +[[ $(command -v nixos-rebuild) ]] && sudo nixos-rebuild switch --flake ~/.config/flake +[[ $(command -v darwin-rebuild) ]] && sudo darwin-rebuild switch --flake ~/.config/flake/ +[[ $(command -v home-manager) ]] && home-manager switch --flake ~/.config/flake/