Closed ZephyrHeather closed 1 year ago
- I write "eww open bar" in my Hyprland config, which seems just bring a flicker of the bar why i start Hyprland. And i comment it to run manually with the command
eww open bar
. Still, eww bar won't appear until i run it twice or even third times.
Yeah it happens to me too since a few days ago, I'm really unsure if one of my script rewrites broke it or if it's an eww update that broke it. Probably the former though. It seems that if I have firefox open and then start eww, it works. No idea why.
- So, how can i install the proper fonts? (i try download the symbols.ttf from github and manually install, no success)
You have to download this and put it in ~/.local/share/fonts
. After that, run fc-cache -f
and then check whether it was picked up with fc-list "Material Symbols Outlined"
. If it worked, restart eww and icons should be fixed.
If all else fails, you could manually replace icons with another font's icons. They won't match since there's no standard dictating what codepoint each icon uses. gucharmap
is really handy for searching the icons.
Hope these help.
Thank you for the instant help. I've installed font properly.
Yeah it happens to me too since a few days ago, I'm really unsure if one of my script rewrites broke it or if it's an eww update that broke it. Probably the former though. It seems that if I have firefox open and then start eww, it works. No idea why.
I tried several programs, some of which lead to successful start of eww. And some actually caused weird behavior.
Ctrl+C
, eww bar disappeared after few seconds. And i also tried close the terminal which has run eww open bar
, the eww bar didn't disappear.eww open bar
, the eww bar also disappeared.eww open bar
acted well, and the bar didn't disappear after i closed vim.I chose these programs, because I'm suspecting the cache. The programs with outcome like firefox all write to $HOME/.cache
. And before i figured out the cache file path problem, eww can just start normally.
Thus, I write a C program to write a file in $HOME/.cache
:
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fp;
char ch;
fp = fopen("1.txt", "r+");
while ((ch = getchar()) != EOF)
putc(ch, fp);
if(fclose(fp))
printf("Error in closing file \n");
return 0;
}
And this c script acted just like what yay caused! And if I run this c script elsewhere but $HOME/.cache
, eww bar won't show.
Hope this could help you debug it.
Thank you for the extensive info!
I'm suspecting one of my recent changes to eww scripts that cause I'll try to debug it soon.
Otherwise, it might be some recent change to xdg dirs or eww, I'm not sure.
I've two more problems with the window system-menu
:
scripts/airplane
icon() {
[ "$STATUS" = "no" ] && echo "" || echo ""
}
The character
here is just what shows on the system-menu.
And if i click on the Airplane place. It just turn off the airplane mode but never turn on.
logs related:
ERROR eww::error_handling_ctx > Error while updating UI after state change
Caused by:
invalid float literal
The volume won't change.(solved) I find the error it's that
Error: '@DEFAULT_AUDIO_SINK 20@' is not a valid number
And I change the scripts/volume
line 62 setvol "$2 $3"
to setvol "$2" "$3"
. I'm happy that I could really make some small help. :)
Hi, may I ask some questions too? I got this error:
home-manager switch --impure --flake ".#sand"
warning: Git tree '/nix-config' is dirty
error: getting status of '/nix/store/6h1yfnpx87917z45djqfh7jm0hjrcw0q-source/home/profiles/programs/eww': No such file or directory
(use '--show-trace' to show detailed location information)
I already added your flake as in the readme, but it doesn't work.
# home.nix
{ pkgs, default, fufexan, ... }:
{
# enable hyprland
wayland.windowManager.hyprland = {
enable = true;
xwayland = {
enable = true;
hidpi = true;
};
nvidiaPatches = false;
};
home.packages = with pkgs; [
jaq
xorg.xprop
];
imports = [
fufexan.homeManagerModules.eww-hyprland
./wofi
./hyprpaper
./dunst
];
programs.eww-hyprland = {
enable = true;
};
services.kanshi = {
enable = true;
systemdTarget = "graphical-session.target";
};
# fake a tray to let apps start
# https://github.com/nix-community/home-manager/issues/2064
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
};
}
# flake.nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
devenv.url = "github:cachix/devenv";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim.url = "github:nix-community/neovim-nightly-overlay";
hyprland.url = "github:hyprwm/Hyprland";
hyprpaper.url = "github:hyprwm/hyprpaper";
fufexan.url = "github:fufexan/dotfiles";
};
outputs = inputs@{ flake-parts, nixpkgs, home-manager, hyprland, hyprpaper, neovim, fufexan, devenv, ... }:
let
username = "sand";
in
flake-parts.lib.mkFlake { inherit inputs; } ({ withSystem, ... }: {
systems = [ "aarch64-linux" ];
debug = true;
imports = [
inputs.flake-parts.flakeModules.easyOverlay
inputs.devenv.flakeModule
];
perSystem = { config, self', inputs', pkgs, system, lib, devenv, ... }: {
devenv.shells.default = {
languages.nix.enable = true;
};
packages = with pkgs; {
neovim-nightly = neovim.packages.${system}.neovim;
hyprpaper = hyprpaper.packages.${system}.hyprpaper;
vcluster = callPackage ./pkgs/vcluster { };
kubeswitch = callPackage ./pkgs/kubeswitch { };
yamlfmt = callPackage ./pkgs/yamlfmt { };
comic-code = callPackage ./pkgs/comic-code { };
flypie = callPackage ./pkgs/flypie { };
};
overlayAttrs = {
inherit (config.packages) neovim-nightly vcluster kubeswitch yamlfmt comic-code flypie;
};
};
flake.homeConfigurations.${username} = withSystem "aarch64-linux" ({ final, ... }:
home-manager.lib.homeManagerConfiguration {
pkgs = final;
extraSpecialArgs =
let
inherit (inputs.nixpkgs) lib;
colorlib = import ./lib/colors.nix lib;
default = import ./lib/theme { inherit colorlib lib; };
in
{ inherit username fufexan default; };
modules = [
hyprland.homeManagerModules.default
./users/${username}/home.nix
];
});
});
}
@sandangel sorry for the late response, I hope it works after https://github.com/fufexan/dotfiles/issues/8.
it's working now. thank you very much.
@ZephyrHeather turns out the STATUS
variable wasn't being set before the toggle
action. Should be fixed in https://github.com/fufexan/dotfiles/commit/1f4e77d5c8f2b20c12dc36ce770b42ed069b6666.
turns out the
STATUS
variable wasn't being set before thetoggle
action. Should be fixed in 1f4e77d.
Thank you for fixing the toggle problem! Still i have some new problems to show.
system-menu
is either 00:00h left or 08:00h left. And i changed the scripts/battery
line 39 -- line 46 as:
if [ "$RATE" -gt 0 ]; then
if [ "$STATE" = "Discharging" ]; then
EX=$(($NOW / $RATE))
else
EX=$((($FULL - $NOW) / $RATE))
fi
date -u -d@"$(awk -v ex="$EX" 'BEGIN{print ex * 3600}')" +%H:%M
fi
I think the $EX
here should be digits rather than strings. But then, this script just show hours without minutes. So I put multiply the factor 3600
before as:
if [ "$RATE" -gt 0 ]; then
if [ "$STATE" = "Discharging" ]; then
EX=$(($NOW * 3600 / $RATE))
else
EX=$((($FULL - $NOW) * 3600 / $RATE))
fi
date -u -d@"$EX" +%H:%M
fi
Hope this won't overflow the range of the integer.
system-menu
After i trigger the wlogout
, i just can't close the window of system-menu
. It seems that no matter where i click on the eww
, it just call out wlogout
again.
Don't know if it's an issue of eww
.
Also, can I close the window of eww
without click on the origin place I call it out? Say, can I click elsewhere on the desktop to close the extra window of eww
? Maybe it will be convenient.echo
command just print two characters, but what are they?Hope you cloud fix the eww open
problem soon, which is surely the most tricky and bothering problem. Thanks again.
I think the
$EX
here should be digits rather than strings. But then, this script just show hours without minutes. So I put multiply the factor3600
before as:
That looks old. I've changed the script to use upower
for battery querying instead. It should be more consistent now, though sometimes slow to update.
- the logout button of window
system-menu
Weird, this does not happen to me. I'm not sure how to debug it. Do the logs say anything useful?
Also, can I close the window of
eww
without click on the origin place I call it out? Say, can I click elsewhere on the desktop to close the extra window ofeww
? Maybe it will be convenient.
I'm not sure, maybe if you make the widget occupy the entire screen (and remove the blurls
rule, since it'll just blur everything). I may look into that sometime, but it's not a priority right now.
- Still missing the airplane icon
Weird. It should be provided by the font. However, try to change those icons to these, as I might have overlooked them. The reason I don't use a json here is that it's the only output of the script, so it can be handled as a simple string.
I think that all the problems are solved prettily. eww
could run perfectly with hyprland on start now. Thanks again @fufexan !
I'd like to close this issue now.
It's really an awesome desktop setup. But i have encountered some trouble to config it on my Arch Linux. Here are my problems.
eww open bar
. Still, eww bar won't appear until i run it twice or even third times. Here are my logs. (Tips: just runcurl ix.io/xxxx
to get the logs in the terminal.)RUST_BACKRACE=1
first time: ix.io/4tTM (I'm using Pulseaudio instead of Pipewire, but i'm still trying to replace thewpctl
withpactl
in thescripts/volume
. But i think that's not the problem why eww didn't show, or is it?)material-symbols-outline
. But, i actually installttf-material-design-iconic-font
andttf-material-design-icons
from archlinux aur and try to change thefamily name
of theicon
, no success. i find out that thematerial-icon
andmaterial-symbols
are two things. It seems thaticon
are iconic font likeawesome font
, but symbols are like svg or png? See here So, how can i install the proper fonts? (i try download the symbols.ttf from github and manually install, no success)scripts/utils
orscripts/music
. But myXDG_CACHE_HOME
are empty.scripts/utils
sets theXDG_CACHE_HOME
to/home/mihai/.local/cache
, and thescripts/music
doesn't set the value. After i set env toXDG_CACHE_HOME = $HOME/.local/cache
, all programs using caches broken. It seems that$HOME/.cache
is the default cache file on Arch, though not related toXDG_CACHE_HOME
.I'm sry that i am poor in coding. Just like what's said by the elkowar/eww:
Any help would be appreciated. Thanks in advance!