dotfiles

My PC Dotfiles & Website
commit 144df8ce6e866641739f54d1dddcc1b388d913b3
parent 3b34d7dfc9dc4b8695d12c76e7bc3ffd9f067be3
Author: maydayv7 <maydayv7@gmail.com>
Date:   Fri, 24 Feb 2023 14:32:10 +0530

style(GNOME): Desktop Integration

+ Add Libadwaita Kvantum Theme
+ Update VS Code GNOME Theme & Extensions
+ Support Rounded Corners on all Windows

Also some fixes to `update.sh`

Diffstat:

MREADME.md | 5++++-
Mfiles/gnome/dconf.nix | 12+++++++++++-
Mfiles/vscode/settings.json | 3++-
Mmodules/apps/vscode.nix | 10+++++-----
Mmodules/gui/gnome.nix | 31+++++++++++++++++--------------
Apackages/kvlibadwaita/default.nix | 31+++++++++++++++++++++++++++++++
Apackages/kvlibadwaita/metadata.nix | 5+++++
Mscripts/packages.sh | 11++++-------
8 files changed, 79 insertions(+), 29 deletions(-)

diff --git a/README.md b/README.md @@ -362,6 +362,8 @@ The [`home-manager`](https://github.com/nix-community/home-manager) module is us - [Dash to Panel](https://github.com/home-sweet-gnome/dash-to-panel): GNOME Shell Extension providing a highly customizable icon taskbar for maximized productivity - [DNOME](https://github.com/GeopJr/DNOME) Discord Theme: Discord theme inspired by Adwaita, designed to integrate Discord with GNOME - [Firefox GNOME Theme](https://github.com/rafaelmardojai/firefox-gnome-theme): GNOME Theme for the Mozilla Firefox Browser, used for better desktop integration +- [VS Code Adwaita Theme](https://github.com/piousdeer/vscode-adwaita): Integrates Visual Studio Code with GNOME Desktop +- [KvLibadwaita Kvantum Theme](https://github.com/GabePoel/KvLibadwaita): Integrates QT Apps with GNOME Desktop ### Important Links @@ -603,10 +605,11 @@ You can navigate to the `README`'s present in the various directories to know mo - It is a hard requirement to clone the repository to `/etc/nixos` in order to use it as intended - Need to completely transition to Wayland -## Manually Packaged Apps +#### Manually Packaged Apps - **GNOME Extensions**: - Fly Pie +- VS Code Themes and Plugins - [Wine](./packages/wine) Applications - [Flatpak](./modules/apps/flatpak.nix) Applications diff --git a/files/gnome/dconf.nix b/files/gnome/dconf.nix @@ -105,7 +105,7 @@ in { }; "org/gnome/desktop/wm/preferences" = { - button-layout = "appmenu:minimize,close"; + button-layout = "appmenu:minimize,maximize,close"; titlebar-font = "Product Sans Bold 11"; visual-bell = false; num-workspaces = 4; @@ -299,6 +299,7 @@ in { "lock-screen-message@advendradeswanta.gitlab.com" "lockkeys@vaina.lt" "pano@elhan.io" + "rounded-window-corners@yilozt" "timepp@zagortenay333" "top-bar-organizer@julian.gse.jsts.xyz" "user-theme@gnome-shell-extensions.gcampax.github.com" @@ -481,6 +482,15 @@ in { incognito-shortcut = ["<Ctrl><Super>v"]; }; + "org/gnome/shell/extensions/rounded-window-corners" = { + custom-rounded-corner-settings = "@a{sv} {}"; + focused-shadow = "{'vertical_offset': 4, 'horizontal_offset': 0, 'blur_offset': 28, 'spread_radius': 4, 'opacity': 60}"; + global-rounded-corner-settings = "{'padding': <{'left': <uint32 1>, 'right': <uint32 1>, 'top': <uint32 1>, 'bottom': <uint32 1>}>, 'keep_rounded_corners': <{'maximized': <true>, 'fullscreen': <false>}>, 'border_radius': <uint32 12>, 'smoothing': <uint32 0>, 'enabled': <true>}"; + settings-version = mkUint32 5; + skip-libhandy-app = true; + unfocused-shadow = "{'horizontal_offset': 0, 'vertical_offset': 2, 'blur_offset': 12, 'spread_radius': -1, 'opacity': 65}"; + }; + "org/gnome/shell/extensions/timepp" = { alarms-separate-menu = false; panel-item-position = "Left"; diff --git a/files/vscode/settings.json b/files/vscode/settings.json @@ -34,7 +34,9 @@ "terminal.integrated.enableBell": true, "terminal.integrated.tabs.separator": " / ", "update.mode": "none", + "window.autoDetectColorScheme": true, "window.closeWhenEmpty": true, + "window.commandCenter": true, "window.dialogStyle": "custom", "window.doubleClickIconToClose": true, "window.menuBarVisibility": "toggle", @@ -42,7 +44,6 @@ "window.zoomLevel": 1, "workbench.commandPalette.preserveInput": true, "workbench.editor.highlightModifiedTabs": true, - "workbench.iconTheme": "file-icons", "workbench.list.horizontalScrolling": true, "workbench.list.smoothScrolling": true, "workbench.startupEditor": "readme" diff --git a/modules/apps/vscode.nix b/modules/apps/vscode.nix @@ -64,20 +64,20 @@ in { { name = "better-comments"; publisher = "aaron-bond"; - version = "2.1.0"; - sha256 = "sha256-l7MG2bpfTgVgC+xLal6ygbxrrRoNONzOWjs3fZeZtU4="; + version = "3.0.2"; + sha256 = "sha256-hQmA8PWjf2Nd60v5EAuqqD8LIEu7slrNs8luc3ePgZc="; } { name = "org-mode"; publisher = "vscode-org-mode"; version = "1.0.0"; - sha256 = "1dp6mz1rb8awrrpig1j8y6nyln0186gkmrflfr8hahaqr668il53"; + sha256 = "sha256-o9CIjMlYQQVRdtTlOp9BAVjqrfFIhhdvzlyhlcOv5rY="; } { name = "vscode-html-css"; publisher = "ecmel"; - version = "1.11.0"; - sha256 = "sha256-xwzfTFSBonGcfyhE0fs1ZRHlRbPFLGgshw1NLLyFypI="; + version = "1.13.1"; + sha256 = "sha256-gBfcizgn+thCqpTa8bubh6S77ynBC/Vpc+7n4XOfqzE="; } ]; }; diff --git a/modules/gui/gnome.nix b/modules/gui/gnome.nix @@ -20,7 +20,6 @@ in { desktopManager.gnome.enable = true; displayManager = { gdm.enable = true; - defaultSession = "gnome-xorg"; }; }; @@ -137,19 +136,14 @@ in { # Code Editor Settings programs.vscode = mkIf (elem pkgs.vscode apps) { + extensions = [pkgs.vscode-extensions.piousdeer.adwaita-theme]; userSettings = { - "workbench.colorTheme" = "GNOME dark"; + "workbench.preferredDarkColorTheme" = "Adwaita Dark"; + "workbench.preferredLightColorTheme" = "Adwaita Light"; + "workbench.productIconTheme" = "adwaita"; + "window.titleBarStyle" = "custom"; "terminal.external.linuxExec" = "gnome-console"; }; - - extensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "vscode-gnome-theme"; - publisher = "rafaelmardojai"; - version = "0.4.1"; - sha256 = "sha256-J4WEa6VVPks6rhzjE5oD88RwqaRjTjn/gPeZKaCS6RM="; - } - ]; }; home.file = { @@ -192,8 +186,16 @@ in { }; }; - environment.systemPackages = with pkgs.gnome; - [ + # QT Theme + environment.variables."QT_STYLE_OVERRIDE" = mkForce "kvantum"; + environment.etc."xdg/Kvantum/kvantum.kvconfig".text = '' + [General] + theme=KvLibadwaitaDark + ''; + + environment.systemPackages = with pkgs; + [libsForQt5.qtstyleplugin-kvantum custom.kvlibadwaita] + ++ (with pkgs.gnome; [ # GNOME Apps gedit gnome-boxes @@ -207,7 +209,7 @@ in { gnome-chess gnome-mines quadrapassel - ] + ]) ++ (with pkgs; [ # GNOME Circle apostrophe @@ -251,6 +253,7 @@ in { lock-keys lock-screen-message unstable.gnomeExtensions.pano + rounded-window-corners timepp top-bar-organizer vitals diff --git a/packages/kvlibadwaita/default.nix b/packages/kvlibadwaita/default.nix @@ -0,0 +1,31 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; let + metadata = import ./metadata.nix; +in + stdenv.mkDerivation rec { + pname = "KvLibadwaita"; + version = metadata.rev; + + src = fetchFromGitHub { + owner = "GabePoel"; + repo = pname; + inherit (metadata) rev sha256; + }; + + dontBuild = true; + installPhase = '' + mkdir -p $out/share/Kvantum/ + cp -r ./src/. $out/share/Kvantum/ + ''; + + meta = with lib; { + description = "Libadwaita style theme for Kvantum"; + homepage = metadata.repo; + license = licenses.gpl3Only; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/kvlibadwaita/metadata.nix b/packages/kvlibadwaita/metadata.nix @@ -0,0 +1,5 @@ +{ + repo = "https://github.com/GabePoel/KvLibadwaita"; + rev = "61f2e0b04937b6d31f0f4641c9c9f1cc3600a723"; + sha256 = "sha256-65Gz3WNAwuoWWbBZJL0Ifl+PVLOHjpl6GNhR1oVmGZ0="; +} diff --git a/scripts/packages.sh b/scripts/packages.sh @@ -1,14 +1,10 @@ #! /usr/bin/env nix-shell #! nix-shell -i bash -p coreutils jq # shellcheck shell=bash +unset NIX_PATH set -euo pipefail # Script to Automatically Update Packages # - -# Preset Variables -unset NIX_PATH -fakeHash="0000000000000000000000000000000000000000000000000000000000000000" - # Logic update() { if [[ "${1:-""}" != "" ]] @@ -53,9 +49,9 @@ update() { then if [[ "${release}" == "true" ]] then - newrev="$(git ls-remote --refs --sort="version:refname" --tags ${repo} | cut -d/ -f3-|tail -n1)" + newrev="$(git ls-remote --refs --sort="version:refname" --tags ${repo} | cut -d/ -f3- | tail -n1)" else - if [ -z "${branch}" ] + if [[ "${branch}" == "null" ]] then branch="main" fi @@ -74,6 +70,7 @@ update() { echo "Bumping '${rev}' ---> '${newrev}'" # Sha256 + fakeHash="0000000000000000000000000000000000000000000000000000000000000000" sed -i "s|${rev}|${newrev}|" "${metadata}" sed -i "s|${sha256}|${fakeHash}|" "${metadata}" nix build --no-link "..#${upattr}" &> "${l}" || true