fixes
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
(defwindow bar
|
||||
:monitor 1
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update date_rev=true"
|
||||
:onhoverlost "${EWW_CMD} update date_rev=false"
|
||||
:onclick "(sleep 0.1 && ${EWW_CMD} open --toggle calendar)"
|
||||
:onrightclick "(sleep 0.1 && ${EWW_CMD} open --toggle powermenu)"
|
||||
:onclick "(sleep 0.1 && eww-open-on-current-screen calendar --toggle)"
|
||||
:onrightclick "(sleep 0.1 && eww-open-on-current-screen powermenu --toggle)"
|
||||
(box
|
||||
:class "datetime"
|
||||
(overlay
|
||||
@@ -39,4 +39,4 @@
|
||||
(defpoll hour :interval "15s" "date '+%H'")
|
||||
(defpoll minute :interval "15s" "date '+%M'")
|
||||
(defpoll day :interval "15s" "date '+%d'")
|
||||
(defpoll month :interval "15s" "date '+%m'")
|
||||
(defpoll month :interval "15s" "date '+%m'")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
(defwidget sys-mod []
|
||||
(module
|
||||
(eventbox
|
||||
:onclick "(sleep 0.1 && ${EWW_CMD} open --toggle sys)"
|
||||
:onclick "(sleep 0.1 && eww-open-on-current-screen sys --toggle)"
|
||||
(box
|
||||
:orientation "v"
|
||||
(circular-progress
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
(defwindow calendar
|
||||
:monitor 1
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
:anchor "bottom right"
|
||||
:width "0px"
|
||||
:height "0px")
|
||||
(window (calendar)))
|
||||
(window (calendar)))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
)
|
||||
|
||||
(defwindow powermenu
|
||||
:monitor 1
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
:geometry (geometry
|
||||
:anchor "center"
|
||||
@@ -42,4 +42,4 @@
|
||||
:height "120%")
|
||||
:namespace "eww-blur"
|
||||
(powermenu)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
(defvar radio_rev false)
|
||||
|
||||
(defwindow radio
|
||||
:monitor 1
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
@@ -100,7 +100,7 @@
|
||||
(box
|
||||
:orientation "v"
|
||||
(button
|
||||
:onclick "(sleep 0.1 && ${EWW_CMD} open --toggle --no-daemonize radio)"
|
||||
:onclick "(sleep 0.1 && eww-open-on-current-screen radio --toggle --no-daemonize)"
|
||||
(label
|
||||
:show-truncated false
|
||||
:class "icon-text"
|
||||
@@ -108,4 +108,4 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
)
|
||||
|
||||
(defwindow sys
|
||||
:monitor 1
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
@@ -137,4 +137,4 @@
|
||||
:anchor "bottom right"
|
||||
:width "0px"
|
||||
:height "0px")
|
||||
(window (sys-win)))
|
||||
(window (sys-win)))
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
{ lib, config, pkgs, ... }: {
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
openOnCurrentScreen = pkgs.writeShellScriptBin "eww-open-on-current-screen" ''
|
||||
window="$1"
|
||||
shift
|
||||
|
||||
screen="$(hyprctl monitors -j | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true) | .name' | head -n1)"
|
||||
|
||||
if [ -n "$screen" ]; then
|
||||
exec ${lib.getExe pkgs.eww} open "$window" --screen "$screen" "$@"
|
||||
fi
|
||||
|
||||
exec ${lib.getExe pkgs.eww} open "$window" "$@"
|
||||
'';
|
||||
in {
|
||||
|
||||
config = lib.mkIf (config.usercfg.wm == "Wayland") {
|
||||
home.packages = with pkgs; [ eww jq jaq custom.amdgpu_top ];
|
||||
home.packages = with pkgs; [ eww jq jaq custom.amdgpu_top openOnCurrentScreen ];
|
||||
|
||||
xdg.configFile."eww" = {
|
||||
source = lib.cleanSourceWith {
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
{ config, lib, ... }: {
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
restartEwwBar = monitor: pkgs.writeShellScript "restart-eww-bar-after-kanshi-${toString monitor}" ''
|
||||
|
||||
sleep 1
|
||||
${lib.getExe pkgs.eww} close bar || true
|
||||
${lib.getExe pkgs.eww} open bar --screen ${toString monitor}
|
||||
'';
|
||||
in {
|
||||
|
||||
config = lib.mkIf (config.usercfg.wm == "Wayland") {
|
||||
services.kanshi = {
|
||||
@@ -7,6 +15,7 @@
|
||||
settings = [
|
||||
{
|
||||
profile.name = "tower_0";
|
||||
profile.exec = [ "${restartEwwBar 1}" ];
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "AOC 24E1W1 GNSKCHA086899";
|
||||
@@ -28,6 +37,7 @@
|
||||
}
|
||||
{
|
||||
profile.name = "tower_1";
|
||||
profile.exec = [ "${restartEwwBar 1}" ];
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "AOC 24E1W1 GNSKCHA086899";
|
||||
@@ -57,6 +67,7 @@
|
||||
}
|
||||
{
|
||||
profile.name = "laptop_0";
|
||||
profile.exec = [ "${restartEwwBar 0}" ];
|
||||
profile.outputs = [{
|
||||
criteria = "LG Display 0x060A Unknown";
|
||||
mode = "1920x1080@60.020";
|
||||
@@ -67,6 +78,7 @@
|
||||
}
|
||||
{
|
||||
profile.name = "laptop_1";
|
||||
profile.exec = [ "${restartEwwBar 1}" ];
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "CEX CX133 0x00000001";
|
||||
@@ -86,6 +98,7 @@
|
||||
}
|
||||
{
|
||||
profile.name = "laptop_2";
|
||||
profile.exec = [ "${restartEwwBar 1}" ];
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "AOC 16G3 1DDP7HA000348";
|
||||
|
||||
@@ -232,7 +232,7 @@ in {
|
||||
"custom/powermenu" = {
|
||||
"format" = "{icon}";
|
||||
"format-icons" = [ "" ];
|
||||
"on-click" = "eww open powermenu";
|
||||
"on-click" = "eww-open-on-current-screen powermenu";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"tray" = {
|
||||
|
||||
Reference in New Issue
Block a user