Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using this on a Mac #8

Open
yannmichaux opened this issue Aug 20, 2019 · 16 comments
Open

Using this on a Mac #8

yannmichaux opened this issue Aug 20, 2019 · 16 comments
Labels
bug Something isn't working compatibility Issue is related to compatibility.

Comments

@yannmichaux
Copy link

yannmichaux commented Aug 20, 2019

Hello,

I'm trying to make the script compatible with macOS, I've managed to update the code that sets the wallpaper, and I changed the command to generate the logs of the top command, I'm facing a problem that I can't solve, here's the result of my shell when I run the command ./updateWallpaper.sh :

[yann@macbook-pro] ~/Sites/process-wallpaper  master) ✗ 
$ ./updateWallpaper.sh 
Traceback (most recent call last):
  File "generateWallpaper.py", line 50, in <module>
    ).generate_from_frequencies(resourceDict)
  File "/Users/yann/Library/Python/3.7/lib/python/site-packages/wordcloud/wordcloud.py", line 383, in generate_from_frequencies
    "got %d." % len(frequencies))
ValueError: We need at least 1 word to plot a word cloud, got 0.

Here is a commit that shows my changes : https://github.com/YannMCX/process-wallpaper/commit/57bf10ee5d54fc775be8c21641f58fe1b2274e3b

@anirudhajith
Copy link
Owner

Did you run setup.sh first and then run updateWallpaper.sh?

@yannmichaux
Copy link
Author

Yeah, this is my shell output :

[yann@macbook-pro] ~/Sites/process-wallpaper  master) 
$ ./setup.sh          
Installing Python dependencies...
Requirement already satisfied: Pillow in /Users/yann/Library/Python/3.7/lib/python/site-packages (6.1.0)
Requirement already satisfied: wordcloud in /Users/yann/Library/Python/3.7/lib/python/site-packages (1.5.0)
Requirement already satisfied: pillow in /Users/yann/Library/Python/3.7/lib/python/site-packages (from wordcloud) (6.1.0)
Requirement already satisfied: numpy>=1.6.1 in /Users/yann/Library/Python/3.7/lib/python/site-packages (from wordcloud) (1.17.0)
Requirement already satisfied: matplotlib in /Users/yann/Library/Python/3.7/lib/python/site-packages (3.1.1)
Requirement already satisfied: numpy>=1.11 in /Users/yann/Library/Python/3.7/lib/python/site-packages (from matplotlib) (1.17.0)
Requirement already satisfied: python-dateutil>=2.1 in /Users/yann/Library/Python/3.7/lib/python/site-packages (from matplotlib) (2.8.0)
Requirement already satisfied: cycler>=0.10 in /Users/yann/Library/Python/3.7/lib/python/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/yann/Library/Python/3.7/lib/python/site-packages (from matplotlib) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/yann/Library/Python/3.7/lib/python/site-packages (from matplotlib) (2.4.2)
Requirement already satisfied: six>=1.5 in /Users/yann/Library/Python/3.7/lib/python/site-packages (from python-dateutil>=2.1->matplotlib) (1.12.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib) (40.8.0)
Creating wallpaper...
Traceback (most recent call last):
  File "generateWallpaper.py", line 50, in <module>
    ).generate_from_frequencies(resourceDict)
  File "/Users/yann/Library/Python/3.7/lib/python/site-packages/wordcloud/wordcloud.py", line 383, in generate_from_frequencies
    "got %d." % len(frequencies))
ValueError: We need at least 1 word to plot a word cloud, got 0.
Setting wallpaper...
0:1: syntax error: Un(e) jeton inconnu ne peut pas se trouver ici. (-2740)
Setup successfully completed
[yann@macbook-pro] ~/Sites/process-wallpaper  master) 
$ ./updateWallpaper.sh 
Traceback (most recent call last):
  File "generateWallpaper.py", line 50, in <module>
    ).generate_from_frequencies(resourceDict)
  File "/Users/yann/Library/Python/3.7/lib/python/site-packages/wordcloud/wordcloud.py", line 383, in generate_from_frequencies
    "got %d." % len(frequencies))
ValueError: We need at least 1 word to plot a word cloud, got 0.

@anirudhajith
Copy link
Owner

Can you show me what the contents of top.out are?

@MarcusMathiassen
Copy link

'top' on macOS does also not have the '-b' flag. Might be the cause.

@yannmichaux
Copy link
Author

Yup, here it is
top.txt

I've renamed it for github

@yannmichaux
Copy link
Author

'top' on macOS does also not have the '-b' flag. Might be the cause.

Yeah, but top -l 1 is a workaround (found on SO)

@anirudhajith
Copy link
Owner

anirudhajith commented Aug 20, 2019

Okay. I see the problem. The output of top on macOS is very different from the output of top on linux.

This is what the output of top looks like for me:

top - 19:11:02 up 11:20,  1 user,  load average: 0.47, 0.44, 0.54
Tasks: 357 total,   1 running, 290 sleeping,   0 stopped,   0 zombie
%Cpu(s): 19.7 us,  5.4 sy,  1.6 ni, 73.2 id,  0.0 wa,  0.0 hi,  0.1 si,  0.0 st
KiB Mem : 32818784 total, 25163636 free,  3504944 used,  4150204 buff/cache
KiB Swap:        0 total,        0 free,        0 used. 28746432 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 3710 anirudh   20   0 4396072 456376 104572 S  18.8  1.4  22:39.24 gnome-shell
 9030 anirudh   20   0   41908   3784   3156 R  18.8  0.0   0:00.03 top
 3493 root      20   0  797560 486420  47940 S   6.2  1.5  10:28.61 Xorg
    1 root      20   0  226132  10012   6736 S   0.0  0.0   0:04.40 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.02 kthreadd
    4 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/0:+
    6 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 mm_percpu_+
    7 root      20   0       0      0      0 S   0.0  0.0   0:00.14 ksoftirqd/0
    8 root      20   0       0      0      0 I   0.0  0.0   0:10.92 rcu_sched
    9 root      20   0       0      0      0 I   0.0  0.0   0:00.00 rcu_bh
   10 root      rt   0       0      0      0 S   0.0  0.0   0:00.07 migration/0
   11 root      rt   0       0      0      0 S   0.0  0.0   0:00.04 watchdog/0
   12 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/0
   13 root      20   0       0      0      0 S   0.0  0.0   0:00.01 cpuhp/1
   14 root      rt   0       0      0      0 S   0.0  0.0   0:00.04 watchdog/1
   15 root      rt   0       0      0      0 S   0.0  0.0   0:00.04 migration/1
   16 root      20   0       0      0      0 S   0.0  0.0   0:00.07 ksoftirqd/1
   18 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/1:+
   19 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/2
   20 root      rt   0       0      0      0 S   0.0  0.0   0:00.03 watchdog/2
   21 root      rt   0       0      0      0 S   0.0  0.0   0:00.05 migration/2
   22 root      20   0       0      0      0 S   0.0  0.0   0:00.06 ksoftirqd/2
   24 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/2:+
   25 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/3
   26 root      rt   0       0      0      0 S   0.0  0.0   0:00.03 watchdog/3
   27 root      rt   0       0      0      0 S   0.0  0.0   0:00.05 migration/3
   28 root      20   0       0      0      0 S   0.0  0.0   0:00.05 ksoftirqd/3
   30 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/3:+
   31 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/4
   32 root      rt   0       0      0      0 S   0.0  0.0   0:00.04 watchdog/4
   33 root      rt   0       0      0      0 S   0.0  0.0   0:00.06 migration/4
   34 root      20   0       0      0      0 S   0.0  0.0   0:00.05 ksoftirqd/4
   36 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/4:+
   37 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/5
   38 root      rt   0       0      0      0 S   0.0  0.0   0:00.03 watchdog/5
   39 root      rt   0       0      0      0 S   0.0  0.0   0:00.06 migration/5
   40 root      20   0       0      0      0 S   0.0  0.0   0:00.07 ksoftirqd/5
   42 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/5:+
   43 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/6
   44 root      rt   0       0      0      0 S   0.0  0.0   0:00.04 watchdog/6
   45 root      rt   0       0      0      0 S   0.0  0.0   0:00.07 migration/6
   46 root      20   0       0      0      0 S   0.0  0.0   0:00.04 ksoftirqd/6
   48 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/6:+
   49 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/7
   50 root      rt   0       0      0      0 S   0.0  0.0   0:00.04 watchdog/7
   51 root      rt   0       0      0      0 S   0.0  0.0   0:00.07 migration/7
   52 root      20   0       0      0      0 S   0.0  0.0   0:00.05 ksoftirqd/7
   54 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker/7:+
   55 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kdevtmpfs
   56 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 netns
   57 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_tasks_+
   58 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kauditd
   62 root      20   0       0      0      0 S   0.0  0.0   0:00.02 khungtaskd
   63 root      20   0       0      0      0 S   0.0  0.0   0:00.00 oom_reaper
   64 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 writeback
   65 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kcompactd0
   66 root      25   5       0      0      0 S   0.0  0.0   0:00.00 ksmd
   67 root      39  19       0      0      0 S   0.0  0.0   0:00.00 khugepaged
   68 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 crypto
   69 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kintegrityd
   70 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kblockd
   76 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 ata_sff
   77 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 md
   78 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 edac-poller
   80 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 devfreq_wq
   81 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 watchdogd
   85 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kswapd0
   87 root      20   0       0      0      0 S   0.0  0.0   0:00.00 ecryptfs-k+
  129 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kthrotld
  130 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 acpi_therm+
  135 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 ipv6_addrc+
  144 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kstrp
  161 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 charger_ma+
  211 root      20   0       0      0      0 S   0.0  0.0   0:00.00 scsi_eh_0
  212 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 nvme-wq
  213 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 scsi_tmf_0
  214 root      20   0       0      0      0 S   0.0  0.0   0:00.00 scsi_eh_1
  215 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 scsi_tmf_1
  216 root      20   0       0      0      0 S   0.0  0.0   0:00.00 scsi_eh_2
  217 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 scsi_tmf_2
  219 root      20   0       0      0      0 S   0.0  0.0   0:00.00 nvidia-mod+
  224 root      -2   0       0      0      0 S   0.0  0.0   0:00.00 i915/signa+
  225 root      -2   0       0      0      0 S   0.0  0.0   0:00.00 i915/signa+
  226 root      -2   0       0      0      0 S   0.0  0.0   0:00.00 i915/signa+
  227 root      -2   0       0      0      0 S   0.0  0.0   0:00.00 i915/signa+
  332 root       0 -20       0      0      0 I   0.0  0.0   0:00.03 kworker/1:+
  334 root      20   0       0      0      0 S   0.0  0.0   0:01.16 jbd2/nvme0+
  335 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 ext4-rsv-c+
  371 root       0 -20       0      0      0 I   0.0  0.0   0:00.03 kworker/5:+
  382 root      19  -1  143044  57136  54924 S   0.0  0.2   0:03.11 systemd-jo+
  389 root       0 -20       0      0      0 I   0.0  0.0   0:00.03 kworker/4:+
  403 root      20   0   46452   4736   3100 S   0.0  0.0   0:01.24 systemd-ud+
  405 root       0 -20       0      0      0 I   0.0  0.0   0:00.03 kworker/6:+
  408 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop0
  421 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop1
  422 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop2
  423 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop3
  450 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop4
  453 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop5
  455 root       0 -20       0      0      0 S   0.0  0.0   0:00.04 loop6
  456 root       0 -20       0      0      0 I   0.0  0.0   0:00.03 kworker/3:+
  460 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop7
  473 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop8
  474 root       0 -20       0      0      0 I   0.0  0.0   0:00.03 kworker/7:+
  475 root       0 -20       0      0      0 I   0.0  0.0   0:00.03 kworker/2:+
  476 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop9
  478 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop10
  479 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop11
  480 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop12
  481 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop13
  486 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop14
  487 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop15
  488 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop16
  489 root       0 -20       0      0      0 I   0.0  0.0   0:00.04 kworker/0:+
  492 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop17
  498 root       0 -20       0      0      0 S   0.0  0.0   0:00.09 loop18
  500 root     -51   0       0      0      0 S   0.0  0.0   0:00.00 irq/67-smo+
  503 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop19
  509 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop20
  513 root      20   0       0      0      0 S   0.0  0.0   0:00.00 UVM global+
  515 root      20   0       0      0      0 S   0.0  0.0   0:00.00 UVM Tools +
  541 root       0 -20       0      0      0 S   0.0  0.0   0:00.11 loop21
  545 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kmemstick
  551 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop22
  555 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop23
  564 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop24
  577 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 cfg80211
  590 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop25
  591 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop26
  603 root     -51   0       0      0      0 S   0.0  0.0   0:34.45 irq/141-iw+
  619 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop27
  621 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop28
  644 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop29
  646 root       0 -20       0      0      0 S   0.0  0.0   0:00.05 loop30
  649 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop31
  650 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 loop32
  883 root     -51   0       0      0      0 S   0.0  0.0   0:53.55 irq/51-DLL+
  962 systemd+  20   0  146108   3332   2772 S   0.0  0.0   0:00.10 systemd-ti+
  964 systemd+  20   0   71096   6684   5540 S   0.0  0.0   0:02.68 systemd-re+
 1173 root      20   0   70868   6356   5264 S   0.0  0.0   0:01.43 systemd-lo+
 1175 root      20   0  110516   3476   3148 S   0.0  0.0   0:02.23 irqbalance
 1176 avahi     20   0   47404   3832   3208 S   0.0  0.0   0:07.90 avahi-daem+
 1178 root      20   0  179864   9588   8768 S   0.0  0.0   0:01.82 thermald
 1191 syslog    20   0  263036   4988   3696 S   0.0  0.0   0:01.07 rsyslogd
 1192 root      20   0   31320   3200   2904 S   0.0  0.0   0:00.19 cron
 1198 root      20   0    4552    828    764 S   0.0  0.0   0:01.85 acpid
 1204 root      20   0  287664   7032   5984 S   0.0  0.0   0:00.81 accounts-d+
 1207 root      20   0  503984  11660   8676 S   0.0  0.0   0:00.16 udisksd
 1208 root      20   0  170580  17480   9508 S   0.0  0.1   0:00.07 networkd-d+
 1211 avahi     20   0   47076    340      0 S   0.0  0.0   0:00.00 avahi-daem+
 1214 daemon    20   0   28332   2380   2176 S   0.0  0.0   0:00.00 atd
 1220 root      20   0  434396   9884   8328 S   0.0  0.0   0:00.29 ModemManag+
 1222 message+  20   0   52616   6448   3900 S   0.0  0.0   0:07.01 dbus-daemon
 1290 root      20   0  559732  18220  13864 S   0.0  0.1   0:07.44 NetworkMan+
 1292 root      20   0   45616   8120   7176 S   0.0  0.0   0:00.27 wpa_suppli+
 1293 root      20   0 1959492  27436  13192 S   0.0  0.1   0:04.47 snapd
 1305 mosquit+  20   0   48028   5676   5016 S   0.0  0.0   0:06.89 mosquitto
 1306 colord    20   0  317720  13808   9072 S   0.0  0.0   0:00.15 colord
 1307 root      20   0  296956  10396   6516 S   0.0  0.0   0:05.73 polkitd
 1338 root      20   0   36548   4232   3880 S   0.0  0.0   0:00.03 bluetoothd
 1369 root      20   0 1804588  36656  27120 S   0.0  0.1   0:01.03 libvirtd
 1370 root      20   0  187272  20280  12344 S   0.0  0.1   0:00.06 unattended+
 1372 root      20   0  879148  64496  37184 S   0.0  0.2   0:52.79 dockerd
 1378 root      20   0 1765644  37052  21912 S   0.0  0.1   1:09.71 containerd
 1410 root      20   0  301080   7940   6852 S   0.0  0.0   0:00.04 gdm3
 1414 root      20   0   72296   5640   4908 S   0.0  0.0   0:00.06 sshd
 1448 root      20   0  256948   8464   7172 S   0.0  0.0   0:00.02 gdm-sessio+
 1577 gdm       20   0   77148   8264   6656 S   0.0  0.0   0:00.24 systemd
 1579 gdm       20   0  139612   3524     12 S   0.0  0.0   0:00.00 (sd-pam)
 1607 gdm       20   0  190692   5468   4964 S   0.0  0.0   0:00.00 gdm-waylan+
 1609 gdm       20   0   50276   4644   3848 S   0.0  0.0   0:00.10 dbus-daemon
 1611 gdm       20   0  551988  13716  11436 S   0.0  0.0   0:00.20 gnome-sess+
 1639 gdm       20   0 3639028 129452  68508 S   0.0  0.4   0:33.53 gnome-shell
 1657 root      20   0  381028   9056   7460 S   0.0  0.0   0:01.91 upowerd
 1659 nvidia-+  20   0   17312   1792   1624 S   0.0  0.0   0:00.00 nvidia-per+
 1766 gdm       20   0  922840  54880  36580 S   0.0  0.2   0:00.46 Xwayland
 1822 gdm       20   0  349408   6228   5640 S   0.0  0.0   0:00.00 at-spi-bus+
 1828 gdm       20   0   49924   4200   3728 S   0.0  0.0   0:00.00 dbus-daemon
 1831 gdm       20   0  220764   5800   5220 S   0.0  0.0   0:00.00 at-spi2-re+
 1840 gdm       20   0 1408576  11544   8396 S   0.0  0.0   0:00.14 pulseaudio
 1841 rtkit     21   1  183504   3016   2748 S   0.0  0.0   0:00.20 rtkit-daem+
 1906 libvirt+  20   0   49964    368      0 S   0.0  0.0   0:00.19 dnsmasq
 1908 root      20   0   49936    368      0 S   0.0  0.0   0:00.00 dnsmasq
 2140 root      20   0  977580  35232  20916 S   0.0  0.1   1:50.31 docker-con+
 2162 gdm       20   0  354252   7768   6376 S   0.0  0.0   0:00.05 ibus-daemon
 2165 gdm       20   0  273512   5924   5500 S   0.0  0.0   0:00.00 ibus-dconf
 2168 gdm       20   0  481028  29232  22204 S   0.0  0.1   0:00.09 ibus-x11
 2170 gdm       20   0  271452   5816   5384 S   0.0  0.0   0:00.00 ibus-portal
 2186 gdm       20   0  264456   5184   4756 S   0.0  0.0   0:00.00 xdg-permis+
 2222 root      20   0  289892   7184   6252 S   0.0  0.0   0:00.33 boltd
 2232 root      20   0  444224  19912  12840 S   0.0  0.1   0:15.02 packagekitd
 2241 gdm       20   0  632304  30600  22988 S   0.0  0.1   0:00.12 gsd-xsetti+
 2248 gdm       20   0  271184   5840   5276 S   0.0  0.0   0:00.00 gsd-a11y-s+
 2250 gdm       20   0  480640  28192  21168 S   0.0  0.1   0:00.10 gsd-clipbo+
 2252 gdm       20   0  805352  31776  23528 S   0.0  0.1   0:01.97 gsd-color
 2255 gdm       20   0  386604  13532  11660 S   0.0  0.0   0:00.01 gsd-dateti+
 2269 gdm       20   0  276632   5992   5436 S   0.0  0.0   0:00.00 gsd-housek+
 2275 gdm       20   0  635180  29576  22476 S   0.0  0.1   0:00.18 gsd-keyboa+
 2276 gdm       20   0 1069200  31428  23796 S   0.0  0.1   0:00.27 gsd-media-+
 2280 gdm       20   0  194892   4696   4316 S   0.0  0.0   0:00.00 gsd-mouse
 2283 gdm       20   0  927088  31908  23316 S   0.0  0.1   0:00.38 gsd-power
 2287 gdm       20   0  259900   8940   7876 S   0.0  0.0   0:00.00 gsd-print-+
 2290 gdm       20   0  194912   4556   4172 S   0.0  0.0   0:00.00 gsd-rfkill
 2291 gdm       20   0  268628   4932   4468 S   0.0  0.0   0:00.00 gsd-screen+
 2299 gdm       20   0  298132   8060   7208 S   0.0  0.0   0:00.00 gsd-sharing
 2300 gdm       20   0  370960   9148   8248 S   0.0  0.0   0:00.00 gsd-smartc+
 2301 gdm       20   0  325884   7972   7008 S   0.0  0.0   0:00.02 gsd-sound
 2310 gdm       20   0  187908   5056   4452 S   0.0  0.0   0:00.00 dconf-serv+
 2312 gdm       20   0  565800  29916  21792 S   0.0  0.1   0:00.14 gsd-wacom
 2614 gdm       20   0  197784   6616   5988 S   0.0  0.0   0:00.02 ibus-engin+
 3012 root      20   0  410868   9608   7884 S   0.0  0.0   0:00.08 gdm-sessio+
 3017 whoopsie  20   0  390708  12612  10968 S   0.0  0.0   0:00.15 whoopsie
 3056 kernoops  20   0   56940    416      0 S   0.0  0.0   0:00.48 kerneloops
 3065 kernoops  20   0   56940    416      0 S   0.0  0.0   0:00.49 kerneloops
 3145 root      20   0       0      0      0 I   0.0  0.0   0:00.09 kworker/7:0
 3293 root      20   0   67372   4116   3624 S   0.0  0.0   0:00.08 master
 3297 postfix   20   0   73860   5436   4944 S   0.0  0.0   0:00.02 qmgr
 3473 anirudh   20   0   77308   8480   6660 S   0.0  0.0   0:00.63 systemd
 3474 anirudh   20   0  139612   3524     12 S   0.0  0.0   0:00.00 (sd-pam)
 3487 anirudh   20   0  281368   7980   6896 S   0.0  0.0   0:00.41 gnome-keyr+
 3491 anirudh   20   0  205024   6064   5456 S   0.0  0.0   0:00.01 gdm-x-sess+
 3494 root     -51   0       0      0      0 S   0.0  0.0   2:21.10 irq/164-nv+
 3508 anirudh   20   0   51252   5548   3644 S   0.0  0.0   0:01.98 dbus-daemon
 3560 anirudh   20   0  560980  14772  11948 S   0.0  0.0   0:00.86 gnome-sess+
 3665 anirudh   20   0   11304    320      0 S   0.0  0.0   0:00.06 ssh-agent
 3667 anirudh   20   0  349468   6536   5900 S   0.0  0.0   0:00.00 at-spi-bus+
 3672 anirudh   20   0   50060   4088   3588 S   0.0  0.0   0:00.63 dbus-daemon
 3674 anirudh   20   0  220776   6868   6152 S   0.0  0.0   0:07.64 at-spi2-re+
 3687 anirudh   20   0  358592   7200   6204 S   0.0  0.0   0:00.06 gvfsd
 3692 anirudh   20   0  416116   5332   4792 S   0.0  0.0   0:00.00 gvfsd-fuse
 3719 anirudh    9 -11 1755644  13424   9588 S   0.0  0.0   1:24.99 pulseaudio
 3736 root      10 -10       0      0      0 S   0.0  0.0   0:00.00 krfcommd
 3739 anirudh   20   0  354616   8116   6412 S   0.0  0.0   0:24.69 ibus-daemon
 3743 anirudh   20   0  273676   6656   6008 S   0.0  0.0   0:00.00 ibus-dconf
 3745 anirudh   20   0  336840  20716  16132 S   0.0  0.1   0:00.37 ibus-x11
 3747 anirudh   20   0  271452   5932   5504 S   0.0  0.0   0:00.18 ibus-portal
 3757 anirudh   20   0  264456   5556   5056 S   0.0  0.0   0:00.00 xdg-permis+
 3762 anirudh   20   0  689792  20684  17740 S   0.0  0.1   0:00.05 gnome-shel+
 3766 anirudh   20   0 1365196  26152  21864 S   0.0  0.1   0:00.07 evolution-+
 3774 anirudh   20   0  769228  31004  25684 S   0.0  0.1   0:00.11 goa-daemon
 3798 anirudh   20   0  296252   7536   6716 S   0.0  0.0   0:00.32 goa-identi+
 3802 anirudh   20   0  299452   8896   6948 S   0.0  0.0   0:00.97 gvfs-udisk+
 3807 anirudh   20   0  281680   6732   5920 S   0.0  0.0   0:00.01 gvfs-gphot+
 3811 anirudh   20   0  268764   5928   5264 S   0.0  0.0   0:00.02 gvfs-mtp-v+
 3815 anirudh   20   0  266940   5812   5228 S   0.0  0.0   0:00.01 gvfs-goa-v+
 3819 anirudh   20   0  371708   7776   6900 S   0.0  0.0   0:00.01 gvfs-afc-v+
 3827 anirudh   20   0  791320  25660  18692 S   0.0  0.1   0:01.04 gsd-power
 3828 anirudh   20   0  342228  10308   8956 S   0.0  0.0   0:00.14 gsd-print-+
 3830 anirudh   20   0  416240   5864   5204 S   0.0  0.0   0:00.19 gsd-rfkill
 3832 anirudh   20   0  268628   4768   4376 S   0.0  0.0   0:00.12 gsd-screen+
 3833 anirudh   20   0  446148  10144   8076 S   0.0  0.0   0:02.32 gsd-sharing
 3836 anirudh   20   0  444720   8092   7300 S   0.0  0.0   0:00.13 gsd-smartc+
 3842 anirudh   20   0  325912   8024   7056 S   0.0  0.0   0:00.13 gsd-sound
 3843 anirudh   20   0  488160  22448  17240 S   0.0  0.1   0:00.65 gsd-xsetti+
 3852 anirudh   20   0  421308  22192  16276 S   0.0  0.1   0:00.53 gsd-wacom
 3861 anirudh   20   0  336456  20136  15552 S   0.0  0.1   0:00.51 gsd-clipbo+
 3862 anirudh   20   0  271212   5920   5356 S   0.0  0.0   0:00.12 gsd-a11y-s+
 3865 anirudh   20   0  462796  13664  11796 S   0.0  0.0   0:00.14 gsd-dateti+
 3869 anirudh   20   0  661116  24000  18040 S   0.0  0.1   0:02.42 gsd-color
 3873 anirudh   20   0  499568  21636  16824 S   0.0  0.1   0:00.60 gsd-keyboa+
 3877 anirudh   20   0  357772   7508   6524 S   0.0  0.0   0:01.32 gsd-housek+
 3878 anirudh   20   0  271216   5768   5196 S   0.0  0.0   0:00.14 gsd-mouse
 3879 anirudh   20   0 1271464  24036  18800 S   0.0  0.1   0:01.32 gsd-media-+
 3911 anirudh   20   0  501652  12732  10976 S   0.0  0.0   0:00.02 gsd-printer
 3924 anirudh   20   0  271936   6452   5072 S   0.0  0.0   0:00.01 gsd-disk-u+
 3928 anirudh   20   0  366284   7580   6620 S   0.0  0.0   0:00.07 indicator-+
 3961 anirudh   20   0  361400   7760   6300 S   0.0  0.0   0:00.42 gvfsd-trash
 3967 anirudh   20   0  188384   5540   4396 S   0.0  0.0   0:00.13 dconf-serv+
 3971 anirudh   20   0  885104  67064  27172 S   0.0  0.2   0:00.22 evolution-+
 3989 anirudh   20   0  197780   6540   5928 S   0.0  0.0   0:07.30 ibus-engin+
 3996 anirudh   20   0 1128984  62560  23384 S   0.0  0.2   0:00.32 evolution-+
 4007 anirudh   20   0  725736  24396  20996 S   0.0  0.1   0:00.03 evolution-+
 4017 anirudh   20   0 1010188  26832  23416 S   0.0  0.1   0:00.11 evolution-+
 4179 root      20   0       0      0      0 I   0.0  0.0   0:00.04 kworker/3:1
 4500 anirudh   20   0 1066200  17836  13352 S   0.0  0.1   0:01.11 zeitgeist-+
 4512 anirudh   20   0  426344   8636   7396 S   0.0  0.0   0:00.29 zeitgeist-+
 4520 anirudh   20   0  326672  16380  13804 S   0.0  0.0   0:00.25 zeitgeist-+
 4543 root      20   0       0      0      0 I   0.0  0.0   0:00.67 kworker/4:1
 4848 anirudh   20   0  591208  27988  22492 S   0.0  0.1   0:00.86 update-not+
 4851 anirudh   20   0 1404492 168124  38224 S   0.0  0.5   0:05.45 gnome-soft+
 4870 root      20   0  614592  22296  14116 S   0.0  0.1   0:01.09 fwupd
 4954 root      20   0       0      0      0 I   0.0  0.0   0:00.03 kworker/2:3
 4959 root      20   0       0      0      0 I   0.0  0.0   0:00.01 kworker/2:4
 4967 root      20   0       0      0      0 I   0.0  0.0   0:00.04 kworker/6:7
 4971 root      20   0       0      0      0 I   0.0  0.0   0:00.00 kworker/3:0
 5253 anirudh   20   0  782584  31924  26388 S   0.0  0.1   0:00.15 deja-dup-m+
 5255 root     -51   0       0      0      0 S   0.0  0.0   0:00.00 irq/130-me+
 5259 root      20   0       0      0      0 S   0.0  0.0   0:00.00 nvidia
 5262 root       0 -20       0      0      0 I   0.0  0.0   0:00.10 kworker/u1+
 5263 postfix   20   0   73812   5164   4672 S   0.0  0.0   0:00.00 pickup
 5642 root      20   0   25992   6396   5096 S   0.0  0.0   0:00.00 dhclient
 5885 root      20   0  101652   9496   7244 S   0.0  0.0   0:00.02 cupsd
 5886 root      20   0  303668  10816   9372 S   0.0  0.0   0:00.10 cups-brows+
 5908 anirudh   20   0 1039504 230576 125680 S   0.0  0.7   0:49.07 chrome
 5914 anirudh   20   0    7608    744    680 S   0.0  0.0   0:00.00 cat
 5915 anirudh   20   0    7608    816    752 S   0.0  0.0   0:00.00 cat
 5918 anirudh   20   0  437536  57432  47048 S   0.0  0.2   0:00.07 chrome
 5919 anirudh   20   0   27356   4308   3744 S   0.0  0.0   0:00.00 nacl_helper
 5924 anirudh   20   0  437536  14660   4268 S   0.0  0.0   0:00.06 chrome
 5946 anirudh   20   0  664756 204912  99372 S   0.0  0.6   0:48.18 chrome
 5950 anirudh   20   0  526016  84160  59684 S   0.0  0.3   0:07.32 chrome
 6027 anirudh   20   0  456744  23640   8876 S   0.0  0.1   0:00.00 chrome
 6044 anirudh   20   0  809432 143500  83520 S   0.0  0.4   0:09.42 chrome
 6046 anirudh   20   0  732936  88036  67252 S   0.0  0.3   0:00.73 chrome
 6084 anirudh   20   0 1954756 180900  71904 S   0.0  0.6   0:08.03 chrome
 6095 anirudh   20   0 11.758g 123568  71088 S   0.0  0.4   0:08.60 chrome
 6262 anirudh   20   0  816196 150560  87328 S   0.0  0.5   0:23.60 chrome
 6669 root      20   0       0      0      0 I   0.0  0.0   0:00.21 kworker/u1+
 6690 anirudh   20   0  797816 132420  83480 S   0.0  0.4   0:07.71 chrome
 6793 anirudh   20   0 1148992 138220  96840 S   0.0  0.4   0:18.78 code
 6795 anirudh   20   0  383808  43108  36140 S   0.0  0.1   0:00.01 code
 6824 anirudh   20   0  669492 183956 106436 S   0.0  0.6   0:20.70 code
 6836 anirudh   20   0 1233260 281588 114896 S   0.0  0.9   1:01.46 code
 6866 anirudh   20   0   22924   5512   3600 S   0.0  0.0   0:00.12 bash
 6953 anirudh   20   0  788192  94608  65676 S   0.0  0.3   0:01.42 code
 7088 anirudh   20   0  616504  75496  48144 S   0.0  0.2   0:00.54 code
 7107 anirudh   20   0  953288 193996  52184 S   0.0  0.6   0:05.96 code
 7128 anirudh   20   0  583720  66488  47352 S   0.0  0.2   0:00.21 code
 7173 anirudh   20   0  141400  30704   8244 S   0.0  0.1   0:00.12 python3
 7176 anirudh   20   0   58408  21004   8144 S   0.0  0.1   0:00.08 python3
 7186 root      20   0       0      0      0 I   0.0  0.0   0:00.00 kworker/6:0
 7276 root      20   0       0      0      0 I   0.0  0.0   0:00.50 kworker/4:0
 7747 anirudh   20   0  730172  92612  67972 S   0.0  0.3   0:00.35 chrome
 7759 anirudh   20   0 1270524 405416  90616 S   0.0  1.2   0:40.95 chrome
 7779 anirudh   20   0  810380 137704  82768 S   0.0  0.4   0:13.49 chrome
 7870 root      20   0       0      0      0 I   0.0  0.0   0:00.02 kworker/1:1
 7968 root      20   0       0      0      0 I   0.0  0.0   0:00.00 kworker/7:2
 8131 anirudh   20   0  697792  53716  39520 S   0.0  0.2   0:00.06 chrome
 8164 root      20   0       0      0      0 I   0.0  0.0   0:00.02 kworker/5:0
 8212 root      20   0       0      0      0 I   0.0  0.0   0:00.00 kworker/0:0
 8231 root      20   0       0      0      0 I   0.0  0.0   0:00.08 kworker/u1+
 8384 root      20   0       0      0      0 I   0.0  0.0   0:00.01 kworker/5:2
 8467 root      20   0       0      0      0 I   0.0  0.0   0:00.01 kworker/u1+
 8684 anirudh   20   0   23748   6284   3512 S   0.0  0.0   0:00.04 bash
 8702 root      20   0       0      0      0 I   0.0  0.0   0:00.01 kworker/1:2
 8706 root      20   0       0      0      0 I   0.0  0.0   0:00.00 kworker/7:1
 8715 root      20   0       0      0      0 I   0.0  0.0   0:00.00 kworker/4:2
 8760 root      20   0       0      0      0 I   0.0  0.0   0:00.00 kworker/0:1
 8805 anirudh   20   0  198052   6432   5264 S   0.0  0.0   0:00.01 gvfsd-meta+
 8992 anirudh   20   0  796572  38060  28824 S   0.0  0.1   0:00.24 gnome-term+
 9002 anirudh   20   0   22792   5240   3484 S   0.0  0.0   0:00.01 bash
 9012 root      20   0       0      0      0 I   0.0  0.0   0:00.00 kworker/1:0
 9013 anirudh   20   0   15932   2420   2292 S   0.0  0.0   0:00.00 crontab
 9014 anirudh   20   0    4628    772    704 S   0.0  0.0   0:00.00 sh
 9015 anirudh   20   0    4628    808    740 S   0.0  0.0   0:00.00 sensible-e+
 9023 anirudh   20   0   23316   3956   3088 S   0.0  0.0   0:00.02 nano
 9025 root      20   0  100200   5348   4624 S   0.0  0.0   0:00.00 cron
 9026 anirudh   20   0    4628    796    732 S   0.0  0.0   0:00.00 sh
 9029 anirudh   20   0   12884   3288   3060 S   0.0  0.0   0:00.00 updateWall+
11269 anirudh   20   0  701104  40636  34184 S   0.0  0.1   0:04.81 kwalletd5
20292 anirudh   20   0  488292   5980   5432 S   0.0  0.0   0:00.15 xdg-docume+
20490 anirudh   20   0  538664  21992  12960 S   0.0  0.1   0:00.04 gvfsd-http
21900 anirudh   20   0  437176   7324   6396 S   0.0  0.0   0:00.02 gvfsd-netw+
21934 anirudh   20   0  374180   7528   6608 S   0.0  0.0   0:00.03 gvfsd-dnssd
23919 anirudh   20   0   72984   6012   5276 S   0.0  0.0   0:00.02 gconfd-2
30401 root       0 -20       0      0      0 I   0.0  0.0   0:00.44 kworker/u1+
31977 root      20   0       0      0      0 I   0.0  0.0   0:18.62 kworker/0:2

@yannmichaux
Copy link
Author

Uh, all right, I think that's gonna be a problem, so haha.

@MarcusMathiassen
Copy link

The output of 'top -l 1' is way different though.

@dsluo
Copy link
Contributor

dsluo commented Aug 21, 2019

This could be fixed by using psutil instead of the output of top(1). Would also make it easier to manipulate the data. #20

@mzzfederico
Copy link

mzzfederico commented Aug 22, 2019

Hey guys, I'm half way into porting it to psutil right now. I added in the command for setting the wallpaper on OS X but I'm not yet sure it works. I also simplified how it creates the dict, but might not be as nice. I'll finish later! First time doing Python.

mzzfederico@3853dd2

Edit: will also check on Linux if I can. 🙂

@mzzfederico
Copy link

So... I got it working on OSX as far as to create the wallpaper, still can't set the wallpaper I think (unfortunately the office was closing so I could commit what I could!). Pillow gives out problems when pasting in, since the latest version takes a 4-item box. 🤔

Meanwhile at home I got it working on my Bash for Windows, though it has the same issue with Pillow. I integrated already some checks because the executable for Python is different, because the services in Windows have that pesky .exe and the Idle Process just dominates everything. Seemingly looks good. 😃

wallpaper

@anirudhajith
Copy link
Owner

That sounds awesome! I'd like to see that!

@mzzfederico
Copy link

I did a number of things:

  • fixed the setup.sh so it works without issues in the Bash for Windows
  • added in 3 modes: greyscale (from dark to white), colorscale (applies a color by frequency, dark to light), color (all words same color)
  • refactored the code a bit into at least a number of functions
  • fixed margins for Windows and Mac OS (at least I think)
  • added in "repeating" option in the JSON, so you can fill the wallpaper by repeating the words (useful on Windows since it has very few words)

Here's some screenshots:

color
mono
grey

I'll open a pull request. 🙂

@yannmichaux
Copy link
Author

Awesome, i'll try that soon 💃

@dsluo dsluo added bug Something isn't working compatibility Issue is related to compatibility. labels Aug 31, 2019
@anirudhajith
Copy link
Owner

anirudhajith commented Sep 6, 2019

@YannMCX @dsluo
I've attempted a port to psutil on a new branch: d753165
This should work on all platforms since we're not relying on the precise format of the output of top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility Issue is related to compatibility.
Projects
None yet
Development

No branches or pull requests

5 participants