New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnomeExtensions.no-title-bar: init at 8 #35281
Conversation
@jtojnar yes, this fork seems to be active. |
eabf0f9
to
c86ea92
Compare
]; | ||
|
||
buildInputs = [ | ||
xorg.xprop xorg.xwininfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work – buildInputs
simply adds the package to PATH
and other relevant variables during build so that the build process (e.g. configure
script) could pick it up. In this case, the path is ignored during build so we need to patch the extension manually:
--- a/decoration.js
+++ b/decoration.js
@@ -181,7 +181,7 @@
let act = win.get_compositor_private();
let xwindow = act && act['x-window'];
if (xwindow) {
- let xwininfo = GLib.spawn_command_line_sync('xwininfo -children -id 0x%x'.format(xwindow));
+ let xwininfo = GLib.spawn_command_line_sync('@xwininfo@ -children -id 0x%x'.format(xwindow));
if (xwininfo[0]) {
let str = xwininfo[1].toString();
@@ -207,7 +207,7 @@
// Try enumerating all available windows and match the title. Note that this
// may be necessary if the title contains special characters and `x-window`
// is not available.
- let result = GLib.spawn_command_line_sync('xprop -root _NET_CLIENT_LIST');
+ let result = GLib.spawn_command_line_sync('@xprop@ -root _NET_CLIENT_LIST');
if (result[0]) {
let str = result[1].toString();
@@ -218,7 +218,7 @@
// For each window ID, check if the title matches the desired title.
for (var i = 0; i < windowList.length; ++i) {
- let cmd = 'xprop -id "' + windowList[i] + '" _NET_WM_NAME _NO_TITLE_BAR_ORIGINAL_STATE';
+ let cmd = '@xprop@ -id "' + windowList[i] + '" _NET_WM_NAME _NO_TITLE_BAR_ORIGINAL_STATE';
let result = GLib.spawn_command_line_sync(cmd);
if (result[0]) {
@@ -258,7 +258,7 @@
}
let id = this._guessWindowXID(win);
- let cmd = 'xprop -id ' + id;
+ let cmd = '@xprop@ -id ' + id;
let xprops = GLib.spawn_command_line_sync(cmd);
if (!xprops[0]) {
@@ -277,7 +277,7 @@
m = str.match(/^_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED(\(CARDINAL\))? = ([0-9]+)$/m);
if (m) {
let state = !!parseInt(m[2]);
- cmd = ['xprop', '-id', id,
+ cmd = ['@xprop@', '-id', id,
'-f', '_NO_TITLE_BAR_ORIGINAL_STATE', '32c',
'-set', '_NO_TITLE_BAR_ORIGINAL_STATE',
(state ? '0x1' : '0x0')];
@@ -358,7 +358,7 @@
let winXID = this._guessWindowXID(win);
if (winXID == null)
return;
- let cmd = ['xprop', '-id', winXID,
+ let cmd = ['@xprop@', '-id', winXID,
'-f', '_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED', '32c',
'-set', '_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED',
(hide ? '0x1' : '0x0')];
patches = [
(substituteAll {
src = ./fix-paths.patch;
xprop = "${xorg.xprop}/bin/xprop";
xwininfo = "${xorg.xwininfo}/bin/xwininfo";
})
];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the buildInputs
then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
license = licenses.gpl2; | ||
maintainers = with maintainers; [ svsdep ]; | ||
platforms = platforms.linux; | ||
homepage = https://github.com/franglais125/no-title-bar/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trailing slash is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
c86ea92
to
0bb4b5c
Compare
Thanks for review! I applied all patched and adjusted the homepage url. |
]; | ||
|
||
patches = [ | ||
(substituteAll { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be indented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
3ed7d79
to
7cffe15
Compare
This does seem to be more actively maintained than |
@jonafato Do you want to be a maintainer of this? |
@jtojnar I'd be happy to maintain it. I'll submit a PR to remove |
Did you built this? There is missing |
7cffe15
to
5118a47
Compare
Thanks. |
This extension is being replaced by gnomeExtensions.no-title-bar in NixOS#35281.
Motivation for this change
I do need this extension for my Gnome Shell setup.
Tested locally.
The run-time dependencies are specified as it is required here.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)