Sway Edition - General Conversation!

As for the wallpaper, I think @joekamprad @manuel and I should have a proper discussion on how we are going to handle this.

2 Likes

EDIT : Bad quote sorry!

Of course thank you!

2 Likes

I do not know if you have considered to add the option for “active screen corners”. Maybe it could be useful.

but I’ve not found yet a working solution for sway

Can you do that in sway?

1 Like

unfortunately not, I was not able to find a way.
But maybe someone got it working :slight_smile:

question: would "active screen corners " on tiling wm be useful?

also if it possible maybe that be added by user? My understand of EOS is . it give you the basic tools ( working DE/Wm ) if you want/need more user add…

@OdiousImp

your fix for welcome speed work great on arm :pray:

1 Like

Yeah! I agreee but thank you for the sugesstion @cipolla

2 Likes

I’m lazy, I have not to reach the keyboard to change screen :smiley:
just to move the mouse to one corner :smiley:

2 Likes

@cipolla
more effort move mouse :wink:… we all different :+1:

2 Likes

For github - probably better way but for now

Swappshot Thu Feb 18 17:09:51 2021

2 Likes

Heya, newbie here.

Just got everything setup how I wanted it when I saw the “custom/weather” module commented out, so I uncommented it and tinkered with it, but it won’t show up on the waybar.

Here’s the module code:

"custom/weather": {
    	"exec": "~/.config/waybar/scripts/weather.sh Stockholm",
    	"format": "{text} {icon}",
    	"return-type": "json",
    	"interval": 600,
        "tooltip-format": "{tooltip}"
}

Got a parsing error when running the script at first, so I dug around and found it had to do with single-quotes being parsed as numbers. Changed it so it works in the terminal. Looks like this now:

#!/bin/bash

LOC="$1"
# HTML encode string as %20
LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC")
content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=$LOCATION&deg=C")
ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' )
# echo $ICON
TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g')
TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g')
CLASS=$(echo $content | jq .skytext)

echo "{\"text\": \"$TEMP\", \"tooltip\": \"$ICON $TOOLTIP $LOC\", \"class\": \"$CLASS\", \"icon\": \"$ICON\" }"

I added “custom/weather” to the “modules-right” as well, but doesn’t seem to show up after reloading the config.

Any idea on what’s going on?

And thank you so much for making the git for this! Helped out a ton setting everything up, even though it took a while to set everything up with propietary nvidia drivers hehe.

2 Likes

That script was written by @morten-b who unfortunately is no longer here. I have another one if your happy to test?

#!/bin/bash
text="$(curl -s 'https://wttr.in/?format=1')"
tooltip="$(curl -s 'https://wttr.in?0QT' |
    sed 's/\\/\\\\/g' |
    sed ':a;N;$!ba;s/\n/\\n/g' |
    sed 's/"/\\"/g')"
echo "{\"text\": \"$text\", \"tooltip\": \"<tt>$tooltip</tt>\", \"class\": \"weather\"}"

Very simple…I’m not too talented.


"custom/weather": {
            "return-type": "json",
            "exec": "bash $HOME/.config/waybar/scripts/weather.sh",
            "interval": 300,
},

 Also make sure you add it in style.css.

even though it took a while to set everything up with propietary nvidia drivers hehe.

I thought this was impossible! Well done!

EDIT : I don’t think that works actually. I can’t get it pick the place!

Okay so I realized I could just run waybar in the terminal, which outputs this:

[2021-02-18 20:05:34.631] [error] custom/weather: * Line 1, Column 30
  Syntax error: value, object or array expected.

Then I changed it back to how it was before, with single-quotes, and got this:

[2021-02-18 20:00:10.055] [error] custom/weather: * Line 1, Column 2
  Missing '}' or object member name

Can I see config? You are probably missing some comma’s.

Also I forgot sorry! Welcome to EOS!!

The strange thing is that it works when run in bash/terminal, but gives the error when using waybar. Hmm…

I’ll try it out soon! After some dinner hehe

1 Like

Dinner for me too! This may help! I may implement myself in a bit!

1 Like

Here it is! Mostly just straight from the github.

(not sure how to show the relevant part directly here sorry!)

Man, thank you for helping me find out about wttr.in! What a wonderful website, I think I’m in love!

@harofax you set like … change city to your ( for info put cursor over bar module )

#!/bin/bash

LOC="$1"
# HTML encode string as %20
LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC")
content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=$LOCATION&deg=C")
ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' )
# echo $ICON
TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g')
TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g')
CLASS=$(echo $content | jq .skytext)
echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP $LOC'", "class": '$CLASS' }'

"custom/weather": {
    	"exec": "~/.config/waybar/scripts/weather.sh Bangkok",
    	"format": "  {} ",
    	"return-type": "json",
    	"interval": 600
},
"modules-right": [
	        "memory",
	        "cpu",
	        "custom/weather",
	        "pulseaudio",
            "temperature",
            "clock",
             "network#vpn",
            "tray",
	        "custom/power",

2021-02-19-waybar-weather-2

edit
only way i get work

1 Like