dotfiles

My PC Dotfiles & Website
commit f76593a728ffbd997c04628c03e60e596c436189
parent ecceb13e2d04f6b1327c30693022f275d0063315
Author: maydayv7 <maydayv7@gmail.com>
Date:   Mon, 13 Nov 2023 12:55:53 +0530

fix: Emoji Support 😎

Diffstat:

Mfiles/README.md | 1-
Mfiles/default.nix | 3---
Dfiles/fonts/fontconfig.xml | 42------------------------------------------
Mfiles/gnome/dconf.nix | 24++++++++++++++++--------
Mfiles/gnome/shortcuts.json | 16++++++++++++++--
Mmodules/README.md | 1-
Mmodules/apps/office.nix | 3---
Mmodules/gui/desktop/gnome.nix | 1+
Mmodules/gui/fonts.nix | 68+++++++++++++++++++++++++++++---------------------------------------
Mnetlify.toml | 5+++--
Mscripts/nixos.nix | 4+++-
11 files changed, 66 insertions(+), 102 deletions(-)

diff --git a/files/README.md b/files/README.md @@ -6,7 +6,6 @@ The `files` directory is used to store all my plain-text program configuration f - [`ascii`](./ascii) - Personal Collection of beautiful Ascii Art - [`colors`](./colors) - Base16 Color Schemes - [`firefox`](./firefox) - `firefox` Web Browser Theming -- [`fonts`](./fonts) - Font Configuration - [`git`](./git) - Configuration for `git` Version Control - [`gnome`](./gnome) - Configuration Files for GNOME Desktop - [`gpg`](./gpg) - Encrypted GPG Keys diff --git a/files/default.nix b/files/default.nix @@ -24,9 +24,6 @@ in rec { # Firefox Web Browser firefox.theme = readFile ./firefox/userContent.css; - # Custom Fonts - fonts.config = readFile ./fonts/fontconfig.xml; - # 'git' Version Control git.hooks = ./git/hooks; diff --git a/files/fonts/fontconfig.xml b/files/fonts/fontconfig.xml @@ -1,42 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> -<fontconfig> - <match target="font"> - <edit name="autohint" mode="assign"> - <bool>false</bool> - </edit> - <edit name="hinting" mode="assign"> - <bool>true</bool> - </edit> - <edit name="antialias" mode="assign"> - <bool>true</bool> - </edit> - <edit mode="assign" name="hintstyle"> - <const>hintslight</const> - </edit> - <edit mode="assign" name="rgba"> - <const>rgb</const> - </edit> - <edit mode="assign" name="lcdfilter"> - <const>lcddefault</const> - </edit> - </match> - <alias binding="weak"> - <family>monospace</family> - <prefer> - <family>emoji</family> - </prefer> - </alias> - <alias binding="weak"> - <family>sans-serif</family> - <prefer> - <family>emoji</family> - </prefer> - </alias> - <alias binding="weak"> - <family>serif</family> - <prefer> - <family>emoji</family> - </prefer> - </alias> -</fontconfig> diff --git a/files/gnome/dconf.nix b/files/gnome/dconf.nix @@ -306,6 +306,7 @@ in { "caffeine@patapon.info" "CoverflowAltTab@palatis.blogspot.com" "drive-menu@gnome-shell-extensions.gcampax.github.com" + "emoji-copy@felipeftn" "forge@jmmaranan.com" "gestureImprovements@gestures" "gnome-ui-tune@itstime.tech" @@ -447,11 +448,11 @@ in { icon-style = "Overlay"; }; - "org/gnome/shell/extensions/custom-hot-corners-extended/misc" = { - ws-switch-wrap = true; - ws-switch-ignore-last = true; - ws-switch-indicator-mode = 1; - show-osd-monitor-indexes = false; + "org/gnome/shell/extensions/emoji-copy" = { + always-show = false; + emoji-keybinding = ["<Super>period"]; + paste-on-select = true; + use-keybinding = true; }; "org/gnome/shell/extensions/forge" = { @@ -503,7 +504,7 @@ in { window-swap-right = ["<Shift><Super>d"]; window-swap-up = ["<Shift><Super>w"]; window-toggle-always-float = []; - window-toggle-float = ["<Super>p"]; + window-toggle-float = ["<Shift><Super>F"]; workspace-active-tile-toggle = ["<Shift><Super>z"]; }; @@ -584,8 +585,15 @@ in { }; "org/gnome/shell/extensions/top-bar-organizer" = { - center-box-order = ["dateMenu"]; - left-box-order = ["Space Bar" "activities" "timepp" "guillotine@fopdoodle.net" "appMenu"]; + center-box-order = ["dateMenu" "EmojisMenu"]; + left-box-order = [ + "Space Bar" + "activities" + "timepp" + "guillotine" + "guillotine@fopdoodle.net" + "appMenu" + ]; right-box-order = [ "a11y" "aggregateMenu" diff --git a/files/gnome/shortcuts.json b/files/gnome/shortcuts.json @@ -23,6 +23,10 @@ "description": "Maximize/Minimize window" }, { + "key": "Alt + Space", + "description": "Activate Window Menu" + }, + { "key": "Alt + Tab", "description": "Switches between Application" }, @@ -84,8 +88,12 @@ "description": "Snap window to center" }, { - "key": "Super + P", - "description": "Pin window above all others (or unpin)" + "key": "Super + Shift + F", + "description": "Toggle window floating state" + }, + { + "key": "Alt + Space + Always on Top", + "description": "Pin window above all others" }, { "key": "Super + Alt + Up/Left/Down/Right", @@ -129,6 +137,10 @@ "description": "Open Browser" }, { + "key": "Super + .", + "description": "Open emoji picker" + }, + { "key": "Ctrl + Alt + Return", "description": "Opens Task Manager" }, diff --git a/modules/README.md b/modules/README.md @@ -25,7 +25,6 @@ The `modules` directory contains custom-made pure Flakes-compatible configuratio - `wallpaper`: Desktop Wallpaper Choice (taken from `files.wallpapers`) - `fonts` - - `enable`: Enable Fonts Configuration - `true / false` - - `usrshare`: Create`/usr/share/fonts` and fill it with the system fonts - `true / false` - `wayland` - - `enable`: Enable Wayland Configuration - `true / false` diff --git a/modules/apps/office.nix b/modules/apps/office.nix @@ -27,9 +27,6 @@ in { zoom-us ]; - # Fonts - gui.fonts.usrshare = true; - # Dictionaries environment = { pathsToLink = ["/share/hunspell" "/share/myspell" "/share/hyphen"]; diff --git a/modules/gui/desktop/gnome.nix b/modules/gui/desktop/gnome.nix @@ -208,6 +208,7 @@ in { appindicator caffeine coverflow-alt-tab + emoji-copy forge gesture-improvements gnome-40-ui-improvements diff --git a/modules/gui/fonts.nix b/modules/gui/fonts.nix @@ -2,26 +2,39 @@ config, lib, pkgs, - files, ... -}: let - inherit (lib) mkIf mkEnableOption; - inherit (config.gui.fonts) enable usrshare; -in { - options.gui.fonts = { - enable = mkEnableOption "Enable Fonts Configuration"; - usrshare = mkEnableOption "Create`/usr/share/fonts` and fill it with the system fonts"; - }; +}: { + options.gui.fonts.enable = lib.mkEnableOption "Enable Fonts Configuration"; ## Font Configuration ## - config = mkIf enable { + config = lib.mkIf config.gui.fonts.enable rec { fonts = { - enableDefaultPackages = true; + enableDefaultPackages = false; fontDir.enable = true; - enableGhostscriptFonts = true; + + ## Render Settings fontconfig = { enable = true; - localConf = files.fonts.config; + + hinting = { + enable = true; + autohint = false; + style = "slight"; + }; + + subpixel = { + rgba = "rgb"; + lcdfilter = "default"; + }; + + # Emoji Support + defaultFonts = let + emoji = [stylix.fonts.emoji.name]; + in { + monospace = emoji; + sansSerif = emoji; + serif = emoji; + }; }; }; @@ -50,15 +63,15 @@ in { # Font Packages fonts.packages = with pkgs; [ corefonts - dejavu_fonts + gyre-fonts + unifont + fira fira-code fira-mono - liberation_ttf roboto roboto-slab source-code-pro - ttf_bitstream_vera ubuntu_font_family # Patched Nerd Fonts @@ -66,33 +79,10 @@ in { fonts = [ "FiraCode" "FiraMono" - "Hack" - "JetBrainsMono" "RobotoMono" "SourceCodePro" ]; }) ]; - - ## Font Compatibility - systemd.tmpfiles.rules = with pkgs; let - x11Fonts = runCommand "X11-fonts" {preferLocalBuild = true;} '' - mkdir -p "$out" - font_regexp='.*\.\(ttf\|ttc\|otf\|pcf\|pfa\|pfb\|bdf\)\(\.gz\)?' - find ${toString config.fonts.packages} -regex "$font_regexp" \ - -exec cp '{}' "$out" \; - cd "$out" - ${gzip}/bin/gunzip -f *.gz - ${xorg.mkfontscale}/bin/mkfontscale - ${xorg.mkfontdir}/bin/mkfontdir - cat $(find ${xorg.fontalias}/ -name fonts.alias) >fonts.alias - ''; - in - if usrshare - then ["L+ /usr/share/fonts - - - - ${x11Fonts}"] - else [ - "r /usr/share/fonts - - - - -" - "r /usr/share - - - - -" - ]; }; } diff --git a/netlify.toml b/netlify.toml @@ -4,6 +4,7 @@ command = """ export NP_GIT=$(which git) wget -nv https://github.com/DavHau/nix-portable/releases/latest/download/nix-portable chmod +x nix-portable -./nix-portable nix-build -E "with import ./.; callPackage ./site { site = ${DEPLOY_PRIME_URL}; }" -./nix-portable nix-shell -p bash --run "cp -rL result build" +./nix-portable nix flake lock --update-input systems +./nix-portable nix build --expr "with import ./.; callPackage ./site { site = ${DEPLOY_PRIME_URL}; }" +./nix-portable nix shell nixpkgs#bash -c "bash" -c "cp -rL result build" """ diff --git a/scripts/nixos.nix b/scripts/nixos.nix @@ -369,10 +369,12 @@ in pushd ${path.system} > /dev/null git stash git pull --rebase + git branch save + git checkout save git stash pop git add . git commit - git push --force + git push --set-upstream origin save --force popd > /dev/null ;; search)