From 5c441510227f576669dbe58a55e0dbbc7c1f6e2a Mon Sep 17 00:00:00 2001 From: Sean Kovacs Date: Thu, 11 Dec 2025 22:26:19 -0500 Subject: [PATCH] updates to tiling and neovim --- home/terminal/nvim/default.nix | 27 +++++--- home/tiling/niri/config/config.kdl | 7 +- home/tiling/niri/default.nix | 34 +++++++-- home/tiling/niri/fuzzel.ini | 0 home/tiling/quickshell/config/shell.qml | 43 ++++++++++++ home/tiling/quickshell/default.nix | 14 ++++ home/tiling/waybar/config/config.jsonc | 86 ----------------------- home/tiling/waybar/config/mocha.css | 26 ------- home/tiling/waybar/config/style.css | 92 ------------------------- home/tiling/waybar/default.nix | 13 ---- system/all.nix | 2 +- 11 files changed, 112 insertions(+), 232 deletions(-) create mode 100644 home/tiling/niri/fuzzel.ini create mode 100644 home/tiling/quickshell/config/shell.qml create mode 100644 home/tiling/quickshell/default.nix delete mode 100644 home/tiling/waybar/config/config.jsonc delete mode 100644 home/tiling/waybar/config/mocha.css delete mode 100644 home/tiling/waybar/config/style.css delete mode 100644 home/tiling/waybar/default.nix diff --git a/home/terminal/nvim/default.nix b/home/terminal/nvim/default.nix index fc2024c..03ba2b8 100644 --- a/home/terminal/nvim/default.nix +++ b/home/terminal/nvim/default.nix @@ -5,6 +5,8 @@ EDITOR = "nvim"; }; + home.packages = with pkgs; [ kdePackages.qtdeclarative ]; + programs.nixvim = { enable = true; enablePrintInit = true; @@ -73,20 +75,20 @@ plugins = { nvim-autopairs = { enable = true; - # autoLoad = true; + autoLoad = true; }; cmp = { autoEnableSources = true; enable = true; - # autoLoad = true; + autoLoad = true; }; copilot-lua = { enable = true; - # autoLoad = true; + autoLoad = true; }; conform-nvim = { enable = true; - # autoLoad = true; + autoLoad = true; settings = { formatters_by_ft = { lua = [ "stylua" ]; @@ -136,15 +138,24 @@ }; fzf-lua = { enable = true; - # autoLoad = true; + autoLoad = true; }; kitty-scrollback = { enable = true; - # autoLoad = true; + autoLoad = true; }; lsp = { enable = true; - # autoLoad = true; + servers = { + qmlls = { + enable = true; + cmd = [ + "qmlls" + "-E" + ]; + }; + }; + autoLoad = true; }; lualine = { enable = true; @@ -245,7 +256,7 @@ tabline = { }; extensions = [ ]; }; - # autoLoad = true; + autoLoad = true; }; }; }; diff --git a/home/tiling/niri/config/config.kdl b/home/tiling/niri/config/config.kdl index a459c28..29add73 100644 --- a/home/tiling/niri/config/config.kdl +++ b/home/tiling/niri/config/config.kdl @@ -208,7 +208,7 @@ layout { // If you enable the border, you probably want to disable the focus ring. // off - width 1 + width 2 active-color "#a6e3a1" inactive-color "#313244" // Color of the border around windows that request your attention. @@ -278,7 +278,10 @@ layout { // See the binds section below for more spawn examples. // This line starts waybar, a commonly used bar for Wayland compositors. -spawn-at-startup "waybar" +// spawn-at-startup "waybar" + +// Instead let's start quickshell, which is similar but made with QT/QML +spawn-at-startup "quickshell" // To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup: // spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell" diff --git a/home/tiling/niri/default.nix b/home/tiling/niri/default.nix index ce18911..4066ac8 100644 --- a/home/tiling/niri/default.nix +++ b/home/tiling/niri/default.nix @@ -1,5 +1,13 @@ { config, pkgs, ... }: +let + catppuccin-fuzzel = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "fuzzel"; + rev = "0af0e26901b60ada4b20522df739f032797b07c3"; + sha256 = "sha256-XpItMGsYq4XvLT+7OJ9YRILfd/9RG1GMuO6J4hSGepg="; + }; +in { home.packages = with pkgs; [ swaylock @@ -7,9 +15,27 @@ xdg-desktop-portal ]; - home.file.".config/niri" = { - source = ./config; - recursive = true; - force = true; + home.file = { + ".config/niri" = { + source = ./config; + recursive = true; + force = true; + }; + ".config/fuzzel/colors.ini" = { + text = builtins.readFile ( + "${catppuccin-fuzzel}/themes/catppuccin-${config.catppuccin.flavor}/${config.catppuccin.accent}.ini" + ); + force = true; + }; + ".config/fuzzel/fuzzel.ini" = { + text = '' + include = ./colors.ini + font = "NotoSansM Nerd Font Mono:size=10" + terminal = "kitty" + icons-enabled = yes + layer = "overlay" + ''; + force = true; + }; }; } diff --git a/home/tiling/niri/fuzzel.ini b/home/tiling/niri/fuzzel.ini new file mode 100644 index 0000000..e69de29 diff --git a/home/tiling/quickshell/config/shell.qml b/home/tiling/quickshell/config/shell.qml new file mode 100644 index 0000000..d4c325e --- /dev/null +++ b/home/tiling/quickshell/config/shell.qml @@ -0,0 +1,43 @@ +import Quickshell // for PanelWindow +import Quickshell.Io // for Process +import QtQuick // for Text + +PanelWindow { + anchors { + top: false + left: true + right: true + bottom: true + } + + implicitHeight: 37 + + color: "transparent" + + Rectangle { + anchors.fill: parent + color: "#1e1e2e" + Text { + id: clock + // center the bar in its parent component (the window) + anchors.centerIn: parent + anchors.right: parent + color: "#cdd6f4" + + Process { + id: dateProc + command: ["date"] + running: true + stdout: StdioCollector { + onStreamFinished: clock.text = this.text + } + } + Timer { + interval: 1000 + running: true + repeat: true + onTriggered: dateProc.running = true + } + } + } +} diff --git a/home/tiling/quickshell/default.nix b/home/tiling/quickshell/default.nix new file mode 100644 index 0000000..1463fe2 --- /dev/null +++ b/home/tiling/quickshell/default.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + home = { + # packages = with pkgs; [ quickshell ]; + file.".config/quickshell" = { + source = ./config; + recursive = true; + }; + }; + programs.quickshell = { + enable = true; + }; +} diff --git a/home/tiling/waybar/config/config.jsonc b/home/tiling/waybar/config/config.jsonc deleted file mode 100644 index 89989eb..0000000 --- a/home/tiling/waybar/config/config.jsonc +++ /dev/null @@ -1,86 +0,0 @@ -{ - "layer": "top", - "spacing": 0, - "height": 0, - - "margin-top": 0, - "margin-right": 0, - "margin-bottom": 0, - "margin-left": 0, - - "modules-left": ["sway/workspaces"], - - "modules-center": [], - - "modules-right": [ - "tray", - "cpu_text", - "cpu", - "memory", - "battery", - "network", - "pulseaudio", - "clock", - ], - - "sway/workspaces": { - "disable-scroll": true, - "all-outputs": true, - "tooltip": false, - }, - - "tray": { - "spacing": 10, - "tooltip": false, - }, - - "clock": { - "format": "{:%a %d, %I:%M %p}", - "tooltip": false, - }, - - "cpu": { - "format": "cpu {usage}%", - "interval": 2, - - "states": { - "critical": 90, - }, - }, - - "memory": { - "format": "mem {percentage}%", - "interval": 2, - - "states": { - "critical": 80, - }, - }, - - "battery": { - "format": "bat {capacity}%", - "interval": 5, - "states": { - "warning": 20, - "critical": 10, - }, - "tooltip": false, - }, - - "network": { - "format-wifi": "wifi up", - "format-ethernet": "enth up", - "format-disconnected": "no network", - "tooltip": false, - }, - - "pulseaudio": { - "scroll-step": 5, - "max-volume": 150, - "format": "vol {volume}%", - "format-bluetooth": "vol {volume}%", - "nospacing": 1, - "on-click": "pavucontrol", - "tooltip": false, - }, -} diff --git a/home/tiling/waybar/config/mocha.css b/home/tiling/waybar/config/mocha.css deleted file mode 100644 index 0eb6a82..0000000 --- a/home/tiling/waybar/config/mocha.css +++ /dev/null @@ -1,26 +0,0 @@ -@define-color rosewater #f5e0dc; -@define-color flamingo #f2cdcd; -@define-color pink #f5c2e7; -@define-color mauve #cba6f7; -@define-color red #f38ba8; -@define-color maroon #eba0ac; -@define-color peach #fab387; -@define-color yellow #f9e2af; -@define-color green #a6e3a1; -@define-color teal #94e2d5; -@define-color sky #89dceb; -@define-color sapphire #74c7ec; -@define-color blue #89b4fa; -@define-color lavender #b4befe; -@define-color text #cdd6f4; -@define-color subtext1 #bac2de; -@define-color subtext0 #a6adc8; -@define-color overlay2 #9399b2; -@define-color overlay1 #7f849c; -@define-color overlay0 #6c7086; -@define-color surface2 #585b70; -@define-color surface1 #45475a; -@define-color surface0 #313244; -@define-color base #1e1e2e; -@define-color mantle #181825; -@define-color crust #11111b; diff --git a/home/tiling/waybar/config/style.css b/home/tiling/waybar/config/style.css deleted file mode 100644 index ac840b1..0000000 --- a/home/tiling/waybar/config/style.css +++ /dev/null @@ -1,92 +0,0 @@ -@import "./mocha.css"; -* { - border: none; - border-radius: 0; - min-height: 0; - font-family: "NotoSansM Nerd Font Mono"; - /*font-weight: bold;*/ - font-size: 12px; - padding: 0; -} - -window#waybar { - background: @crust; - border-bottom: 2px solid @mantle; -} - -tooltip { - background-color: @crust; - border: 2px solid @peach; -} - -#clock, -#tray, -#cpu, -#memory, -#battery, -#network, -#pulseaudio { - margin: 6px 6px 6px 0px; - padding: 2px 8px; - border-radius: 12px; -} - -#workspaces { - background-color: #322d28; - margin: 6px 0px 6px 6px; - border: 2px solid #625343; -} - -#workspaces button { - all: initial; - min-width: 0; - box-shadow: inset 0 -3px transparent; - padding: 2px 4px; - color: #917a53; -} - -#workspaces button.focused { - color: #ddc7a1; -} - -#workspaces button.urgent { - background-color: #e78a4e; - color: #1d2021; -} - -#clock { - background-color: @base; - border: 2px solid @blue; - color: @subtext0; -} - -#battery { - background-color: @base; - border: 2px solid @green; - color: @subtext0; -} - -#tray, -#cpu, -#memory, -#network, -#pulseaudio { - background-color: @base; - border: 2px solid @blue; - color: @subtext0; -} - -#cpu.critical, -#memory.critical { - background-color: @base; - border: 2px solid @red; - color: @subtext0; -} - -#battery.warning, -#battery.critical, -#battery.urgent { - background-color: #c9af82; - border: 2px solid #917a53; - color: #ae6330; -} diff --git a/home/tiling/waybar/default.nix b/home/tiling/waybar/default.nix deleted file mode 100644 index 51a5665..0000000 --- a/home/tiling/waybar/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, pkgs, ... }: - -{ - programs.waybar = { - enable = true; - }; - - home.file.".config/waybar" = { - source = ./config; - recursive = true; - force = true; - }; -} diff --git a/system/all.nix b/system/all.nix index ba86733..041b9e8 100755 --- a/system/all.nix +++ b/system/all.nix @@ -28,7 +28,7 @@ ../home/all.nix ../home/browsers/firefox/default.nix ../home/tiling/niri/default.nix - ../home/tiling/waybar/default.nix + ../home/tiling/quickshell/default.nix ../home/systemd/default.nix ../home/terminal/btop/default.nix ../home/terminal/fish/default.nix