Frewacom / pywalfox

Dynamic theming of Firefox (and Thunderbird) using your Pywal colors
https://addons.mozilla.org/en-US/firefox/addon/pywalfox/
Mozilla Public License 2.0
583 stars 12 forks source link

Librewolf support? #68

Open ayham-1 opened 3 years ago

ayham-1 commented 3 years ago

It would be great to have Librewolf support.

pywallfox install installs the manifest into .mozilla, I tried copying it into .librewolf, doesn't work, with error: No such native application pywalfox

Frewacom commented 3 years ago

I am not familiar with Librewolf, but I'll see what I can do. Do you know for a fact that it does support native messaging hosts? I did a quick search but could not really find any information on the topic.

npc-glitch commented 3 years ago

There is a quick dirty fix to this that I use, just symlink your .librewolf directory to the .mozilla/firefox one.

ln -s ~/.librewolf -t ~/.mozilla mv ~/.mozilla/.librewolf ~/.mozilla/firefox

Doesn't work if you have firefox installed afaik

Frewacom commented 3 years ago

I have added a new flag that allows you to specify the browser that you want to install to (currently only Firefox and Librewolf). The startup script (main.sh) has also been removed to hopefully fix some of the common setup issues. Because of this, I need to do some more testing on other platforms before I can release it.

You can still use the new version by installing it from the test.pypi.org index, i.e:

pip uninstall pywalfox
pip install --index-url https://test.pypi.org/simple/ pywalfox==2.8.0rc1

and then install the native messaging manifest:

pywalfox install --browser librewolf

I have tried it in a VM running Ubuntu and it seems to work just fine. The only missing feature is enabling or disabling the custom CSS files via the extension UI. This is because it still uses the default ~/.mozilla paths.

Ranguna commented 1 year ago

Hello @Frewacom, had to manually apply that path to the aur package on my local machine and it worked great! Is there any change to get this into the mainline code ?

Happy to PR if needed :+1:

Frewacom commented 1 year ago

Hello @Frewacom, had to manually apply that path to the aur package on my local machine and it worked great! Is there any change to get this into the mainline code ?

Happy to PR if needed 👍

Hi!

I believe the installation process in version 2.8.0 is not quite compatible with Windows. If you could test it on Windows and/or MacOS that would be great! If not, I will try to have a look at it in a few weeks.

Ranguna commented 1 year ago

Unfortunately I have neither of those systems on any machine I own, but will try to get a hold of one if I can :+1:

XxRiKxX commented 1 year ago

pywalfox not found after following the steps

Roverp1 commented 5 months ago

Can you please provide any suggestions for arch? I tried to adapt solution my self, but failed. Any help would be much appreciated

Edit: fixed by running pywalfox install --browser librewolf from ~/.local/bin

hfytr commented 4 months ago

Hello, I encountered an issue on Arch where pywalfox install does not have an option for the browser. running pywalfox install --browser librewolf tells me that the browser part is unrecognised arguments. I'm on v2.7.4

Anstrofon commented 4 months ago

Hello, I encountered an issue on Arch where pywalfox install does not have an option for the browser. running pywalfox install --browser librewolf tells me that the browser part is unrecognised arguments. I'm on v2.7.4

You need create a python environment for install 2.8.0rc1 version in arch.

1, python -m venv myenv

  1. source myenv/bin/activate
  2. pip install --index-url https://test.pypi.org/simple/ pywalfox==2.8.0rc1
Amir1453 commented 3 months ago

If you want to install the development version via AUR, you can change the PKGFILE as such:

# Maintainer: Fredrik Engstrand <fredrik@engstrand.nu>
# Contributor: Spencer Muise <smuise@spencermuise.ca>

pkgname=python-pywalfox
_name=pywalfox
pkgver=2.8.0rc1
pkgrel=1
pkgdesc="Native app used alongside the Pywalfox browser extension"
arch=('any')
url='https://github.com/frewacom/pywalfox'
license=('MPL2')
depends=(
  'python'
)
makedepends=(
  'python-setuptools'
)
source=("$pkgname-$pkgver.tar.gz::https://test.pypi.org/packages/source/p/$_name/$_name-$pkgver.tar.gz")
sha256sums=('89e0d7a441eb600933440c713cddbfaecda236bde7f3f655db0ec20b0ae12845')

prepare() {
    cd $_name-$pkgver
    local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
    sed -i "s:<path>:$site_packages/pywalfox/bin/main.sh:" pywalfox/assets/manifest.json
}

build() {
    cd $_name-$pkgver
    python setup.py build
}

package() {
    cd $_name-$pkgver
    python setup.py install --root="$pkgdir" --optimize=1 --skip-build
    install -Dm644 pywalfox/assets/manifest.json -T "$pkgdir/usr/lib/mozilla/native-messaging-hosts/pywalfox.json"
}

If you are using paru for example, you can edit the PKGFILE with paru --fm vim -S python-pywal.

hownioni commented 2 months ago

I made an AUR package for the version that provides librewolf support while we wait for it to be incorporated to the stable release