Coder Social home page Coder Social logo

wldash's Introduction

wldash

screenshot

A dashboard/launcher/control-panel thing for Wayland. Requires wlr-layer-shell-unstable-v1.

Consider this alpha-quality: While it works, everything is subject to change with a moments notice. You may end up pulling in the latest changes, and poof, wldash suddenly turns into an artisan espresso machine.

How to use

  1. Checkout: git clone https://github.com/kennylevinsen/wldash
  2. Build: cargo build --release
  3. Put somewhere: cp target/release/wldash /usr/local/bin/wldash
  4. Run: wldash

To see the default configuration, run wldash print-config. To configure, place a file in $XDG_CONFIG_HOME/wldash/config.yaml (or if XDG_CONFIG_HOME is not set, ~/.config/wldash/config.yaml). JSON is also currently supported.

Notable settings: outptuMode can be active or all, scale can be set to 2 to half the buffer size, and the widgets (and their layout) can be configured.

For more info, look in src/config.rs.

System dependencies

dbus. See https://github.com/diwic/dbus-rs#requirements.

How to use launcher

The launcher for wldash is built-in, based on https://github.com/kennylevinsen/dot-desktop. Pluggable systems may come back in the future.

The environment variables XDG_DATA_DIRS and XDG_DATA_HOME are read to find the many applications folders that contain desktop files.

Features

Date and time

In nice, big letters!

3 month calendar

Scroll or click on the months to navigate.

Battery level

Over upower, only visible if upower battery is detected

Audio volume

Over pulseaudio, only visible if pulseaudio connection is successful. Scroll to adjust volume, right-click to toggle mute.

Backlight control

Using backlight sys file, only visible of backlight is detected. Scroll to adjust, right-click to toggle between the extreme values.

Launcher

Loads desktop files from the usual locations.

The launcher also accepts prefix operators to change its mode:

Notable missing features:

  • Scaling of any kind - all sizes are currently hardcoded in pixels
  • Configurability
  • Cleanup and reorganization
  • Proper line editor for the launcher

How to discuss

Go to #kennylevinsen @ irc.libera.chat to discuss, or use ~kennylevinsen/[email protected].

wldash's People

Contributors

cyrinux avatar kennylevinsen avatar lihram avatar lxea avatar maximbaz avatar mel34 avatar pedrocr avatar siborgium avatar tadeokondrak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wldash's Issues

Multiple batteries are not correctly represented

My laptop has two batteries. The controller apparently (stupidly) discharges the first battery and then the second. Right now the first is at 5% and the second at 94%. i3status correctly calculates that the laptop has 46% battery left. wldash seems to just be displaying the 5% of the first battery.

Application Grid View

It would be great to have a application grid view which shows all available (.desktop) applications with their icons.

Background color config issues

I decided to configure wldash to match my theme, using the following settings:

background:
  red: 233.0
  green: 228.0
  blue: 226.0
  opacity: 0.9

This seems to really mess with the font rendering.
image

Cannot compile on openSuse tumbleweed

❯ cargo build --release
    Updating crates.io index
    Updating git repository `https://github.com/kennylevinsen/libivy.git`
  Downloaded nix v0.15.0
  Downloaded chrono v0.4.7
  Downloaded lazy_static v1.4.0
  Downloaded wayland-protocols v0.23.5
  Downloaded memmap v0.7.0
  Downloaded byteorder v1.3.2
  Downloaded fuzzy-matcher v0.2.1
  Downloaded rusttype v0.7.7
  Downloaded rust-ini v0.13.0
  Downloaded os_pipe v0.8.1
  Downloaded shlex v0.1.1
  Downloaded wayland-client v0.23.5
  Downloaded rcalc_lib v0.9.3
  Downloaded libc v0.2.62
  Downloaded num-integer v0.1.41
  Downloaded smithay-client-toolkit v0.6.4
  Downloaded bitflags v1.1.0
  Downloaded num-traits v0.2.8
  Downloaded dbus v0.6.5
  Downloaded ordered-float v1.0.2
  Downloaded downcast-rs v1.0.4
  Downloaded nix v0.13.1
  Downloaded nix v0.14.1
  Downloaded libpulse-binding v2.11.1
  Downloaded approx v0.3.2
  Downloaded arrayvec v0.4.11
  Downloaded stb_truetype v0.2.6
  Downloaded wayland-sys v0.23.5
  Downloaded wayland-scanner v0.23.5
  Downloaded time v0.1.42
  Downloaded cfg-if v0.1.9
  Downloaded void v1.0.2
  Downloaded num-rational v0.2.2
  Downloaded andrew v0.2.1
  Downloaded proc-macro2 v0.4.30
  Downloaded autocfg v0.1.6
  Downloaded libpulse-sys v1.9.1
  Downloaded num-complex v0.2.3
  Downloaded dlib v0.4.1
  Downloaded quote v0.6.13
  Downloaded num-bigint v0.2.2
  Downloaded libdbus-sys v0.2.0
  Downloaded pest_derive v2.1.0
  Downloaded pest v2.1.1
  Downloaded nodrop v0.1.13
  Downloaded xml-rs v0.8.0
  Downloaded wayland-commons v0.23.5
  Downloaded libloading v0.5.2
  Downloaded walkdir v2.2.9
  Downloaded xdg v2.2.0
  Downloaded pkg-config v0.3.15
  Downloaded unicode-xid v0.1.0
  Downloaded ucd-trie v0.1.2
  Downloaded pest_generator v2.1.0
  Downloaded dtoa v0.4.4
  Downloaded same-file v1.0.5
  Downloaded line_drawing v0.7.0
  Downloaded cc v1.0.41
  Downloaded pest_meta v2.1.1
  Downloaded syn v0.15.44
  Downloaded maplit v1.0.2
   Compiling cc v1.0.41
   Compiling proc-macro2 v0.4.30
   Compiling unicode-xid v0.1.0
   Compiling libc v0.2.62
   Compiling bitflags v1.1.0
   Compiling autocfg v0.1.6
   Compiling nix v0.14.1
   Compiling xml-rs v0.8.0
   Compiling byteorder v1.3.2
   Compiling cfg-if v0.1.9
   Compiling arrayvec v0.4.11
   Compiling ucd-trie v0.1.2
   Compiling lazy_static v1.4.0
   Compiling syn v0.15.44
   Compiling void v1.0.2
   Compiling pkg-config v0.3.15
   Compiling nodrop v0.1.13
   Compiling num-bigint v0.2.2
   Compiling maplit v1.0.2
   Compiling nix v0.13.1
   Compiling downcast-rs v1.0.4
   Compiling same-file v1.0.5
   Compiling nix v0.15.0
   Compiling xdg v2.2.0
   Compiling dtoa v0.4.4
   Compiling shlex v0.1.1
   Compiling rust-ini v0.13.0
   Compiling fuzzy-matcher v0.2.1
   Compiling num-traits v0.2.8
   Compiling num-integer v0.1.41
   Compiling num-rational v0.2.2
   Compiling num-complex v0.2.3
   Compiling walkdir v2.2.9
   Compiling pest v2.1.1
   Compiling libdbus-sys v0.2.0
   Compiling libpulse-sys v1.9.1
   Compiling stb_truetype v0.2.6
   Compiling pest_meta v2.1.1
error: failed to run custom build command for `libdbus-sys v0.2.0`

Caused by:
  process didn't exit successfully: `/mnt/data/Projects/oss/wldash/target/release/build/libdbus-sys-63618c97dcb0d76b/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"dbus-1\" \"dbus-1 >= 1.6\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package dbus-1 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `dbus-1.pc\'\nto the PKG_CONFIG_PATH environment variable\nPackage \'dbus-1\', required by \'virtual:world\', not found\nPackage \'dbus-1\', required by \'virtual:world\', not found\n" } }', src/libcore/result.rs:999:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

❯ rustc --version
rustc 1.37.0 (eae3437df 2019-08-13)

Using rust 1.37.0, from asdf. Am I missing some packages?

wldash: refuse to start more than one instance / toggle exit?

I realize I could do this with a wrapper script, of sorts, but it might be nice to have this functionality baked in?

It would be nice to just be able to tap my bound sway hotkey for wldash, scroll on my volume level, and then tap the hotkey again to close it. Or at the very least, it wouldn't open multiple instances as it does now?

wldash doesn't receive input if opened on secondary monitor

My monitor layout is as defined in sway config file:

    output HDMI-A-2 resolution 2560x1080 position 0,0 
    output DVI-D-1 resolution 1920x1080 position 2560,0 

If I launch wldash using a hotkey defined in sway config file and it opens on my DVI-D-1 screen, it doesn't receive keyboard input. Scrolling the mousewheel before pressing any keys gives the focus to wldash.

Launching it from a terminal opened on that same screen using eval "$(dot-desktop "$(dot-desktop | wldash)")" it receives keyboard input.

I have a feeling this might be related to swaywm/sway#4407

This does not happen if wldash is opened on my primary screen (HDMI-A-2)

Configurable font

Awesome work with adding configuration file!

In the light of the new and exciting configurable wldash, could the font face also be configurable please?

Obvious FR: remote calendar integration

Stuff is looking gigantic so far. It would be great to get the calendar to display events on my remote calendars (eg google), perhaps via gnome online accounts?

Cargo.lock is outdated in v0.3.0

$ cargo build --release --locked
error: the lock file Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.
--- Cargo.lock.original
+++ Cargo.lock.updated
@@ -796,7 +796,7 @@
 
 [[package]]
 name = "wldash"
-version = "0.2.0"
+version = "0.3.0"
 dependencies = [
  "alsa",
  "bitflags",

4 warnings emitted

Compiling wldash v0.2.0 (/home/xxxxxxxxxxxxxx/wldash)
warning: use of deprecated function fuzzy_matcher::skim::fuzzy_indices: Please use SkimMatcherV2 instead
--> src/widgets/launcher.rs:18:27
|
18 | use fuzzy_matcher::skim::{fuzzy_indices, fuzzy_match};
| ^^^^^^^^^^^^^
|
= note: #[warn(deprecated)] on by default

warning: use of deprecated function fuzzy_matcher::skim::fuzzy_match: Please use SkimMatcherV2 instead
--> src/widgets/launcher.rs:18:42
|
18 | use fuzzy_matcher::skim::{fuzzy_indices, fuzzy_match};
| ^^^^^^^^^^^

warning: use of deprecated function fuzzy_matcher::skim::fuzzy_indices: Please use SkimMatcherV2 instead
--> src/widgets/launcher.rs:100:21
|
100 | fuzzy_indices(&m.name.to_lowercase(), &self.input.to_lowercase())
| ^^^^^^^^^^^^^

warning: use of deprecated function fuzzy_matcher::skim::fuzzy_match: Please use SkimMatcherV2 instead
--> src/widgets/launcher.rs:226:27
|
226 | if let Some(ma) = fuzzy_match(val, input) {
| ^^^^^^^^^^^

warning: 4 warnings emitted

Finished release [optimized] target(s) in 5m 29s

fails to build on aarch64-linux

I've seen similar build errors on Rust projects when building for aarch64...

   Compiling libdbus-sys v0.2.1
   Compiling alsa-sys v0.3.1
   Compiling wayland-scanner v0.28.3
   Compiling pest_meta v2.1.3
   Compiling time v0.1.44
   Compiling timerfd v1.2.0
   Compiling memmap v0.7.0
   Compiling os_pipe v0.9.2
   Compiling dbus v0.6.5
   Compiling fontconfig v0.2.0
   Compiling wayland-client v0.28.3
   Compiling wayland-protocols v0.28.3
error[E0308]: mismatched types
   --> /build/wldash-5e5e8876f6dbecaf508045f400b63097ddccef6b-vendor.tar.gz/fontconfig/src/lib.rs:
185:43
    |
185 |                 let cstr = CStr::from_ptr(ret as *const i8);
    |                                           ^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
    |
    = note: expected raw pointer `*const u8`
               found raw pointer `*const i8`

error[E0308]: mismatched types
   --> /build/wldash-5e5e8876f6dbecaf508045f400b63097ddccef6b-vendor.tar.gz/fontconfig/src/lib.rs:281:45
    |
281 |         let fcstr = unsafe { CStr::from_ptr(fcstr as *const i8) };
    |                                             ^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
    |
    = note: expected raw pointer `*const u8`
               found raw pointer `*const i8`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `fontconfig` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

Readline-style line editor for launcher

Currently, the launcher only supports basic input, and has no concept of a cursor. New input is added to the end of the buffer, backspace removes from the end of the buffer.

A proper line editor should be added.

Fontconfig error when compiling

Fails to compile as-is. Gives an error for fontconfig.

Changing the fontconfig version in Cargo.toml from "0.2.0" to "0.5.0" fixes the issue.

Compiling on arm64.

Spaces in launcher

Launcher items are currently separated by spaces and it can be hard to tell what is happening when the desktop items themselves have spaces in. See the following screenshot for an example:

screenshot43

Perhaps a double space between items would work better?

Error on program start on sway master

As of yesterday I get the following error when starting wldash:

zwlr_layer_surface_v1@14: error 1: width 0 requested without setting left and right anchors
thread 'main' panicked at 'Failed to dispatch all messages.: Os { code: 71, kind: Other, message: "Protocol error" }', src/main.rs:315:21
stack backtrace:
   0:     0x5608970e0c1b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8e44e3bad104136e
   1:     0x56089708a0ed - core::fmt::write::he8cb6d64ed166147
   2:     0x5608970eea56 - std::io::Write::write_fmt::hf25ce96005919ce6
   3:     0x5608970e748a - std::panicking::default_hook::{{closure}}::hf8bcda2c877e2dcc
   4:     0x5608970e705f - std::panicking::rust_panic_with_hook::h7b83b0fe7900eb7a
   5:     0x5608970e6d3a - rust_begin_unwind
   6:     0x560897088d00 - core::panicking::panic_fmt::h61e03e91a1a8868a
   7:     0x560897089e42 - core::result::unwrap_failed::hfb81d2c162de1956
   8:     0x560897139fe4 - wldash::main::h8212739dcc7d5852
   9:     0x5608970e0973 - std::sys_common::backtrace::__rust_begin_short_backtrace::h9597725d379735e1
  10:     0x560897135394 - main
  11:     0x7fab7b1fac7d - __libc_start_main
  12:     0x5608970781aa - _start
  13:                0x0 - <unknown>
fish: “RUST_BACKTRACE=full wldash” terminated by signal SIGABRT (Abort)

sway --version reports sway version 1.5-989123a2 (Aug 11 2020, branch 'master')

Any idea what has caused this issue?

freebsd compilation failure during linking

every source file builds but then it fails during the last ompilation during linking heres the output of failure any suggestions:

Compiling rust-ini v0.14.0
Compiling wldash v0.2.0 (/usr/home/doeboy1111/git/wayland/wldash)
warning: unused import: ffi::CStr
--> src/doublemempool.rs:3:5
|
3 | ffi::CStr,
| ^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default

warning: use of deprecated function fuzzy_matcher::skim::fuzzy_indices: Please use SkimMatcherV2 instead
--> src/widgets/launcher.rs:18:27
|
18 | use fuzzy_matcher::skim::{fuzzy_indices, fuzzy_match};
| ^^^^^^^^^^^^^
|
= note: #[warn(deprecated)] on by default

warning: use of deprecated function fuzzy_matcher::skim::fuzzy_match: Please use SkimMatcherV2 instead
--> src/widgets/launcher.rs:18:42
|
18 | use fuzzy_matcher::skim::{fuzzy_indices, fuzzy_match};
| ^^^^^^^^^^^

warning: use of deprecated function fuzzy_matcher::skim::fuzzy_indices: Please use SkimMatcherV2 instead
--> src/widgets/launcher.rs:100:21
|
100 | fuzzy_indices(&m.name.to_lowercase(), &self.input.to_lowercase())
| ^^^^^^^^^^^^^

warning: use of deprecated function fuzzy_matcher::skim::fuzzy_match: Please use SkimMatcherV2 instead
--> src/widgets/launcher.rs:226:27
|
226 | if let Some(ma) = fuzzy_match(val, input) {
| ^^^^^^^^^^^

warning: use of deprecated associated function std::sync::atomic::AtomicBool::compare_and_swap: Use compare_exchange or compare_exchange_weak instead
--> src/app.rs:81:36
|
81 | if !this_is_stupid.compare_and_swap(false, true, Ordering::SeqCst) {
| ^^^^^^^^^^^^^^^^

warning: panic message is not a string literal
--> src/config.rs:348:24
|
348 | None => panic!(format!("Font {} is missing from the config", name)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(non_fmt_panic)] on by default
= note: this is no longer accepted in Rust 2021
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: panic message is not a string literal
--> src/doublemempool.rs:212:40
|
212 | Err(err) => panic!(err),
| ^^^
|
= note: this is no longer accepted in Rust 2021
help: add a "{}" format string to Display the message
|
212 | Err(err) => panic!("{}", err),
| ^^^^^
help: or use std::panic::panic_any instead
|
212 | Err(err) => std::panic::panic_any(err),
| ^^^^^^^^^^^^^^^^^^^^^^

warning: panic message is not a string literal
--> src/doublemempool.rs:214:36
|
214 | Err(err) => panic!(err),
| ^^^
|
= note: this is no longer accepted in Rust 2021
help: add a "{}" format string to Display the message
|
214 | Err(err) => panic!("{}", err),
| ^^^^^
help: or use std::panic::panic_any instead
|
214 | Err(err) => std::panic::panic_any(err),
| ^^^^^^^^^^^^^^^^^^^^^^

warning: panic message is not a string literal
--> src/widgets/audio/alsa_sound.rs:102:30
|
102 | Err(e) => panic!(e),
| ^
|
= note: this is no longer accepted in Rust 2021
help: add a "{}" format string to Display the message
|
102 | Err(e) => panic!("{}", e),
| ^^^^^
help: or use std::panic::panic_any instead
|
102 | Err(e) => std::panic::panic_any(e),
| ^^^^^^^^^^^^^^^^^^^^^^

warning: panic message is not a string literal
--> src/widgets/audio/alsa_sound.rs:110:20
|
110 | panic!(e)
| ^
|
= note: this is no longer accepted in Rust 2021
help: add a "{}" format string to Display the message
|
110 | panic!("{}", e)
| ^^^^^
help: or use std::panic::panic_any instead
|
110 | std::panic::panic_any(e)
| ^^^^^^^^^^^^^^^^^^^^^^

warning: panic message is not a string literal
--> src/widgets/audio/alsa_sound.rs:115:20
|
115 | panic!(e)
| ^
|
= note: this is no longer accepted in Rust 2021
help: add a "{}" format string to Display the message
|
115 | panic!("{}", e)
| ^^^^^
help: or use std::panic::panic_any instead
|
115 | std::panic::panic_any(e)
| ^^^^^^^^^^^^^^^^^^^^^^

error: linking with cc failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/usr/home/doeboy1111/.rustup/toolchains/stable-x86_64-unknown-freebsd/lib/rustlib/x86_64-unknown-freebsd/lib" "/usr/home/doeboy1111/git/wayland/wldash/target/release/deps/wldash-bc6ab10bb38f5e91.wldash.5lyfhw0w-cgu.15.rcgu.o" "-o" "/usr/home/doeboy1111/git/wayland/wldash/target/release/deps/wldash-bc6ab10bb38f5e91" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/usr/home/doeboy1111/git/wayland/wldash/target/release/deps" "-L" "/usr/local/lib" "-L" "/usr/local/lib" "-L" "/usr/local/lib" "-L" "/usr/local/lib" "-L" "/usr/home/doeboy1111/.rustup/toolchains/stable-x86_64-unknown-freebsd/lib/rustlib/x86_64-unknown-freebsd/lib" "-Wl,--start-group" "-Wl,--end-group" "-Wl,-Bstatic" "/usr/home/doeboy1111/.rustup/toolchains/stable-x86_64-unknown-freebsd/lib/rustlib/x86_64-unknown-freebsd/lib/libcompiler_builtins-84b862f5ffd396b9.rlib" "-Wl,-Bdynamic" "-ldbus-1" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpulse" "-lpthread" "-lasound" "-lfontconfig" "-lfreetype" "-lrt" "-lutil" "-lutil" "-lc" "-lexecinfo" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lrt" "-lutil" "-lutil"
= note: ld: error: undefined symbol: timerfd_create
>>> referenced by wldash.5lyfhw0w-cgu.15
>>> /usr/home/doeboy1111/git/wayland/wldash/target/release/deps/wldash-bc6ab10bb38f5e91.wldash.5lyfhw0w-cgu.15.rcgu.o:(wldash::main::hfb9082918b5d1ead)

      ld: error: undefined symbol: timerfd_settime
      >>> referenced by wldash.5lyfhw0w-cgu.15
      >>>               /usr/home/doeboy1111/git/wayland/wldash/target/release/deps/wldash-bc6ab10bb38f5e91.wldash.5lyfhw0w-cgu.15.rcgu.o:(wldash::main::hfb9082918b5d1ead)
      cc: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error; 12 warnings emitted

error: could not compile wldash

Feature request: fuzzy search

Would be really nice if there was the option of having a fuzzy search for the launcher, I misspell things way too often.

Unable to build since 6deffa9

Full build log bellow:

~/Downloads/PKG ▶ git clone https://github.com/kennylevinsen/wldash.git
Cloning into 'wldash'...
remote: Enumerating objects: 181, done.
remote: Counting objects: 100% (181/181), done.
remote: Compressing objects: 100% (114/114), done.
remote: Total 479 (delta 120), reused 124 (delta 67), pack-reused 298
Receiving objects: 100% (479/479), 4.68 MiB | 4.13 MiB/s, done.
Resolving deltas: 100% (304/304), done.
~/Downloads/PKG ▶ cd wldash/
~/Downloads/PKG/wldash ▶ cargo build --release --features=bc
   Compiling cc v1.0.38
   Compiling proc-macro2 v0.4.30
   Compiling unicode-xid v0.1.0
   Compiling bitflags v1.1.0
   Compiling autocfg v0.1.5
   Compiling libc v0.2.60
   Compiling xml-rs v0.8.0
   Compiling byteorder v1.3.2
   Compiling nix v0.14.1
   Compiling void v1.0.2
   Compiling lazy_static v1.3.0
   Compiling arrayvec v0.4.11
   Compiling cfg-if v0.1.9
   Compiling pkg-config v0.3.15
   Compiling nodrop v0.1.13
   Compiling downcast-rs v1.0.4
   Compiling nix v0.13.1
   Compiling same-file v1.0.5
   Compiling xdg v2.2.0
   Compiling fuzzy-matcher v0.2.1
   Compiling num-traits v0.2.8
   Compiling num-integer v0.1.41
   Compiling walkdir v2.2.9
   Compiling libpulse-sys v1.5.0
   Compiling libdbus-sys v0.2.0
   Compiling libloading v0.5.2
   Compiling memmap v0.7.0
   Compiling time v0.1.42
   Compiling atty v0.2.13
   Compiling stb_truetype v0.2.6
   Compiling quote v0.6.13
   Compiling libpulse-binding v2.6.0
   Compiling dbus v0.6.5
   Compiling ordered-float v1.0.2
   Compiling approx v0.3.2
   Compiling line_drawing v0.7.0
   Compiling wayland-scanner v0.23.5
   Compiling os_pipe v0.8.1
   Compiling rusttype v0.7.7
   Compiling dlib v0.4.1
   Compiling chrono v0.4.7
   Compiling wayland-sys v0.23.5
   Compiling andrew v0.2.1
   Compiling wayland-client v0.23.5
   Compiling wayland-protocols v0.23.5
   Compiling wayland-commons v0.23.5
   Compiling smithay-client-toolkit v0.6.3
   Compiling wldash v0.1.0 (/home/anon/Downloads/PKG/wldash)
error[E0583]: file not found for module `cmd`
  --> src/main.rs:15:5
   |
15 | mod cmd;
   |     ^^^
   |
   = help: name the file either cmd.rs or cmd/mod.rs inside the directory "src"

error: aborting due to previous error

For more information about this error, try `rustc --explain E0583`.
error: Could not compile `wldash`.

To learn more, run the command again with --verbose.

Fails to build on aarch64, armhf, armv7 and ppc64le

   Compiling fontconfig v0.2.0
error[E0308]: mismatched types
   --> /home/buildozer/.cargo/registry/src/github.com-1ecc6299db9ec823/fontconfig-0.2.0/src/lib.rs:185:43
    |
185 |                 let cstr = CStr::from_ptr(ret as *const i8);
    |                                           ^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
    |
    = note: expected raw pointer `*const u8`
               found raw pointer `*const i8`

error[E0308]: mismatched types
   --> /home/buildozer/.cargo/registry/src/github.com-1ecc6299db9ec823/fontconfig-0.2.0/src/lib.rs:281:45
    |
281 |         let fcstr = unsafe { CStr::from_ptr(fcstr as *const i8) };
    |                                             ^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
    |
    = note: expected raw pointer `*const u8`
               found raw pointer `*const i8`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `fontconfig`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...

  • Alpine Linux Edge
  • fontconfig 2.13.1
  • rust 1.54.0

thread 'pa_reader' panicked

~ ▶ wldash start
~ ▶ wldash start
~ ▶ wldash start
~ ▶ wldash start
thread 'pa_reader' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:999:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
~ ▶ RUST_BACKTRACE=1 wldash start
~ ▶ RUST_BACKTRACE=1 wldash start
thread 'pa_reader' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:999:5
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: start_thread
  11: __clone
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
~ ▶ RUST_BACKTRACE=full wldash start
thread 'pa_reader' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:999:5
stack backtrace:
   0:     0x555a48535cf8 - <unknown>
   1:     0x555a48535458 - <unknown>
   2:     0x555a48534f7f - <unknown>
   3:     0x555a48546c36 - <unknown>
   4:     0x555a4855217c - <unknown>
   5:     0x555a485ce11c - <unknown>
   6:     0x555a485761a2 - <unknown>
   7:     0x555a4845a270 - <unknown>
   8:     0x555a485466ef - <unknown>
   9:     0x555a485487cc - <unknown>
  10:     0x7fb37b1f357f - start_thread
  11:     0x7fb37b1070e3 - __clone
  12:                0x0 - <unknown>

Background brightness is not being updated

When wldash is opened and the brightness is adjusted with the keyboard keys¹ the bar does not change.
Restarting wldash displays the updated value.

The same issue can not be observed with the volume. The displayed bar is being updated in "real time".

¹ sway config: bindsym XF86MonBrightnessDown exec light -U 10

Protocol Error

After a recent sway update I'm getting the following panic when launching wldash:

zwlr_layer_surface_v1@14: error 1: width 0 requested without setting left and right anchors
thread 'main' panicked at 'Failed to dispatch all messages.: Os { code: 71, kind: Other, message: "Protocol error" }', src/main.rs:317:26
stack backtrace:
   0:     0x55ae00bcc496 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6f05017bae98a16f
   1:     0x55ae00b5fd2d - core::fmt::write::h4e423e63ef6952a5
   2:     0x55ae00bc9d64 - std::io::Write::write_fmt::h87a2ee7a0f0be87a
   3:     0x55ae00bbbf7a - std::panicking::default_hook::{{closure}}::hcb146b886903f1b9
   4:     0x55ae00bbc645 - std::panicking::rust_panic_with_hook::h71db2d7d0653eadb
   5:     0x55ae00bccd9a - std::panicking::begin_panic_handler::{{closure}}::h59f65871c4ccd803
   6:     0x55ae00bccd64 - std::sys_common::backtrace::__rust_end_short_backtrace::hedd2b2fd0e04e8bb
   7:     0x55ae00bba34d - rust_begin_unwind
   8:     0x55ae00b5e750 - core::panicking::panic_fmt::h810a06353f831f07
   9:     0x55ae00b5fa82 - core::result::unwrap_failed::hf16cbd16a77f8bf3
  10:     0x55ae00c2a308 - wldash::main::h0d72cd7d8cef0f29
  11:     0x55ae00b5278c - std::sys_common::backtrace::__rust_begin_short_backtrace::h5c63d018dc96303e
  12:     0x55ae00c25470 - main
  13:     0x7fa8d609bdbd - __libc_start_main
  14:     0x55ae00b5208a - _start
  15:                0x0 - <unknown>
fish: “RUST_BACKTRACE=full wldash” terminated by signal SIGABRT (Abort)

Can't launch wldash, if no mouse is connected.

I think it is a minor bug, but if you don't have a mouse connected you can't launch wldash in sway.

Not sure if it is a bug in your application or in wayland-client or sway.

To reproduce.

  • Start sway (important don't have mouse connected)
  • try launch wldash

Version

wldash version 0.2.0
sway version 1.6.1
wlroots 0.14.1-2

Stack trace

cargo run --release
thread 'main' panicked at 'unable to flush display: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/app.rs:342:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Full backtrace

RUST_BACKTRACE=full cargo run --release
    Finished release [optimized] target(s) in 0.03s
     Running `target/release/wldash`
thread 'main' panicked at 'unable to flush display: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/app.rs:342:30
stack backtrace:
   0:     0x55baa591db29 - std::backtrace_rs::backtrace::libunwind::trace::h7630ba4cba718aa0
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x55baa591db29 - std::backtrace_rs::backtrace::trace_unsynchronized::he7498e79c157f5ac
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55baa591db29 - std::sys_common::backtrace::_print_fmt::hdaebadaee17bca49
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55baa591db29 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h82b0e3aaf8a96140
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55baa58cd9ec - core::fmt::write::h72801a82c94e6ff1
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/core/src/fmt/mod.rs:1149:17
   5:     0x55baa591c844 - std::io::Write::write_fmt::hc2da38dc44811df8
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/io/mod.rs:1697:15
   6:     0x55baa591cd7e - std::sys_common::backtrace::_print::h1c9a1d19c48821c1
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55baa591cd7e - std::sys_common::backtrace::print::h7ce8802039fa9d0e
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55baa591cd7e - std::panicking::default_hook::{{closure}}::hb2a74a8c1499c326
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/panicking.rs:211:50
   9:     0x55baa591c5ef - std::panicking::default_hook::hf4f180b00076f2b2
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/panicking.rs:228:9
  10:     0x55baa591c5ef - std::panicking::rust_panic_with_hook::he85ce8435493b711
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/panicking.rs:606:17
  11:     0x55baa5942d13 - std::panicking::begin_panic_handler::{{closure}}::h31e15f69e6235bd2
  12:     0x55baa5942c96 - std::sys_common::backtrace::__rust_end_short_backtrace::hfce2fadb61aaa3ae
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:139:18
  13:     0x55baa5942c52 - rust_begin_unwind
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/panicking.rs:498:5
  14:     0x55baa58c0330 - core::panicking::panic_fmt::h7b8580d81fcbbacd
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/core/src/panicking.rs:107:14
  15:     0x55baa58c0612 - core::result::unwrap_failed::h885d3f7beb571353
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/core/src/result.rs:1613:5
  16:     0x55baa5993142 - core::result::Result<T,E>::expect::h1df884c65bf7552e
  17:     0x55baa59acb95 - wldash::main::he9601f43d7218618
  18:     0x55baa59a4589 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8bd52ec02aea305b
  19:     0x55baa59a9694 - main
  20:     0x7f5fbe5cfb25 - __libc_start_main
  21:     0x55baa58c52ce - _start
  22:                0x0 - <unknown>

The first stack trace I got is a little different I don't know why.
But I think this one is making more sense in a way of the mouse pointer was not plugged in.

[wayland-client] Protocol error while reading events: Protocol error 0 on object wl_seat@9: wl_seat.get_pointer called when no pointer capability has existed
Error while trying to read from the wayland socket: Os { code: 71, kind: Uncategorized, message: "Protocol error" }
thread 'main' panicked at 'unable to flush display: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/app.rs:342:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.