Line視窗邊框置頂的解决方法 - Linux
By Elizabeth
at 2022-01-29T12:19
at 2022-01-29T12:19
Table of Contents
* 問題
https://zhuanlan.zhihu.com/p/106926984
* 解決方法
我發現 line四個邊框分別屬於四個不同的視窗,
這四個邊框的 window ID分別是主視窗 ID + 10, ID + 14, ID + 18, ID + 22.
登入桌面環境後, 執行下列 script就可以解決這個問題
#!/usr/bin/python3
import time
import os
while True:
time.sleep(5)
exist = os.popen("ps -ef | grep LINE.exe")
e = exist.readlines()
if len(e) < 3:
print(e)
print("Line not started.")
exist.close()
continue
exist.close()
output = os.popen("wmctrl -l -G -p -x")
s = output.readlines()
id = ''
for item in s:
print(item)
if item.find("line.exe.line.exe") != -1:
id = item.split()[0]
break
output.close()
print(id)
if id != '':
sequences = [10, 14, 18, 22]
for i in sequences:
shadow = int(id, base=16)
shadow += i
shadow = "0x" + f"{shadow:x}"
print(shadow)
os.system("xdotool windowunmap " + shadow)
else:
print("Line not display yet.")
--
https://zhuanlan.zhihu.com/p/106926984
* 解決方法
我發現 line四個邊框分別屬於四個不同的視窗,
這四個邊框的 window ID分別是主視窗 ID + 10, ID + 14, ID + 18, ID + 22.
登入桌面環境後, 執行下列 script就可以解決這個問題
#!/usr/bin/python3
import time
import os
while True:
time.sleep(5)
exist = os.popen("ps -ef | grep LINE.exe")
e = exist.readlines()
if len(e) < 3:
print(e)
print("Line not started.")
exist.close()
continue
exist.close()
output = os.popen("wmctrl -l -G -p -x")
s = output.readlines()
id = ''
for item in s:
print(item)
if item.find("line.exe.line.exe") != -1:
id = item.split()[0]
break
output.close()
print(id)
if id != '':
sequences = [10, 14, 18, 22]
for i in sequences:
shadow = int(id, base=16)
shadow += i
shadow = "0x" + f"{shadow:x}"
print(shadow)
os.system("xdotool windowunmap " + shadow)
else:
print("Line not display yet.")
--
Tags:
Linux
All Comments
By Kelly
at 2022-02-03T08:51
at 2022-02-03T08:51
By Aaliyah
at 2022-02-08T05:23
at 2022-02-08T05:23
By Iris
at 2022-02-07T10:46
at 2022-02-07T10:46
By Selena
at 2022-02-12T07:18
at 2022-02-12T07:18
By Jack
at 2022-02-07T10:46
at 2022-02-07T10:46
Related Posts
用 fsarchiver 備份硬碟分割
By Lauren
at 2022-01-24T04:25
at 2022-01-24T04:25
請問TC Taiwan有什麼中性的名稱?
By Sarah
at 2022-01-23T14:06
at 2022-01-23T14:06
Linux bridge的問題
By Bennie
at 2022-01-22T13:29
at 2022-01-22T13:29
apache與nigix
By Kama
at 2022-01-15T21:47
at 2022-01-15T21:47
ubuntu server 使用內建軟raid1 問題
By Delia
at 2022-01-10T20:45
at 2022-01-10T20:45