dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.42k stars 327 forks source link

Does not work on BSD #479

Open ghost opened 4 years ago

ghost commented 4 years ago

When I try to run python -m pywal -i gas.jpg on my FreeBSD install, it almost works, but it thinks I am on tty /dev/pts/2, yet I am on /dev/pts/4 (I think)

[me@computer][~/Downloads]% python -m pywal -i gas.jpg
[I] image: Using image gas.jpg.
[I] colors: Generating a colorscheme.
[I] colors: Using wal backend.
[I] colors: Generation complete.
[I] wallpaper: Set the new wallpaper.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/me/.local/lib/python3.7/site-packages/pywal/__main__.py", line 212, in <module>
    main()
  File "/home/me/.local/lib/python3.7/site-packages/pywal/__main__.py", line 208, in main
    parse_args(parser)
  File "/home/me/.local/lib/python3.7/site-packages/pywal/__main__.py", line 180, in parse_args
    sequences.send(colors_plain, to_send=not args.s, vte_fix=args.vte)
  File "/home/me/.local/lib/python3.7/site-packages/pywal/sequences.py", line 85, in send
    util.save_file(sequences, term)
  File "/home/me/.local/lib/python3.7/site-packages/pywal/util.py", line 83, in save_file
    with open(export_file, "w") as file:
OSError: [Errno 6] Device not configured: '/dev/pts/2'
[me@computer][~/Downloads]% tty
/dev/pts/4

I am running wal 3.3.0 on python 3.7.6

dylanaraps commented 4 years ago

Pywal will write to all /dev/pts/[0-9]* devices to change the theme in all open terminals.

ghost commented 4 years ago

I see. That makes sense. Just tried to guess what was happening ¯_(ツ)_/¯

LomigAndTux commented 2 years ago

I just migrate on FreeBSD and I had the same problem. I just add my user to the operator group and it works fine now