gnome notch

This commit is contained in:
2026-03-04 10:33:27 -06:00
parent 3c4856ddca
commit 85b35eaedc
6 changed files with 42 additions and 5 deletions

View File

@@ -134,6 +134,8 @@ in
iwd
orca-slicer
vscodium
gnomeExtensions.notch-clock-offset
]);
services = {
@@ -148,13 +150,20 @@ in
};
dconf = {
enable = true;
settings = {
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0".name = "Keyboard Backlight +";
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0".binding = "<Shift><Super>MonBrightnessUp";
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0".command = "brightnessctl -d kbd_backlight +10";
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0".binding = "<Super>MonBrightnessUp";
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0".command = "brightnessctl -d kbd_backlight s +10";
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1".name = "Keyboard Backlight -";
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1".binding = "<Shift><Super>MonBrightnessDown";
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1".command = "brightnessctl -d kbd_backlight 10-";
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1".binding = "<Super>MonBrightnessDown";
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1".command = "brightnessctl -d kbd_backlight s 10-";
"org/gnome/shell".enabled-extensions = [
"notch-clock-offset@christophbrill.de"
];
"org/gnome/shell/extensions/notch-clock-offset".percent = 40;
"org/gnome/settings-daemon/plugins/media-keys".custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"

View File

@@ -62,7 +62,7 @@ in
"allowlockedremotedesktop@kamens.us"
"appindicatorsupport@rgcjonas.gmail.com"
"caffeine@patapon.info"
# "user-theme@gnome-shell-extensions.gcampax.github.com"
"user-theme@gnome-shell-extensions.gcampax.github.com"
"tiling-assistant@leleat-on-github"
"dash-to-dock@micxgx.gmail.com"
"BingWallpaper@ineffable-gmail.com"

View File

@@ -24,6 +24,7 @@ in
kernelParams = [
"apple_dcp.show_notch=1"
"appledrm.show_notch=1"
"melt_my_mac=1" # enable fan control
];

View File

@@ -135,6 +135,7 @@
]);
networking.networkmanager.wifi.backend = "iwd";
# nixpkgs.overlays = [ (import ./mutter) ];
environment.sessionVariables = {
DBX_CONTAINER_MANAGER = "podman";

View File

@@ -0,0 +1,19 @@
diff --git a/src/core/constraints.c b/src/core/constraints.c
index 3fd05a103..5ac514af8 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -1344,6 +1344,14 @@ constrain_fullscreen (MetaWindow *window,
monitor = info->entire_monitor;
+ if (abs(monitor.width / monitor.width - 1.54f) < 0.01f) {//window->monitor->is_primary) {//monitor.width == 3456 && monitor.height == 2234) {
+ const float notch_y_ratio = 64.f / 1963.f;
+ int notch_padding_height = monitor.height * notch_y_ratio;
+
+ monitor.y += notch_padding_height;
+ monitor.height -= notch_padding_height;
+ }
+
get_size_limits (window, &min_size, &max_size);
too_big = !mtk_rectangle_could_fit_rect (&monitor, &min_size);
too_small = !mtk_rectangle_could_fit_rect (&max_size, &monitor);

View File

@@ -0,0 +1,7 @@
(final: prev: {
mutter = prev.mutter.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or []) ++ [
./MBP16.patch
];
});
})