Set focus to a window using xprop

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I'm using the following to remove the windows border in my emacs when it starts up (--fullscreen is not an option as it also covers gnome shell's taskbar).



xprop -f -id xid _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS '0x2, 0x0, 0x0, 0x0, 0x0'" 
# xid is my emacs window


This works ok, however the window loses focus when I do so.



Considering I know the window id, is there a way to focus on it using xprop or any other builtin commands? (without installing anything, eg. xdotool or wmctrl)







share|improve this question






















  • The window manager (WM) handles the focus, so you either need some tool like xdotool or wmctrl that talks to the window manager, or you need to configure your WM directly to assume the correct configuration without using xprop (you didn't tell us what WM you are using), or you need some other way to work around what your WM does when you use xprop.
    – dirkt
    Mar 31 at 18:45










  • I'm using gnome shell. I'm going to focus my searches around it, thanks!
    – vise
    Mar 31 at 18:48










  • Please edit your question with additional information; the comments may go away at some time.
    – dirkt
    Mar 31 at 18:59














up vote
1
down vote

favorite












I'm using the following to remove the windows border in my emacs when it starts up (--fullscreen is not an option as it also covers gnome shell's taskbar).



xprop -f -id xid _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS '0x2, 0x0, 0x0, 0x0, 0x0'" 
# xid is my emacs window


This works ok, however the window loses focus when I do so.



Considering I know the window id, is there a way to focus on it using xprop or any other builtin commands? (without installing anything, eg. xdotool or wmctrl)







share|improve this question






















  • The window manager (WM) handles the focus, so you either need some tool like xdotool or wmctrl that talks to the window manager, or you need to configure your WM directly to assume the correct configuration without using xprop (you didn't tell us what WM you are using), or you need some other way to work around what your WM does when you use xprop.
    – dirkt
    Mar 31 at 18:45










  • I'm using gnome shell. I'm going to focus my searches around it, thanks!
    – vise
    Mar 31 at 18:48










  • Please edit your question with additional information; the comments may go away at some time.
    – dirkt
    Mar 31 at 18:59












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm using the following to remove the windows border in my emacs when it starts up (--fullscreen is not an option as it also covers gnome shell's taskbar).



xprop -f -id xid _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS '0x2, 0x0, 0x0, 0x0, 0x0'" 
# xid is my emacs window


This works ok, however the window loses focus when I do so.



Considering I know the window id, is there a way to focus on it using xprop or any other builtin commands? (without installing anything, eg. xdotool or wmctrl)







share|improve this question














I'm using the following to remove the windows border in my emacs when it starts up (--fullscreen is not an option as it also covers gnome shell's taskbar).



xprop -f -id xid _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS '0x2, 0x0, 0x0, 0x0, 0x0'" 
# xid is my emacs window


This works ok, however the window loses focus when I do so.



Considering I know the window id, is there a way to focus on it using xprop or any other builtin commands? (without installing anything, eg. xdotool or wmctrl)









share|improve this question













share|improve this question




share|improve this question








edited Mar 31 at 18:47

























asked Mar 31 at 16:47









vise

1212




1212











  • The window manager (WM) handles the focus, so you either need some tool like xdotool or wmctrl that talks to the window manager, or you need to configure your WM directly to assume the correct configuration without using xprop (you didn't tell us what WM you are using), or you need some other way to work around what your WM does when you use xprop.
    – dirkt
    Mar 31 at 18:45










  • I'm using gnome shell. I'm going to focus my searches around it, thanks!
    – vise
    Mar 31 at 18:48










  • Please edit your question with additional information; the comments may go away at some time.
    – dirkt
    Mar 31 at 18:59
















  • The window manager (WM) handles the focus, so you either need some tool like xdotool or wmctrl that talks to the window manager, or you need to configure your WM directly to assume the correct configuration without using xprop (you didn't tell us what WM you are using), or you need some other way to work around what your WM does when you use xprop.
    – dirkt
    Mar 31 at 18:45










  • I'm using gnome shell. I'm going to focus my searches around it, thanks!
    – vise
    Mar 31 at 18:48










  • Please edit your question with additional information; the comments may go away at some time.
    – dirkt
    Mar 31 at 18:59















The window manager (WM) handles the focus, so you either need some tool like xdotool or wmctrl that talks to the window manager, or you need to configure your WM directly to assume the correct configuration without using xprop (you didn't tell us what WM you are using), or you need some other way to work around what your WM does when you use xprop.
– dirkt
Mar 31 at 18:45




The window manager (WM) handles the focus, so you either need some tool like xdotool or wmctrl that talks to the window manager, or you need to configure your WM directly to assume the correct configuration without using xprop (you didn't tell us what WM you are using), or you need some other way to work around what your WM does when you use xprop.
– dirkt
Mar 31 at 18:45












I'm using gnome shell. I'm going to focus my searches around it, thanks!
– vise
Mar 31 at 18:48




I'm using gnome shell. I'm going to focus my searches around it, thanks!
– vise
Mar 31 at 18:48












Please edit your question with additional information; the comments may go away at some time.
– dirkt
Mar 31 at 18:59




Please edit your question with additional information; the comments may go away at some time.
– dirkt
Mar 31 at 18:59















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f434705%2fset-focus-to-a-window-using-xprop%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f434705%2fset-focus-to-a-window-using-xprop%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?