dotfiles

My PC Dotfiles & Website
commit fb15e7dd987ce65d5f25d3f6d86da434f5c14d8e
parent feb93fed05274f093dbb0b24ea6267900cb7dc35
Author: maydayv7 <maydayv7@gmail.com>
Date:   Fri, 12 Jan 2024 23:00:37 +0530

fix: Refine XFCE Desktop

+ Use `touchegg` Gestures
+ Use GNOME Keyring

Diffstat:

MREADME.md | 2+-
Mdevices/vortex.nix | 2+-
Mfiles/README.md | 1+
Mfiles/flake.nix | 3+++
Dfiles/plank/launchers/firefox.dockitem | 2--
Afiles/touchegg/gestures.xml | 133+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mfiles/xfce/gtk.css | 8++++++++
Afiles/xfce/panel/eyes-18.rc | 2++
Dfiles/xfce/panel/whiskermenu-15.rc | 49-------------------------------------------------
Mfiles/xfce/settings/parole.xml | 2--
Mfiles/xfce/settings/thunar.xml | 3---
Mfiles/xfce/settings/xfce4-panel.xml | 26+++++++++++++++++++++++---
Mfiles/xfce/settings/xfwm4.xml | 2+-
Mfiles/xfce/settings/xsettings.xml | 6+++---
Mfiles/xfce/terminalrc | 8++++----
Mmodules/apps/wine.nix | 2+-
Mmodules/configuration.nix | 2+-
Mmodules/gui/desktop/gnome.nix | 10+++++-----
Mmodules/gui/desktop/xfce.nix | 53++++++++++++++++++++++++++++++++++++++++++++---------
Mmodules/gui/wayland.nix | 6+++++-
Mmodules/user/home.nix | 13++-----------
Musers/default.nix | 2--
22 files changed, 238 insertions(+), 99 deletions(-)

diff --git a/README.md b/README.md @@ -375,7 +375,7 @@ _Thanks a lot! ;)_ - [lucasew](https://github.com/lucasew/nixcfg) - [nobbz](https://github.com/NobbZ/nixos-config) - [rasendubi](https://github.com/rasendubi/dotfiles) - - [sloodmy](https://github.com/sioodmy/dotfiles) + - [sioodmy](https://github.com/sioodmy/dotfiles) - [tejing1](https://github.com/tejing1/nixos-config) - [vlaci](https://github.com/vlaci/nixos-config) - [wiltaylor](https://github.com/wiltaylor/dotfiles) diff --git a/devices/vortex.nix b/devices/vortex.nix @@ -30,7 +30,7 @@ }; gui = { - desktop = "gnome"; + desktop = "xfce"; wallpaper = "Nix"; }; diff --git a/files/README.md b/files/README.md @@ -17,6 +17,7 @@ The `files` directory is used to store all my plain-text program configuration f - [`proprietary`](https://github.com/maydayv7/proprietary) - Custom Proprietary Files - [`repl.nix`](./repl.nix): Interactive Nix Shell to explore syntax and configuration - [`templates`](./templates) - Document Templates +- [`touchegg`](./touchegg) - Touchegg X11 Touchpad Gestures - [`vscode`](./vscode) - Visual Studio Code Editor Configuration - [`wine`](./wine) - Configuration and Theming for `wine` applications - [`xdg`](./xdg) - XDG Desktop Utilities Configuration diff --git a/files/flake.nix b/files/flake.nix @@ -39,6 +39,9 @@ # Firefox Web Browser firefox.theme = readFile ./firefox/userContent.css; + # X11 Touchpad Gestures + gestures = readFile ./touchegg/gestures.xml; + # 'git' Version Control git.hooks = ./git/hooks; diff --git a/files/plank/launchers/firefox.dockitem b/files/plank/launchers/firefox.dockitem @@ -1,2 +0,0 @@ -[PlankDockItemPreferences] -Launcher=file:///etc/profiles/per-user/v7/share/applications/firefox.desktop diff --git a/files/touchegg/gestures.xml b/files/touchegg/gestures.xml @@ -0,0 +1,133 @@ +<touchégg> + <!-- My Epic Touchegg X11 Gestures Config --> + <settings> + <!-- + Delay (in ms), since the Gesture starts before animation + --> + <property name="animation_delay">100</property> + + <!-- + Percentage of the Gesture to be completed to apply action + --> + <property name="action_execute_threshold">20</property> + + <!-- + Global animation Colors + Specify Hex Code or use 'auto' + --> + <property name="color">5294E2</property> + <property name="borderColor">383C4A</property> + </settings> + + <!-- + Configuration for every application + --> + + <!-- 4 Fingers --> + <application name="All"> + <gesture type="SWIPE" fingers="4" direction="UP"> + <action type="MAXIMIZE_RESTORE_WINDOW"> + <animate>true</animate> + </action> + </gesture> + + <gesture type="SWIPE" fingers="4" direction="DOWN"> + <action type="MINIMIZE_WINDOW"> + <animate>true</animate> + </action> + </gesture> + + <gesture type="SWIPE" fingers="4" direction="LEFT"> + <action type="TILE_WINDOW"> + <direction>left</direction> + <animate>true</animate> + </action> + </gesture> + + <gesture type="SWIPE" fingers="4" direction="RIGHT"> + <action type="TILE_WINDOW"> + <direction>right</direction> + <animate>true</animate> + </action> + </gesture> + + <gesture type="PINCH" fingers="4" direction="OUT"> + <action type="CLOSE_WINDOW"> + <animate>true</animate> + </action> + </gesture> + + <gesture type="PINCH" fingers="4" direction="IN"> + <action type="SHOW_DESKTOP"> + <animate>true</animate> + </action> + </gesture> + + <!-- 3 Fingers --> + <gesture type="SWIPE" fingers="3" direction="UP"> + <action type="SEND_KEYS"> + <repeat>true</repeat> + <modifiers>Alt_L</modifiers> + <keys>Shift_L+Tab</keys> + <decreaseKeys>Tab</decreaseKeys> + </action> + </gesture> + + <gesture type="SWIPE" fingers="3" direction="LEFT"> + <action type="CHANGE_DESKTOP"> + <direction>next</direction> + <animate>true</animate> + <cyclic>true</cyclic> + <animationPosition>right</animationPosition> + </action> + </gesture> + + <gesture type="SWIPE" fingers="3" direction="RIGHT"> + <action type="CHANGE_DESKTOP"> + <direction>previous</direction> + <animate>true</animate> + <cyclic>true</cyclic> + <animationPosition>left</animationPosition> + </action> + </gesture> + + <!-- Touch Gestures --> + <gesture type="TAP" fingers="2"> + <action type="MOUSE_CLICK"> + <button>3</button> + <on>begin</on> + </action> + </gesture> + + <gesture type="TAP" fingers="3"> + <action type="MOUSE_CLICK"> + <button>2</button> + <on>begin</on> + </action> + </gesture> + </application> + + <!-- + Configuration for specific applications + --> + + <application name="Google-chrome,Chromium-browser,Firefox"> + <gesture type="PINCH" fingers="2" direction="IN"> + <action type="SEND_KEYS"> + <repeat>true</repeat> + <modifiers>Control_L</modifiers> + <keys>KP_Subtract</keys> + <decreaseKeys>KP_Add</decreaseKeys> + </action> + </gesture> + + <gesture type="PINCH" fingers="2" direction="OUT"> + <action type="SEND_KEYS"> + <repeat>true</repeat> + <modifiers>Control_L</modifiers> + <keys>KP_Add</keys> + <decreaseKeys>KP_Subtract</decreaseKeys> + </action> + </gesture> + </application> +</touchégg> diff --git a/files/xfce/gtk.css b/files/xfce/gtk.css @@ -4,3 +4,11 @@ border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; } + +wnck-pager:selected { + background-color: #5294e2; +} + +wnck-pager:hover { + background-color: #7c818c; +} diff --git a/files/xfce/panel/eyes-18.rc b/files/xfce/panel/eyes-18.rc @@ -0,0 +1,2 @@ +theme=Chibi +single_row=true diff --git a/files/xfce/panel/whiskermenu-15.rc b/files/xfce/panel/whiskermenu-15.rc @@ -1,49 +0,0 @@ -favorites=xfce4-web-browser.desktop,xfce4-mail-reader.desktop,xfce4-file-manager.desktop,xfce4-terminal-emulator.desktop -button-icon=start-here -button-single-row=false -show-button-title=false -show-button-icon=true -launcher-show-name=true -launcher-show-description=true -launcher-show-tooltip=true -launcher-icon-size=3 -hover-switch-category=true -category-show-name=true -category-icon-size=1 -sort-categories=true -view-mode=1 -default-category=0 -recent-items-max=10 -favorites-in-recent=true -position-search-alternate=false -position-commands-alternate=false -position-categories-alternate=false -position-categories-horizontal=false -stay-on-focus-out=false -profile-shape=0 -confirm-session-command=true -menu-width=858 -menu-height=569 -menu-opacity=90 -command-settings=xfce4-settings-manager -show-command-settings=true -command-lockscreen=xflock4 -show-command-lockscreen=true -command-switchuser=dm-tool switch-to-greeter -show-command-switchuser=false -command-logoutuser=xfce4-session-logout --logout --fast -show-command-logoutuser=false -command-restart=xfce4-session-logout --reboot --fast -show-command-restart=false -command-shutdown=xfce4-session-logout --halt --fast -show-command-shutdown=false -command-suspend=xfce4-session-logout --suspend -show-command-suspend=false -command-hibernate=xfce4-session-logout --hibernate -show-command-hibernate=false -command-logout=xfce4-session-logout -show-command-logout=true -command-menueditor=menulibre -show-command-menueditor=true -command-profile=mugshot -show-command-profile=true diff --git a/files/xfce/settings/parole.xml b/files/xfce/settings/parole.xml @@ -6,8 +6,6 @@ </property> <property name="window" type="empty"> <property name="maximized" type="bool" value="false"/> - <property name="width" type="int" value="869"/> - <property name="height" type="int" value="588"/> </property> <property name="audio" type="empty"> <property name="volume" type="int" value="50"/> diff --git a/files/xfce/settings/thunar.xml b/files/xfce/settings/thunar.xml @@ -3,11 +3,8 @@ <channel name="thunar" version="1.0"> <property name="last-view" type="string" value="ThunarIconView"/> <property name="last-icon-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_150_PERCENT"/> - <property name="last-window-width" type="int" value="915"/> - <property name="last-window-height" type="int" value="677"/> <property name="last-window-maximized" type="bool" value="false"/> <property name="last-show-hidden" type="bool" value="false"/> - <property name="last-separator-position" type="int" value="170"/> <property name="misc-single-click" type="bool" value="true"/> <property name="misc-thumbnail-draw-frames" type="bool" value="false"/> <property name="shortcuts-icon-size" type="string" value="THUNAR_ICON_SIZE_24"/> diff --git a/files/xfce/settings/xfce4-panel.xml b/files/xfce/settings/xfce4-panel.xml @@ -122,7 +122,22 @@ <property name="expand" type="bool" value="false"/> <property name="style" type="uint" value="0"/> </property> - <property name="plugin-15" type="string" value="whiskermenu"/> + <property name="plugin-15" type="string" value="whiskermenu"> + <property name="button-icon" type="string" value="start-here"/> + <property name="launcher-icon-size" type="int" value="3"/> + <property name="hover-switch-category" type="bool" value="true"/> + <property name="favorites-in-recent" type="bool" value="true"/> + <property name="menu-width" type="int" value="858"/> + <property name="menu-height" type="int" value="569"/> + <property name="menu-opacity" type="int" value="90"/> + <property name="command-switchuser" type="string" value="dm-tool switch-to-greeter"/> + <property name="favorites" type="array"> + <value type="string" value="xfce4-web-browser.desktop"/> + <value type="string" value="xfce4-mail-reader.desktop"/> + <value type="string" value="xfce4-file-manager.desktop"/> + <value type="string" value="xfce4-terminal-emulator.desktop"/> + </property> + </property> <property name="plugin-1" type="string" value="separator"> <property name="style" type="uint" value="0"/> </property> @@ -131,7 +146,6 @@ <property name="plugin-18" type="string" value="eyes"/> <property name="plugin-19" type="string" value="screenshooter"/> <property name="plugin-20" type="string" value="weather"> - <property name="msl" type="int" value="529"/> <property name="cache-max-age" type="int" value="172800"/> <property name="power-saving" type="bool" value="true"/> <property name="units" type="empty"> @@ -165,9 +179,15 @@ <property name="tweaks" type="empty"> <property name="paste-on-activate" type="uint" value="2"/> <property name="popup-at-pointer" type="bool" value="true"/> + <property name="never-confirm-history-clear" type="bool" value="false"/> </property> </property> - <property name="plugin-12" type="string" value="pager"/> + <property name="plugin-12" type="string" value="pager"> + <property name="rows" type="uint" value="1"/> + <property name="wrap-workspaces" type="bool" value="true"/> + <property name="miniature-view" type="bool" value="true"/> + <property name="numbering" type="bool" value="false"/> + </property> <property name="plugin-16" type="string" value="separator"> <property name="style" type="uint" value="2"/> <property name="expand" type="bool" value="false"/> diff --git a/files/xfce/settings/xfwm4.xml b/files/xfce/settings/xfwm4.xml @@ -35,7 +35,7 @@ <property name="mousewheel_rollup" type="bool" value="true"/> <property name="move_opacity" type="int" value="100"/> <property name="placement_mode" type="string" value="center"/> - <property name="placement_ratio" type="int" value="20"/> + <property name="placement_ratio" type="int" value="100"/> <property name="popup_opacity" type="int" value="100"/> <property name="prevent_focus_stealing" type="bool" value="false"/> <property name="raise_delay" type="int" value="250"/> diff --git a/files/xfce/settings/xsettings.xml b/files/xfce/settings/xsettings.xml @@ -2,8 +2,8 @@ <channel name="xsettings" version="1.0"> <property name="Net" type="empty"> - <property name="ThemeName" type="string" value="Arc-Dark"/> - <property name="IconThemeName" type="string" value="Papirus-Dark"/> + <property name="ThemeName" type="string" value="@theme"/> + <property name="IconThemeName" type="string" value="@icons"/> <property name="DoubleClickTime" type="empty"/> <property name="DoubleClickDistance" type="empty"/> <property name="DndDragThreshold" type="empty"/> @@ -32,7 +32,7 @@ <property name="MenuImages" type="empty"/> <property name="ButtonImages" type="bool" value="false"/> <property name="MenuBarAccel" type="empty"/> - <property name="CursorThemeName" type="string" value="Adwaita"/> + <property name="CursorThemeName" type="string" value="@cursor"/> <property name="CursorThemeSize" type="empty"/> <property name="DecorationLayout" type="empty"/> <property name="DialogsUseHeader" type="empty"/> diff --git a/files/xfce/terminalrc b/files/xfce/terminalrc @@ -31,8 +31,8 @@ MiscShowUnsafePasteDialog=TRUE ScrollingOnOutput=FALSE ScrollingUnlimited=TRUE BackgroundDarkness=0.900000 -ColorBackground=#2f2f34343f3f -ColorPalette=rgb(38,43,54);rgb(156,53,40);rgb(97,188,59);rgb(243,180,58);rgb(13,104,168);rgb(116,69,96);rgb(40,142,156);rgb(162,162,162);rgb(47,52,63);rgb(214,73,55);rgb(134,223,93);rgb(253,215,90);rgb(15,117,189);rgb(158,94,131);rgb(55,195,214);rgb(249,249,249) -ColorForeground=#f3f3f4f4f5f5 -TabActivityColor=#bfff3fff3fff +ColorBackground=#2F2F34343F3F +ColorPalette=#2F343F;#404552;#4B5162;#7C818C;#A2A2A2;#F3F4F5;#0F75BD;#F9F9F9;#9C3528;#D64937;#F3B43A;#61BC3B;#288E9C;#0D68A8;#744560;#37C3D6 +ColorForeground=#F3F3F4F4F5F5 +TabActivityColor=#BFFF3FFF3FFF ColorUseTheme=TRUE diff --git a/modules/apps/wine.nix b/modules/apps/wine.nix @@ -42,7 +42,7 @@ in { pkgs.callPackage name { inherit lib pkgs; wine = cfg.package; - build = inputs.windows.lib."${system}"; + build = inputs.windows.lib."${pkgs.system}"; }))); }; } diff --git a/modules/configuration.nix b/modules/configuration.nix @@ -72,7 +72,7 @@ in (makeOverridable lib.nixosSystem) { inherit system; specialArgs = { - inherit system util inputs files; + inherit util inputs files; lib = with inputs; nixpkgs.lib // {inherit (home-manager.lib) hm;}; }; diff --git a/modules/gui/desktop/gnome.nix b/modules/gui/desktop/gnome.nix @@ -124,17 +124,17 @@ in { # Window Tiling Stylesheet ".config/forge/stylesheet/forge/stylesheet.css".text = gnome.tiling; - + } + // + ## 3rd Party Apps Configuration + { # Firefox GNOME Theme ".mozilla/firefox/default/chrome/userChrome.css".text = ''@import "${pkgs.custom.firefox-gnome-theme}/userChrome.css";''; ".mozilla/firefox/default/chrome/userContent.css".text = firefox.theme; # Workaround for NixOS/nixpkgs/47340 ".mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.chrome-gnome-shell}/lib/mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json"; - } - // - ## 3rd Party Apps Configuration - { + # Discord DNOME Theme ".config/BetterDiscord/data/stable/custom.css" = mkIf (exists "discord") {text = ''@import "https://raw.githack.com/GeopJr/DNOME/dist/DNOME.css";'';}; diff --git a/modules/gui/desktop/xfce.nix b/modules/gui/desktop/xfce.nix @@ -8,7 +8,7 @@ }: with files; let inherit (config.gui) desktop wallpaper; - exists = app: builtins.elem app config.app.list; + exists = app: builtins.elem app config.apps.list; inherit (lib) mapAttrs' mkIf mkForce mkMerge nameValuePair replaceStrings; # GTK+ Theme @@ -58,14 +58,17 @@ in { (mkIf (desktop == "xfce") { # Desktop Integration gui.fonts.enable = true; - services.bamf.enable = true; - services.xserver.displayManager.lightdm.greeters.gtk = theme; - programs.gnupg.agent.pinentryFlavor = - mkIf config.programs.gnupg.agent.enable "gtk2"; + services = { + bamf.enable = true; + touchegg.enable = true; + gnome.gnome-keyring.enable = true; + xserver.displayManager.lightdm.greeters.gtk = theme; + }; # Plugins programs = { xfconf.enable = true; + seahorse.enable = true; thunar = { enable = true; plugins = with pkgs.xfce; [ @@ -74,6 +77,8 @@ in { thunar-volman ]; }; + + gnupg.agent.pinentryFlavor = mkIf config.programs.gnupg.agent.enable "gtk2"; }; # Utilities @@ -144,10 +149,17 @@ in { # GTK+ Bookmarks ".config/gtk-3.0/bookmarks".text = gtk.bookmarks; + # Touchpad Gestures + ".config/touchegg/touchegg.conf".text = gestures; + # Plank Dock ".config/autostart/Dock.desktop".text = plank.autostart; - ".config/plank/dock1/launchers".source = plank.launchers; ".local/share/plank/themes/default/dock.theme".text = plank.theme; + ".config/plank/dock1/launchers" = { + source = plank.launchers; + recursive = true; + force = true; + }; # Desktop Settings ".config/xfce4/terminal/terminalrc".text = xfce.terminal; @@ -158,15 +170,38 @@ in { } // mapAttrs' (name: value: nameValuePair ".config/xfce4/xfconf/xfce-perchannel-xml/${name}.xml" - {text = value;}) + { + text = value; + force = true; + }) (util.map.files { directory = xfce.settings; extension = ".xml"; apply = file: - replaceStrings ["@system" "@wallpaper"] - [path.system wallpaper] (builtins.readFile file); + replaceStrings [ + "@system" + "@wallpaper" + "@theme" + "@icons" + "@cursor" + ] + [ + path.system + wallpaper + theme.theme.name + theme.iconTheme.name + config.stylix.cursor.name + ] (builtins.readFile file); }); + # Dock Settings + dconf.settings."net/launchpad/plank/docks/dock1" = { + current-workspace-only = true; + icon-size = 60; + pressure-reveal = true; + theme = "default"; + }; + ## 3rd Party Apps Configuration # Code Editor programs.vscode = mkIf (exists "vscode") { diff --git a/modules/gui/wayland.nix b/modules/gui/wayland.nix @@ -4,7 +4,10 @@ ## Wayland Configuration ## config = { # Environment Setup - environment.sessionVariables.NIXOS_OZONE_WL = "1"; + environment.sessionVariables = { + NIXOS_OZONE_WL = "1"; + MOZ_ENABLE_WAYLAND = "1"; + }; # Legacy Programs Support programs.xwayland.enable = true; @@ -13,6 +16,7 @@ xdg.portal = { enable = true; wlr.enable = true; + xdgOpenUsePortal = true; }; }; } diff --git a/modules/user/home.nix b/modules/user/home.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: { +{config, ...}: { ## User Home Configuration ## config = { # Environment Settings @@ -16,6 +11,7 @@ user.homeConfig = { imports = [../../users]; + systemd.user.startServices = true; # Package Configuration home = { @@ -25,11 +21,6 @@ ".config/nix/nix.conf".source = config.environment.etc."nix/nix.conf".source; }; - - # Package Delta - activation.delta = lib.hm.dag.entryAnywhere '' - ${pkgs.nvd}/bin/nvd diff $oldGenPath $newGenPath - ''; }; }; }; diff --git a/users/default.nix b/users/default.nix @@ -39,8 +39,6 @@ in { ## Home Configuration ## config = { - systemd.user.startServices = true; - # Wallpapers home.file.".local/share/backgrounds".source = files.wallpapers.path;