पृष्ठभूमि: मैं ActivityWatch नामक सॉफ़्टवेयर के टुकड़े पर काम कर रहा हूं जो आपके कंप्यूटर पर जो करता है उसे लॉग करता है। असल में कुछ मुद्दों को हल करने का प्रयास: रेस्क्यूटाइम, स्वस्पी, आर्बेट, आदिमैं जीनोम वेलैंड पर सक्रिय विंडो कैसे प्राप्त करूं?
हमारे द्वारा की जाने वाली मूल चीजों में से एक सक्रिय विंडो (वर्ग और शीर्षक) के बारे में लॉग जानकारी है। अतीत में, यह xprop का उपयोग करके लिनक्स पर और अब बिना पायथन-xlib का उपयोग कर किया गया है।
लेकिन अब हमें एक समस्या है: वेइलैंड बढ़ रहा है, और जहां तक मैं देख सकता हूं कि वेलैंड में सक्रिय विंडो की कोई धारणा नहीं है। तो मेरा डर यह है कि हमें वेलैंड के लिए उपलब्ध प्रत्येक डेस्कटॉप वातावरण के लिए समर्थन लागू करना होगा (मान लीजिए कि वे सक्रिय विंडो के बारे में जानकारी प्राप्त करने की क्षमता प्रदान करेंगे)।
उम्मीद है कि वे अंत में अभिसरण जाएगा और इस करवाने के लिए कुछ सामान्य इंटरफेस है, लेकिन मैं अपनी सांस ...
मैं anticipating this issue किया गया है धारण नहीं कर रहा हूँ। लेकिन आज हमें एक वास्तविक Wayland उपयोगकर्ता द्वारा हमारे first user request for Wayland support मिल गया। चूंकि बड़े डिस्ट्रोज़ वीलैंड को डिफॉल्ट डिस्प्ले सर्वर प्रोटोकॉल के रूप में अपनाते हैं (फेडोरा 25 पहले से ही इसका उपयोग कर रहा है, उबंटू 17.10 में स्विच करेगा जो जल्द ही आ रहा है) स्थिति समय के साथ और अधिक महत्वपूर्ण हो जाएगी। ActivityWatch के लिए
प्रासंगिक मुद्दों:
- https://github.com/ActivityWatch/aw-watcher-window/issues/18
- https://github.com/ActivityWatch/activitywatch/issues/92
ActivityWatch की तरह अन्य अनुप्रयोगों है कि एक ही कार्यक्षमता की आवश्यकता होगी (RescueTime, arbtt, selfspy, आदि) के होते हैं, वे वे अभीलैंड का समर्थन नहीं करते हैं और मुझे ऐसा करने की योजना बनाने के बारे में कोई जानकारी नहीं मिल रही है।
अब मैं से शुरू करने के लिए जीनोम के समर्थन को लागू करने में रुचि रखता हूं और पथ के साथ अधिक स्पष्ट हो जाता है क्योंकि दूसरों के साथ अनुवर्ती होता है।
ऐसा ही एक सवाल वेस्टन के विषय में यहां कहा गया है: get the list of active windows in wayland weston
संपादित करें:
15:20:44 ErikBjare Hello everybody. I'm working on a piece of self-tracking software called ActivityWatch (https://github.com/ActivityWatch/activitywatch). I know this isn't exactly the right place to ask, but I was wondering if anyone knew anything about getting the active window in any Wayland-using DE.
15:20:57 ErikBjare Created a question on SO: https://stackoverflow.com/questions/45465016/how-do-i-get-the-active-window-on-gnome-wayland
15:21:25 ErikBjare Here's the issue in my repo for it: https://github.com/ActivityWatch/activitywatch/issues/92
15:22:54 ErikBjare There are a bunch of other applications that depend on it (RescueTime, selfspy, arbtt, ulogme, etc.) so they'd need it as well
15:24:23 blocage ErikBjare, in the core protocol you cannot know which windnow has the keyboard or cursor focus
15:24:39 blocage ErikBjare, in the wayland core protocol *
15:25:10 blocage ErikBjare, you can just know if your window has the focus or not, it a design choise
15:25:23 blocage avoid client spying each other
15:25:25 ErikBjare blocage: I'm aware, that's my reason for concern. I'm not saying it should be included or anything, but as it looks now every DE would need to implement it themselves if these kind of applications are to be supported
15:25:46 ErikBjare So wondering if anyone knew the teams working with Wayland on Gnome for example
15:26:11 ErikBjare But thanks for confirming
15:26:29 blocage ErikBjare, DE should create a custom extension, or use D-bus or other IPC
15:27:31 blocage ErikBjare, I guess some compositor are around here, but I do not know myself if there is such extension already
15:27:44 blocage compositor developers *
15:28:36 ErikBjare I don't think there is (I've done quite a bit of searching), so I guess I need to catch the attention of some DE developers
15:29:16 ErikBjare Thanks a lot though
15:29:42 ErikBjare blocage: Would you mind if I shared logs of our conversation in the issue?
15:30:05 blocage just use it :) it's public
15:30:19 ErikBjare ty :)
संपादित करें 2: मैं Freenode पर #wayland में पूछा, निम्नलिखित जबाब मिला दायर enhancement issue in the Gnome bugtracker।
tl; dr: वेनल का उपयोग करते समय मुझे जीनोम पर सक्रिय विंडो कैसे प्राप्त हो सकती है?
पहली नज़र में यह अच्छा लग रहा है। मैं अभी इस परीक्षण का परीक्षण करने में असमर्थ हूं लेकिन [screen_get_default' पर प्रलेखन] के अनुसार (https://developer.gnome.org/libwnck/stable/WnckScreen.html#wnck-screen-get-default): "यह X11 पर नहीं तो शून्य वापस कर सकते हैं। " मैं अब के लिए अपने आशावाद को रोक रहा हूं ... – erb
यह चेतावनी है कि 'Wnck.Screen.get_default() 'देता है:' (।: 9342): Wnck-चेतावनी **: libwnck केवल X11 में काम करने के लिए डिज़ाइन किया गया है , कोई वैध प्रदर्शन नहीं मिला ' – sebix