? Editing: Post:21.body Save Delete Cancel
Content changed Sign & Publish new content

The Blinking Prompt Times █

Zite Index/Best Of
Latest znqa release : 0.2.0
I'm on ZeroMe
Feel free to propose a Chinese translation !
寻找这篇文章的翻译!
谢谢!
Best viewed in Dark Mode™, like anything else really :)

Follow in NewsfeedFollowing

Latest comments:

Add new post

Title

21 hours ago · 2 min read ·
3 comments
Body
Read more

Not found

Script : Twitter in an isolated Firefox window

on Dec 21, 2018

Now that Corebird isn't fully functional anymore thanks to yet another Twitter API change, I wanted a way to have my twitter feed on its own window, just like an app.

I came up with the idea of using a dedicated Firefox profile named "twitter" using firefox -p, some Firefox UI customization and some shell magic to make it look like the part, it should work on any recent Linux/BSD/exotic Unix-like with minimal adjustments.

Sorry for the (very) odd formatting but the code block on ZeroBlog is broken it seems so I am pasting it within a quote block, if anyone has a better way... :p

sleep 5
firefox -P "twitter" -no-remote https://mobile.twitter.com &
while [ 1 ]
do
IS_READY=$(wmctrl -l | grep "Twitter - Mozilla Firefox")
if [ $? -eq 0 ]
then
wmctrl -r "Twitter - Mozilla Firefox" -e 0,1620,0,0,1080
sleep 1
wmctrl -r "Twitter - Mozilla Firefox" -b add,skip_taskbar
break
else
sleep .5
fi

done

wmctrl(1) is used to put the window on the right part of my screen at boot time and to hide it from my taskbar, I think it looks pretty good on my desktop :

firefox_twitter.jpg (1200x675)

Happy scripting !

0 Comment:

user_name1 day ago
Reply
Body
This page is a snapshot of ZeroNet. Start your own ZeroNet for complete experience. Learn More