show top bar on deck

This commit is contained in:
Yan Lin 2025-11-02 21:32:41 +01:00
parent b02a1c6c90
commit 0d77068f9f
2 changed files with 29 additions and 13 deletions

View file

@ -13,6 +13,9 @@
../../../modules/gnome.nix ../../../modules/gnome.nix
]; ];
# Always show GNOME top bar on Steam Deck
gnome-custom.alwaysShowTopBar = true;
# Enable Ghostty terminal with OSC-52 clipboard support # Enable Ghostty terminal with OSC-52 clipboard support
programs.ghostty-custom = { programs.ghostty-custom = {
enable = true; enable = true;

View file

@ -1,12 +1,22 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
cfg = config.gnome-custom;
# Import gvariant helpers for dconf types # Import gvariant helpers for dconf types
mkTuple = lib.hm.gvariant.mkTuple; mkTuple = lib.hm.gvariant.mkTuple;
mkUint32 = lib.hm.gvariant.mkUint32; mkUint32 = lib.hm.gvariant.mkUint32;
in in
{ {
options.gnome-custom = {
alwaysShowTopBar = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Always show the GNOME top bar (status bar). When false, uses Hide Top Bar extension to auto-hide it.";
};
};
config = {
# GNOME configuration via dconf # GNOME configuration via dconf
dconf.settings = { dconf.settings = {
# Interface settings # Interface settings
@ -42,12 +52,13 @@ in
# GNOME Shell configuration # GNOME Shell configuration
"org/gnome/shell" = { "org/gnome/shell" = {
disable-user-extensions = false; disable-user-extensions = false;
enabled-extensions = [ enabled-extensions =
"hidetopbar@mathieu.bidon.ca" (lib.optionals (!cfg.alwaysShowTopBar) [ "hidetopbar@mathieu.bidon.ca" ])
"pano@elhan.io" ++ [
"tiling-assistant@leleat-on-github" "pano@elhan.io"
"rounded-window-corners@fxgn" "tiling-assistant@leleat-on-github"
]; "rounded-window-corners@fxgn"
];
favorite-apps = [ favorite-apps = [
"org.gnome.Nautilus.desktop" "org.gnome.Nautilus.desktop"
"com.mitchellh.ghostty.desktop" "com.mitchellh.ghostty.desktop"
@ -61,7 +72,7 @@ in
# Hide Top Bar extension configuration # Hide Top Bar extension configuration
# Always hide the top bar except in Activities Overview (Super key) # Always hide the top bar except in Activities Overview (Super key)
"org/gnome/shell/extensions/hidetopbar" = { "org/gnome/shell/extensions/hidetopbar" = lib.mkIf (!cfg.alwaysShowTopBar) {
enable-intellihide = false; enable-intellihide = false;
enable-active-window = false; enable-active-window = false;
mouse-sensitive = false; mouse-sensitive = false;
@ -178,12 +189,13 @@ in
}; };
# GNOME Shell extensions and Qt theming packages # GNOME Shell extensions and Qt theming packages
home.packages = with pkgs; [ home.packages = with pkgs;
gnomeExtensions.hide-top-bar (lib.optionals (!cfg.alwaysShowTopBar) [ gnomeExtensions.hide-top-bar ])
gnomeExtensions.pano ++ [
gnomeExtensions.tiling-assistant gnomeExtensions.pano
gnomeExtensions.rounded-window-corners-reborn gnomeExtensions.tiling-assistant
]; gnomeExtensions.rounded-window-corners-reborn
];
# Custom desktop file for opening text files with Neovim in Ghostty # Custom desktop file for opening text files with Neovim in Ghostty
home.file.".local/share/applications/nvim-ghostty.desktop".text = '' home.file.".local/share/applications/nvim-ghostty.desktop".text = ''
@ -331,4 +343,5 @@ in
fi fi
} }
''; '';
};
} }