Skip to content
/ wayinfo Public

一组获取天气,播放器,系统信息命令

License

Notifications You must be signed in to change notification settings

erasin/wayinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wayinfo

一组用于获取系统信息,天气,播放器控制的命令工具。

主要用于在 wayland 系统下提供数据给 waybar, eww

功能开发中

功能

wayinfo

  • system
    • cpu
    • gpu
    • memory
    • network
    • disk
    • unmount
  • weather 使用高德天气API
  • player
    • player Player Identity
    • next next song
    • previous previous song
    • toggle toggle play or pause
    • play play
    • stop stop
    • status Playback status (Playing|Paused|Stopped)
    • status-icon Playing  , other 
    • title title of song
    • artist artist of song
    • album album of song
    • cover cover of song
    • track-number Track Number of
    • position Position time at playing
    • positions Position second at playing
    • length Length of song
    • lengths Length second of song
    • shuffle
    • loop 循环模式
    • lyrics lyrics
    • waybar waybar format

system

weather

天气使用高德天气API,需要 key.

wayinfo weather --waybar --city 上海 --key-file $HOME/.config/apikeys/gaode.txt

player

播放器控制使用 playerctld 支持 MPRIS 协议播放器。

如果使用 mpd 可以安装 mpd-mpris 服务以获得支持。

wayinfo

{
  "custom/weather": {
    "format": "{}",
    "format-alt": "{alt}",
    "return-type": "json",
    "exec": "wayinfo weather --waybar --city 上海 --key-file $HOME/.config/apikeys/gaode.txt 2> /dev/null",
    "exec-if": "which wayinfo",
    "on-click-right": "gnome-weather"
  },
  "custom/media": {
    "format": "{}",
    "return-type": "json",
    "max-length": 85,
    "interval": 5,
    "exec": "wayinfo player waybar",
    "on-click": "wayinfo player toggle",
    "on-click-right": "wayinfo player next",
    "on-click-middle": "niri msg spawn -- eww open --toggle music"
  }
}

About

一组获取天气,播放器,系统信息命令

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages