Skip to content

Instantly share code, notes, and snippets.

@smmr0
Last active November 12, 2024 23:39
Show Gist options
  • Save smmr0/2463f83c858f7af7ba018a19e8fa07df to your computer and use it in GitHub Desktop.
Save smmr0/2463f83c858f7af7ba018a19e8fa07df to your computer and use it in GitHub Desktop.
Firefox Developer Edition/Betterbird: Desktop friendlier
#!/usr/bin/env sh
# Prerequisites:
# - flatpak override --filesystem=~/.thunderbird eu.betterbird.Betterbird
# - flatpak override --filesystem=~/.local/bin/betterbird:ro --share=network com.ulduzsoft.Birdtray
unset $(env | cut -d '=' -f 1 | grep -E '^SNAP(_|$)')
if command -v flatpak-spawn > /dev/null 2>&1; then
exec /usr/bin/flatpak-spawn --host "$0" "$@"
else
# en_CA somewhat closely resembles ISO 8601 in Firefox:
# https://hg.mozilla.org/mozilla-central/file/e4780e5614f3e3dd1b0961f31ab59c1dac92a372/intl/icu/source/data/locales/en_CA.txt
export LC_TIME='en_CA.UTF-8'
exec /usr/bin/flatpak run --command=betterbird eu.betterbird.Betterbird "$@"
fi
Display the source blob
Display the rendered blob
Raw
<!-- Orginal source: https://github.com/Betterbird/thunderbird-patches/blob/102.13.0-bb38/metadata/icons/betterbird.svg -->
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" fill-rule="evenodd" clip-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" version="1.0">
<path fill="#ffffff" d="m 500,39.102 c 39.445,0 78.848,5.022 117.006,14.98 v 0.043 c 96.79,25.367 181.217,81.423 242.166,157.095 0.687,60.95 -7.21,126.19 -23.65,195.725 25.41,-54.64 43.867,-109.28 47.086,-163.92 30.045,44.596 52.45,94.686 65.413,148.51 -17.64,48.589 -42.793,89.665 -73.182,125.505 27.127,-16.997 54.21,-44.639 81.337,-82.926 6.78543,47.36087 6.22112,95.48526 -1.673,142.674 -33.136,33.35 -66.23,54.725 -99.322,72.624 26.912,1.974 55.841,-4.25 86.874,-18.628 -47.3,160.056 -181.045,283.758 -342.905,319.383 -27.17,-28.586 -38.544,-61.335 -62.58,-103.056 -1.33,25.797 12.232,65.972 31.075,108.85 -44.768,6.568 -90.48,6.568 -135.247,-0.042 18.842,-42.88 32.363,-83.011 31.032,-108.808 -24.036,41.72 -35.368,74.47 -62.537,103.013 -161.774,-35.496 -295.648,-159.37 -342.948,-319.34 31.033,14.379 59.962,20.602 86.874,18.628 C 111.726,631.513 78.633,610.138 45.497,576.788 37.602654,529.59964 37.038009,481.4756 43.823,434.115 70.95,472.401 98.077,500.043 125.161,517.04 94.815,481.2 69.62,440.124 51.979,391.536 c 13.005,-53.825 35.41,-103.915 65.413,-148.51 3.22,54.639 21.676,109.279 47.086,163.919 -16.44,-69.534 -24.337,-134.776 -23.65,-195.725 49.79,-61.851 115.288,-110.568 190.36,-140.141 V 71.036 C 384.796,49.876 442.397,39.102 500,39.102 c -167.869,0 -303.975,136.106 -303.975,303.975 0,85.758 35.54,163.233 92.712,218.473 -9.4,-143.274 62.495,-259.335 164.821,-281.01 -35.54,-3.563 -64.898,3.175 -91.381,19.615 14.508,-21.762 38.072,-31.849 54.812,-39.79 -32.75,0.988 -58.975,9.1 -91.725,31.978 141.085,-173.663 460.297,21.675 344.45,138.853 13.392,-47.815 -41.162,-77.045 -99.279,-76.96 -182.676,0.172 -139.84,227.617 20.689,240.665 138.638,11.245 212.85,-130.14 212.85,-251.824 C 803.974,175.208 667.868,39.102 500,39.102 Z M 533.308,273.5 c 35.84,13.477 68.46,3.734 53.094,24.766 -19.315,-5.795 -36.655,-14.594 -53.094,-24.766 z" />
</svg>
#!/usr/bin/env sh
unset $(env | cut -d '=' -f 1 | grep -E '^SNAP(_|$)')
export TMPDIR="$HOME/tmp/firefox-dev"
mkdir -p "$TMPDIR"
# en_CA somewhat closely resembles ISO 8601 in Firefox:
# https://hg.mozilla.org/mozilla-central/file/e4780e5614f3e3dd1b0961f31ab59c1dac92a372/intl/icu/source/data/locales/en_CA.txt
export LC_TIME='en_CA.UTF-8'
for final_arg; do :; done
if case "$final_arg" in -*) false; esac; then
# Final arg does not start with `-`, meaning it's likely a URL
if command -v xdotool > /dev/null 2>&1; then
desktop="$(xdotool get_desktop)"
window="$(xdotool search --desktop "$desktop" --class '^firefox-aurora$' | tail -1)"
if [ -n "$window" ]; then
xdotool windowactivate "$window"
else
set -- --new-window "$@"
fi
fi
fi
exec "$(dirname "$0")/../opt/firefox-dev/firefox" "$@"
# https://hg.mozilla.org/mozilla-central/file/e9a891b833ca8747ffb9fcc7791d00eab87db7d2/browser/components/shell/search-provider-files/firefox.desktop
[Desktop Entry]
Version=1.0
Name=Firefox Developer Edition
GenericName=Web Browser
GenericName[ca]=Navegador web
GenericName[cs]=Webový prohlížeč
GenericName[es]=Navegador web
GenericName[fa]=مرورگر اینترنتی
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web
GenericName[hu]=Webböngésző
GenericName[it]=Browser Web
GenericName[ja]=ウェブ・ブラウザ
GenericName[ko]=웹 브라우저
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[sk]=Internetový prehliadač
GenericName[sv]=Webbläsare
Comment=Browse the Web
Comment[ca]=Navegueu per el web
Comment[cs]=Prohlížení stránek World Wide Webu
Comment[de]=Im Internet surfen
Comment[es]=Navegue por la web
Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید
Comment[fi]=Selaa Internetin WWW-sivuja
Comment[fr]=Navigue sur Internet
Comment[hu]=A világháló böngészése
Comment[it]=Esplora il web
Comment[ja]=ウェブを閲覧します
Comment[ko]=웹을 돌아 다닙니다
Comment[nb]=Surf på nettet
Comment[nl]=Verken het internet
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegue na Internet
Comment[pt_BR]=Navegue na Internet
Comment[sk]=Prehliadanie internetu
Comment[sv]=Surfa på webben
Exec=sh -e -c "exec \\"\\$(dirname \\"\\$0\\")/../../bin/firefox-dev\\" \\"$@\\"" %k %u
# for f in /path/to/firefox-dev/browser/chrome/icons/default/default*.png; do dir="/path/to/icons/hicolor/$(basename "$f" | sed -E 's/^default([[:digit:]]+)\.png/\1x\1/')/apps"; mkdir -p "$dir"; ln -s "$f" "$dir/firefox-dev.png"; done
# (see $XDG_DATA_DIRS)
Icon=firefox-dev
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;new-private-window;
StartupWMClass=firefox-aurora
X-Desktop-File-Install-Version=0.24
[Desktop Action new-window]
Name=Open a New Window
Name[ach]=Dirica manyen
Name[af]=Nuwe venster
Name[an]=Nueva finestra
Name[ar]=نافذة جديدة
Name[as]=নতুন উইন্ডো
Name[ast]=Ventana nueva
Name[az]=Yeni Pəncərə
Name[be]=Новае акно
Name[bg]=Нов прозорец
Name[bn_BD]=নতুন উইন্ডো (N)
Name[bn_IN]=নতুন উইন্ডো
Name[br]=Prenestr nevez
Name[brx]=गोदान उइन्ड'(N)
Name[bs]=Novi prozor
Name[ca]=Finestra nova
Name[cak]=K'ak'a' tzuwäch
Name[cs]=Nové okno
Name[cy]=Ffenestr Newydd
Name[da]=Nyt vindue
Name[de]=Neues Fenster
Name[dsb]=Nowe wokno
Name[el]=Νέο παράθυρο
Name[en_GB]=New Window
Name[en_US]=New Window
Name[en_ZA]=New Window
Name[eo]=Nova fenestro
Name[es_AR]=Nueva ventana
Name[es_CL]=Nueva ventana
Name[es_ES]=Nueva ventana
Name[es_MX]=Nueva ventana
Name[et]=Uus aken
Name[eu]=Leiho berria
Name[fa]=پنجره جدید‌
Name[ff]=Henorde Hesere
Name[fi]=Uusi ikkuna
Name[fr]=Nouvelle fenêtre
Name[fy_NL]=Nij finster
Name[ga_IE]=Fuinneog Nua
Name[gd]=Uinneag ùr
Name[gl]=Nova xanela
Name[gn]=Ovetã pyahu
Name[gu_IN]=નવી વિન્ડો
Name[he]=חלון חדש
Name[hi_IN]=नया विंडो
Name[hr]=Novi prozor
Name[hsb]=Nowe wokno
Name[hu]=Új ablak
Name[hy_AM]=Նոր Պատուհան
Name[id]=Jendela Baru
Name[is]=Nýr gluggi
Name[it]=Nuova finestra
Name[ja]=新しいウィンドウ
Name[ja_JP-mac]=新規ウインドウ
Name[ka]=ახალი ფანჯარა
Name[kk]=Жаңа терезе
Name[km]=បង្អួច​​​ថ្មី
Name[kn]=ಹೊಸ ಕಿಟಕಿ
Name[ko]=새 창
Name[kok]=नवें जनेल
Name[ks]=نئئ وِنڈو
Name[lij]=Neuvo barcon
Name[lo]=ຫນ້າຕ່າງໃຫມ່
Name[lt]=Naujas langas
Name[ltg]=Jauns lūgs
Name[lv]=Jauns logs
Name[mai]=नव विंडो
Name[mk]=Нов прозорец
Name[ml]=പുതിയ ജാലകം
Name[mr]=नवीन पटल
Name[ms]=Tetingkap Baru
Name[my]=ဝင်းဒိုးအသစ်
Name[nb_NO]=Nytt vindu
Name[ne_NP]=नयाँ सञ्झ्याल
Name[nl]=Nieuw venster
Name[nn_NO]=Nytt vindauge
Name[or]=ନୂତନ ୱିଣ୍ଡୋ
Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ
Name[pl]=Nowe okno
Name[pt_BR]=Nova janela
Name[pt_PT]=Nova janela
Name[rm]=Nova fanestra
Name[ro]=Fereastră nouă
Name[ru]=Новое окно
Name[sat]=नावा विंडो (N)
Name[si]=නව කවුළුවක්
Name[sk]=Nové okno
Name[sl]=Novo okno
Name[son]=Zanfun taaga
Name[sq]=Dritare e Re
Name[sr]=Нови прозор
Name[sv_SE]=Nytt fönster
Name[ta]=புதிய சாளரம்
Name[te]=కొత్త విండో
Name[th]=หน้าต่างใหม่
Name[tr]=Yeni pencere
Name[tsz]=Eraatarakua jimpani
Name[uk]=Нове вікно
Name[ur]=نیا دریچہ
Name[uz]=Yangi oyna
Name[vi]=Cửa sổ mới
Name[wo]=Palanteer bu bees
Name[xh]=Ifestile entsha
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=sh -e -c "exec \\"\\$(dirname \\"\\$0\\")/../../bin/firefox-dev\\" --new-window \\"$@\\"" %k %u
[Desktop Action new-private-window]
Name=Open a New Private Window
Name[ach]=Dirica manyen me mung
Name[af]=Nuwe privaatvenster
Name[an]=Nueva finestra privada
Name[ar]=نافذة خاصة جديدة
Name[as]=নতুন ব্যক্তিগত উইন্ডো
Name[ast]=Ventana privada nueva
Name[az]=Yeni Məxfi Pəncərə
Name[be]=Новае акно адасаблення
Name[bg]=Нов прозорец за поверително сърфиране
Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো
Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো
Name[br]=Prenestr merdeiñ prevez nevez
Name[brx]=गोदान प्राइभेट उइन्ड'
Name[bs]=Novi privatni prozor
Name[ca]=Finestra privada nova
Name[cak]=K'ak'a' ichinan tzuwäch
Name[cs]=Nové anonymní okno
Name[cy]=Ffenestr Breifat Newydd
Name[da]=Nyt privat vindue
Name[de]=Neues privates Fenster
Name[dsb]=Nowe priwatne wokno
Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης
Name[en_GB]=New Private Window
Name[en_US]=New Private Window
Name[en_ZA]=New Private Window
Name[eo]=Nova privata fenestro
Name[es_AR]=Nueva ventana privada
Name[es_CL]=Nueva ventana privada
Name[es_ES]=Nueva ventana privada
Name[es_MX]=Nueva ventana privada
Name[et]=Uus privaatne aken
Name[eu]=Leiho pribatu berria
Name[fa]=پنجره ناشناس جدید
Name[ff]=Henorde Suturo Hesere
Name[fi]=Uusi yksityinen ikkuna
Name[fr]=Nouvelle fenêtre de navigation privée
Name[fy_NL]=Nij priveefinster
Name[ga_IE]=Fuinneog Nua Phríobháideach
Name[gd]=Uinneag phrìobhaideach ùr
Name[gl]=Nova xanela privada
Name[gn]=Ovetã ñemi pyahu
Name[gu_IN]=નવી ખાનગી વિન્ડો
Name[he]=חלון פרטי חדש
Name[hi_IN]=नयी निजी विंडो
Name[hr]=Novi privatni prozor
Name[hsb]=Nowe priwatne wokno
Name[hu]=Új privát ablak
Name[hy_AM]=Սկսել Գաղտնի դիտարկում
Name[id]=Jendela Mode Pribadi Baru
Name[is]=Nýr huliðsgluggi
Name[it]=Nuova finestra anonima
Name[ja]=新しいプライベートウィンドウ
Name[ja_JP-mac]=新規プライベートウインドウ
Name[ka]=ახალი პირადი ფანჯარა
Name[kk]=Жаңа жекелік терезе
Name[km]=បង្អួច​ឯកជន​ថ្មី
Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ
Name[ko]=새 사생활 보호 모드
Name[kok]=नवो खाजगी विंडो
Name[ks]=نْو پرایوٹ وینڈو&amp;
Name[lij]=Neuvo barcon privou
Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່
Name[lt]=Naujas privataus naršymo langas
Name[ltg]=Jauns privatais lūgs
Name[lv]=Jauns privātais logs
Name[mai]=नया निज विंडो (W)
Name[mk]=Нов приватен прозорец
Name[ml]=പുതിയ സ്വകാര്യ ജാലകം
Name[mr]=नवीन वैयक्तिक पटल
Name[ms]=Tetingkap Persendirian Baharu
Name[my]=New Private Window
Name[nb_NO]=Nytt privat vindu
Name[ne_NP]=नयाँ निजी सञ्झ्याल
Name[nl]=Nieuw privévenster
Name[nn_NO]=Nytt privat vindauge
Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ
Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ
Name[pl]=Nowe okno prywatne
Name[pt_BR]=Nova janela privativa
Name[pt_PT]=Nova janela privada
Name[rm]=Nova fanestra privata
Name[ro]=Fereastră privată nouă
Name[ru]=Новое приватное окно
Name[sat]=नावा निजेराक् विंडो (W )
Name[si]=නව පුද්ගලික කවුළුව (W)
Name[sk]=Nové okno v režime Súkromné prehliadanie
Name[sl]=Novo zasebno okno
Name[son]=Sutura zanfun taaga
Name[sq]=Dritare e Re Private
Name[sr]=Нови приватан прозор
Name[sv_SE]=Nytt privat fönster
Name[ta]=புதிய தனிப்பட்ட சாளரம்
Name[te]=కొత్త ఆంతరంగిక విండో
Name[th]=หน้าต่างส่วนตัวใหม่
Name[tr]=Yeni gizli pencere
Name[tsz]=Juchiiti eraatarakua jimpani
Name[uk]=Приватне вікно
Name[ur]=نیا نجی دریچہ
Name[uz]=Yangi maxfiy oyna
Name[vi]=Cửa sổ riêng tư mới
Name[wo]=Panlanteeru biir bu bees
Name[xh]=Ifestile yangasese entsha
Name[zh_CN]=新建隐私浏览窗口
Name[zh_TW]=新增隱私視窗
Exec=sh -e -c "exec \\"\\$(dirname \\"\\$0\\")/../../bin/firefox-dev\\" --private-window \\"$@\\"" %k %u
[Default Applications]
x-scheme-handler/http=firefox-dev.desktop
x-scheme-handler/https=firefox-dev.desktop
x-scheme-handler/about=firefox-dev.desktop
x-scheme-handler/unknown=firefox-dev.desktop
x-scheme-handler/chrome=firefox-dev.desktop
text/html=firefox-dev.desktop
application/x-extension-htm=firefox-dev.desktop
application/x-extension-html=firefox-dev.desktop
application/x-extension-shtml=firefox-dev.desktop
application/xhtml+xml=firefox-dev.desktop
application/x-extension-xhtml=firefox-dev.desktop
application/x-extension-xht=firefox-dev.desktop
x-scheme-handler/mailto=eu.betterbird.Betterbird.desktop
x-scheme-handler/webcal=eu.betterbird.Betterbird.desktop
x-scheme-handler/webcals=eu.betterbird.Betterbird.desktop
text/calendar=eu.betterbird.Betterbird.desktop
text/x-vcalendar=eu.betterbird.Betterbird.desktop
text/x-vcard=eu.betterbird.Betterbird.desktop
application/ics=eu.betterbird.Betterbird.desktop
application/x-extension-ics=eu.betterbird.Betterbird.desktop
[Added Associations]
x-scheme-handler/http=firefox-dev.desktop
x-scheme-handler/https=firefox-dev.desktop
x-scheme-handler/about=firefox-dev.desktop
x-scheme-handler/unknown=firefox-dev.desktop
x-scheme-handler/chrome=firefox-dev.desktop
text/html=firefox-dev.desktop;
application/x-extension-htm=firefox-dev.desktop;
application/x-extension-html=firefox-dev.desktop;
application/x-extension-shtml=firefox-dev.desktop;
application/xhtml+xml=firefox-dev.desktop;
application/x-extension-xhtml=firefox-dev.desktop;
application/x-extension-xht=firefox-dev.desktop;
x-scheme-handler/mailto=eu.betterbird.Betterbird.desktop
x-scheme-handler/webcal=eu.betterbird.Betterbird.desktop
x-scheme-handler/webcals=eu.betterbird.Betterbird.desktop
text/calendar=eu.betterbird.Betterbird.desktop
text/x-vcalendar=eu.betterbird.Betterbird.desktop
text/x-vcard=eu.betterbird.Betterbird.desktop
application/ics=eu.betterbird.Betterbird.desktop
application/x-extension-ics=eu.betterbird.Betterbird.desktop
/* Hide min/max/close titlebar buttons */
.titlebar-buttonbox-container {
display: none !important;
}
/* Hide tab list dropdown */
.tabs-alltabs-button {
display: none !important;
}
/* Float new-tab button to the right */
#tabbrowser-arrowscrollbox-periphery {
margin-left: auto;
}
.titlebar-spacer[type="pre-tabs"],
.titlebar-spacer[type="post-tabs"] {
display: none !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment