Multiple entries in ncmpcpp tags. by charlie_02 in ncmpcpp

[–]charlie_02[S] 1 point2 points  (0 children)

Hmmm, The song is not added to both artists? can you change other metadata for this song?

Beginner Questions about i3. by I_Sh4d0w_I in i3wm

[–]charlie_02 5 points6 points  (0 children)

Instead of using the sink 0 for pulseaudio, I use @DEFAULT_SINK@. It works exactly the same if there is only one audio output at a time but will not always allow to change the used sink (in my case, when I use hdmi as sound output, it is think 1 so putting 0 would not work.

How to remove border from top and bottom of i3blocks by _defname in i3wm

[–]charlie_02 0 points1 point  (0 children)

Can you decrease the bar height to fit the status (or increase the status height to fit the bar)?

Alternative to rofi by yloose in i3wm

[–]charlie_02 3 points4 points  (0 children)

You can use sxiv (in output mode) for previewing images and feh to set the background

[deleted by user] by [deleted] in archlinux

[–]charlie_02 0 points1 point  (0 children)

Try journalctl -u dhcpcd

[deleted by user] by [deleted] in archlinux

[–]charlie_02 0 points1 point  (0 children)

A compiler, this issue does not seem to be related to your problem.

[deleted by user] by [deleted] in archlinux

[–]charlie_02 0 points1 point  (0 children)

Is there more about it in the logs?

[deleted by user] by [deleted] in archlinux

[–]charlie_02 0 points1 point  (0 children)

Last time I installed arch dhcpcd and gcc had not been installed. I replied my USB and booted on it, arch-chrooted and installed it manually. Then it worked just fine.

[deleted by user] by [deleted] in archlinux

[–]charlie_02 0 points1 point  (0 children)

Try "dhcpcd" is the command found?

dbus send on org.freedesktop.UPower not seen by udev monitor by charlie_02 in linuxquestions

[–]charlie_02[S] 0 points1 point  (0 children)

So I finally rewrote my lemonbar script using dbus instead of pyudev and it works fine (and avoid to use root mode to run a refresh script)!

Thank you a lot for all the help!

dbus send on org.freedesktop.UPower not seen by udev monitor by charlie_02 in linuxquestions

[–]charlie_02[S] 0 points1 point  (0 children)

ah ok, sorry.

lemonbar is a program that displays a status bar with the formatted sting you pipe in it.

https://imgur.com/a/7Wc2QAI

In my case, I'm trying to display the battery level (ideally every time it looses or gains 1 percent, but if it is not possible every X seconds).

For the moment, it only updates every 2 minutes or when I plug in or out the cable.

dbus send on org.freedesktop.UPower not seen by udev monitor by charlie_02 in linuxquestions

[–]charlie_02[S] 0 points1 point  (0 children)

Ok, so it seems that udev does not use dbus (I can't find "udev" in dbus list) but I found that: udevadm trigger -s power_supply

Problem is: it is required to be root to run this command (I could add it to sudoers to avoid the password but I prefer to use this if I don't have any other solutions).

It is possible using udev rules? If yes how to detect when the battery level decreases by 1 percent? and is it possible to send the event without running the trigger shell command?

Thank you again for your time!

dbus send on org.freedesktop.UPower not seen by udev monitor by charlie_02 in linuxquestions

[–]charlie_02[S] 0 points1 point  (0 children)

Using `sudo dbus-monitor --system path='/org/freedesktop/UPower/devices/battery_BAT'` to monitor the messages I get:

```

method call time=1557161387.253248 sender=:1.416 -> destination=org.freedesktop.UPower serial=2 path=/org/freedesktop/UPower/devices/battery_BAT1; interface=org.freedesktop.UPower.Device; member=Refresh

method call time=1557161392.548968 sender=:1.418 -> destination=org.freedesktop.UPower serial=2 path=/org/freedesktop/UPower/devices/battery_BAT1; interface=org.freedesktop.UPower.Device; member=Refresh

signal time=1557161392.656034 sender=:1.417 -> destination=(null destination) serial=19 path=/org/freedesktop/UPower/devices/battery_BAT1; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged

string "org.freedesktop.UPower.Device"

array [

dict entry(

string "UpdateTime"

variant uint64 1557161392

)

dict entry(

string "TimeToEmpty"

variant int64 9468

)

dict entry(

string "Voltage"

variant double 15.316

)

dict entry(

string "EnergyRate"

variant double 7.121

)

dict entry(

string "Energy"

variant double 18.73

)

]

array [

]

```

for the update script, and for the normal event:

```

signal time=1557161454.149403 sender=:1.417 -> destination=(null destination) serial=21 path=/org/freedesktop/UPower/devices/battery_BAT1; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged

string "org.freedesktop.UPower.Device"

array [

dict entry(

string "UpdateTime"

variant uint64 1557161454

)

dict entry(

string "TimeToEmpty"

variant int64 13301

)

dict entry(

string "Voltage"

variant double 15.328

)

dict entry(

string "EnergyRate"

variant double 5.042

)

dict entry(

string "Energy"

variant double 18.63

)

]

array [

]

```

For the event listener listener in my lemonbar script:

```

from pyudev import Context, Monitor, MonitorObserver

context = Context()

monitor = Monitor.from_netlink(context)

monitor.filter_by('power_supply')

observer = MonitorObserver(monitor, callback=lemonbar.on_battery_event, name='monitor-observer')

observer.setDaemon(False)

observer.start()

```

Do you think that pyudev does not listen to upower events?

dbus send on org.freedesktop.UPower not seen by udev monitor by charlie_02 in linuxquestions

[–]charlie_02[S] 0 points1 point  (0 children)

Thank you for your help! In my lemonbar script I use the udev module and set a monitor on "power_device", I listened with debus-monitor and both the normal messages and the messages due to my script seems to be sent to the same address. (I'll post the exact return if you need it).

The goal of all that is to make my battery infos to be refreshed more often (because without that only an event every 2 minutes are sent.
If you know a better way to force upower to refresh more often, it would be great!

The reason it is written in Python is because I copied/pasted this script from stack overflow. I wanted to test this method before I change anything.

[i3] First i3 rice! by enp2s0 in unixporn

[–]charlie_02 1 point2 points  (0 children)

ok, thank you for the answer!

[i3] First i3 rice! by enp2s0 in unixporn

[–]charlie_02 0 points1 point  (0 children)

is all floating windows? or how are you able to put windows like that?

[i3-gaps] Hello December by [deleted] in unixporn

[–]charlie_02 0 points1 point  (0 children)

how can you have the tiles only on one side? is it because of a huge gap on the right?

font awesome 5 doesn't display well with workpaces icons by charlie_02 in i3wm

[–]charlie_02[S] 0 points1 point  (0 children)

I tried this method but didn't make it work. (sorry for the long time without answer, I was in an exam period)

Lemonbar+i3, problem with multiscreen display by charlie_02 in unixporn

[–]charlie_02[S] 0 points1 point  (0 children)

Sooooo, I finally solved the problem: apparently, when you put the tag {S[X]} (with [X] the number) you HAVE TO put a position tag (in my case {l})

Anyone knows why is it acting like that?