Çözüldü Pencere açık değilken waybar boş bir daire gösteriyor

Bu konu çözüldü olarak işaretlenmiştir. Çözülmediğini düşünüyorsanız konuyu rapor edebilirsiniz.

Fueren

Hectopat
Katılım
23 Aralık 2023
Mesajlar
2.051
Makaleler
2
Çözümler
36
Daha fazla  
Cinsiyet
Erkek
Meslek
YKS Öğrencisi
Başlık biraz karışık oldu ama şöyle anlatayım; eğer bir pencere odaklı değilse, waybar'da hyprland/window'un olduğu yerde boş bir daire görünüyor.

Kod:
{
    // -------------------------------------------------------------------------
    // Global configuration
    // -------------------------------------------------------------------------

    "layer": "top",

    "position": "top",

    "height": 10,

    "margin-left": 10,
    "margin-bottom": 0,
    "margin-right": 10,

    "spacing": 5, // Gaps between modules (4px)

    "modules-left": [
        //"custom/rofi",
        "hyprland/workspaces",
        //"temperature",
        //"idle_inhibitor",
        //"mpd",
        "hyprland/window"
    ],
    "modules-center": [
        "clock#date",
        "custom/weather"
    ],
    "modules-right": [
        "memory",
        "cpu",
    "network",
        //"battery",
        "pulseaudio",
        //"custom/screenshot_t",
        "tray"
        //"custom/power"
    ],


    // -------------------------------------------------------------------------
    // Modules
    // -------------------------------------------------------------------------

    "custom/sp1": {
        "format": " | ",
        "tooltip": false
    },
    "custom/sp2": {
        "format": " |",
        "tooltip": false
    },


    "custom/rofi": {
        "format": "",
        "tooltip": false,
        "on-click-right": "nwg-drawer",
        "on-click": "wofi -show run",
        "on-click-middle": "pkill -9 wofi"
    },
    "custom/screenshot_t":{
        "format":"",
        "on-click": "~/.config/hypr/scripts/screenshot_full",
        "on-click-right":"~/.config/hypr/scripts/screenshot_area"
    },

    "clock#1": {
        "format": " {:%a}",
        "tooltip": false,
        "on-click": "gsimplecal"
    },
    "clock#2": {
        "format": " {:%d-%h-%Y}",
        "tooltip": false,
        "on-click": "gsimplecal"
    },
    "hyprland/workspaces": {
    "all-outputs": false,
    "active-only": false,
    "persistent-workspaces": {
        "1": [],
        "2": [],
        "3": [],
        "4": [],
        "5": []
        }
    },
    "clock#3": {
        "format": " {:%H:%M:%S %p}",
        "tooltip": false,
        "on-click": "gsimplecal"
    },

    "temperature": {
        // "thermal-zone": 1,
        "interval": 4,
        //"hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input",
        "critical-threshold": 80,
        // "format-critical": " {temperatureC}°C",
        "format-critical": "  {temperatureC}°C",
        "format": "{icon}  {temperatureC}°C",
        "format-icons": ["", "", ""],
        "max-length": 7,
        "min-length": 7,
        "on-click": "xsensors"
    },

    "memory": {
        "interval": 10,
        "format": "☰ {used:0.2f} / {total:0.0f} GB",
        "on-click": "alacritty -e btop"
    },

    "battery": {
        "interval": 2,
        "states": {
            "good": 95,
            "warning": 30,
            "critical": 15
        },
        "format": "{icon} {capacity}%",
        "format-charging": " {capacity}%",
        "format-plugged": " {capacity}%",
        "format-icons": [
            "",
            "",
            "",
            "",
            ""
        ]
    },
    "network": {
        "format-wifi": "   {essid} ({signalStrength}%)",
        "format-ethernet": "⬇{bandwidthDownBytes} ⬆{bandwidthUpBytes}",
    "interval": 1,
        "format-linked": "{ifname} (No IP) ",
        "format": "",
        "format-disconnected": "",
        "format-alt": "{ifname}: {ipaddr}/{cidr}",
        "on-click": "wl-copy $(ip address show up scope global | grep inet | head -n1 | cut -d/ -f 1 | tr -d [:space:] | cut -c5-)",
        "tooltip-format": " {bandwidthUpBits}  {bandwidthDownBits}\n{ifname}\n{ipaddr}/{cidr}\n",
        "tooltip-format-wifi": " {essid} {frequency}MHz\nStrength: {signaldBm}dBm ({signalStrength}%)\nIP: {ipaddr}/{cidr}\n {bandwidthUpBits}  {bandwidthDownBits}",
    "min-length": 17,
    "max-length": 17
    },
    "custom/storage": {
        "format": " {}",
        "format-alt": "{percentage}% ",
        "format-alt-click": "click-right",
        "return-type": "json",
        "interval": 60,
        "exec": "~/.config/waybar/modules/storage.sh"
    },
    "backlight": {
        "device": "intel_backlight",
        "format": "{icon} {percent}%",
        "format-alt": "{percent}% {icon}",
        "format-alt-click": "click-right",
        //"format-icons": ["", ""],
        "format-icons": ["", ""],
        "on-scroll-down": "brightnessctl s 5%-",
        "on-scroll-up": "brightnessctl s +5%"
    },
    "idle_inhibitor": {
        "format": "{icon}",
        "format-icons": {
            "activated": "",
            "deactivated": ""
        },
        "tooltip": "true"
    },
    "custom/weather": {
        "format": "{}",
        "format-alt": "{alt}: {}",
        "format-alt-click": "click-right",
        "interval": 3600,
        "exec": "curl -s 'https://wttr.in/Ankara?format=1'",
        //"return-type": "json",
        //"exec": "/etc/xdg/waybar/modules/weather.sh",
        "exec-if": "ping wttr.in -c1"
    },
    "custom/pacman": {
        "format": "<big>􏆲</big>  {}",
        "interval": 3600,                     // every hour
        "exec": "checkupdates | wc -l",       // # of updates
        "exec-if": "exit 0",                  // always run; consider advanced run conditions
        "on-click": "alacritty -e 'paru'; pkill -SIGRTMIN+8 waybar", // update system
        "signal": 8,
        "max-length": 5,
        "min-length": 3
    },
    "window": {
        "format": "{title}", // Sadece pencere başlığını göster
        "empty-window-text": "" // Pencere yoksa hiçbir şey gösterme
    },
 
    "custom/media": {
        "format": "{icon} {}",
        "return-type": "json",
        "max-length": 40,
        "format-icons": {
            "spotify": "",
            "default": "🎜"
        },
        "escape": true,
        "exec": "python /etc/xdg/waybar/mediaplayer.py" // Script in resources folder
        // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
    },

    "custom/power": {
        "format": "",
        "tooltip": false,
        "on-click": "wlogout"
    },

    "clock": {
        "format": "  {:%H:%M   %e %b}",
        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
        "today-format": "<b>{}</b>"
    },

    "clock#date": {
        "format": "{:%H:%M  %e %b}", // Icon: calendar-alt
        //"format": "{:%I:%M %p  %A %b %d}",
        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
        "today-format": "<b>{}</b>"
    },

    "cpu": {
        "interval": 1,
        "format": "   {max_frequency}GHz <span color=\"darkgray\">| {usage}%</span>",
        "max-length": 15,
        "min-length": 15
    },

    "mpd": {
        "max-length": 25,
        "format": "<span foreground='#bb9af7'></span> {title}",
        "format-paused": " {title}",
        "format-stopped": "<span foreground='#bb9af7'></span>",
        "format-disconnected": "",
        "on-click": "mpc --quiet toggle",
        "on-click-right": "mpc update; mpc ls | mpc add",
        "on-click-middle": "alacritty -e ncmpcpp",
        "on-scroll-up": "mpc --quiet prev",
        "on-scroll-down": "mpc --quiet next",
        "smooth-scrolling-threshold": 5,
        "tooltip-format": "{title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%H:%M:%S})"
    },

    "custom/title": {
        "format": "{}",
        "interval": 0,
        "return-type": "json",
        //"max-length": 35,
        "tooltip": false
    },

    "custom/title#name": {
        "format": "{}",
        "interval": 0,
        "return-type": "json",

        "max-length": 35,
        "exec": "$HOME/.scripts/title"
    },

    /*"custom/keyboard": {
        "format": " {}",
        "interval": 1,
        "exec": "$HOME/.config/waybar/get_kbdlayout.sh"
    },*/

    "wlr/workspaces": {
        "on-click": "activate",
        "format": "{icon}"
    },

    "pulseaudio": {
        "scroll-step": 3, // %, can be a float
        "format": "{icon} {volume}% {format_source}",
        "format-bluetooth": "{volume}% {format_source}",
        "format-bluetooth-muted": " {icon} {format_source}",
        "format-muted": " {format_source}",
    "ignored-sinks": ["Easy Effects Sink"],
    "max-volume": 150,
        //"format-source": "{volume}% ",
        //"format-source-muted": "",
        "format-source": "",
        "format-source-muted": "",
        "format-icons": {
            //"headphone": "",
            "hands-free": "",
            "headset": "",
            "phone": "",
            "portable": "",
            "car": "",
           // "default": ["", "", ""]
        },
        "on-click": "pavucontrol",
        "on-click-middle": "pulseaudio-control --node-blacklist 'easyeffects_sink' next-node",
        "on-click-right": "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
    },

    "tray": {
        "icon-size": 15,
        "spacing": 5
    }
}

Kod:
* {
  /* `otf-font-awesome` is required to be installed for icons */
  font-family: AdwaitaSans;
  font-size: 11px;
  font-weight: 700;
  margin: 0;
  padding: 0;
  transition-property: background-color;
  transition-duration: 0.5s;
}


/* Reset all styles */
* {
    border: none;
    border-radius: 3px;
    min-height: 0;
    margin: 0.2em 0.3em 0.2em 0.3em;
}

/* The whole bar */
#waybar {
    /*background: @bg;*/
    background-color: transparent;
    /*color: @light;*/
    color: #ffffff;
    transition-property: background-color;
    transition-duration: 0.5s;
    /*border-top: 8px transparent;*/
    border-radius: 0px;
    margin: 0px 0px;
}

window#waybar.hidden {
  opacity: 0.2;
}

#workspaces button {
  padding: 0 0px;
  color: #7984a4;
  background-color: transparent;
  /* Use box-shadow instead of border so the text isn't offset */
  box-shadow: inset 0 -3px transparent;
  /* Avoid rounded borders under each workspace name */
  border: none;
  border-radius: 0;
}

#workspaces button.focused {
  background-color: transparent;
}
#workspace button.hover {
  background-color: transparent;
}
#workspaces button.active {
  color: #fff;
}

#workspaces button.urgent {
  background-color: #eb4d4b;
}

#window {
  /* border-radius: 20px; */
  /* padding-left: 10px; */
  /* padding-right: 10px; */
  color: #64727d;
}

/* Each module */
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#custom-screenshot_t,
#tray,
#mode,
#idle_inhibitor,
#mpd,
#bluetooth,
#custom-hyprPicker,
#custom-power-menu,
#custom-spotify,
#custom-weather,
#custom-weather.severe,
#custom-weather.sunnyDay,
#custom-weather.clearNight,
#custom-weather.cloudyFoggyDay,
#custom-weather.cloudyFoggyNight,
#custom-weather.rainyDay,
#custom-weather.rainyNight,
#custom-weather.showyIcyDay,
#custom-weather.snowyIcyNight,
#custom-weather.default {
  padding: 0px 15px;
  color: #e5e5e5;
  /* color: #bf616a; */
  border-radius: 20px;
  background-color: #1e1e1e;
}

#window {
  color:#ffffff;
  background-color: #1e1e1e;
  border-radius: 20px;
  padding: 0px 10px;
}

#window.empty {
  background-color:#000000
}

#workspaces {
  border-radius: 20px;
  padding: 0px 10px;
  background-color: #1e1e1e;
}

#cpu {
  color: #fb958b;
  background-color: #1e1e1e;
}

#memory {
  color: #ebcb8b;
  background-color: #1e1e1e;
}

#custom-power-menu {
  border-radius: 9.5px;
  background-color: #1b242b;
  border-radius: 7.5px;
  padding: 0 0px;
}

#custom-launcher {
  background-color: #1b242b;
  color: #6a92d7;
  border-radius: 7.5px;
  padding: 0 0px;
}

#custom-weather.severe {
  color: #eb937d;
}

#custom-weather.sunnyDay {
  color: #c2ca76;
}

#custom-weather.clearNight {
  color: #cad3f5;
}

#custom-weather.cloudyFoggyDay,
#custom-weather.cloudyFoggyNight {
  color: #c2ddda;
}

#custom-weather.rainyDay,
#custom-weather.rainyNight {
  color: #5aaca5;
}

#custom-weather.showyIcyDay,
#custom-weather.snowyIcyNight {
  color: #d6e7e5;
}

#custom-weather.default {
  color: #dbd9d8;
}

/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
  margin-left: 0;
}

/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
  margin-right: 0;
}

#pulseaudio {
  color: #7d9bba;
}

#backlight {
  /* color: #EBCB8B; */
  color: #8fbcbb;
}

#clock {
  color: #c8d2e0;
  /* background-color: #14141e; */
}

#battery {
  color: #c0caf5;
  /* background-color: #90b1b1; */
}

#battery.charging,
#battery.full,
#battery.plugged {
  color: #26a65b;
  /* background-color: #26a65b; */
}

@keyframes blink {
  to {
    background-color: rgba(30, 34, 42, 0.5);
    color: #abb2bf;
  }
}

#battery.critical:not(.charging) {
  color: #f53c3c;
  animation-name: blink;
  animation-duration: 0.5s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

label:focus {
  background-color: #000000;
}

#disk {
  background-color: #964b00;
}

#bluetooth {
  color: #707d9d;
}

#bluetooth.disconnected {
  color: #f53c3c;
}

#network {
  color: #b48ead;
}

#network.disconnected {
  color: #f53c3c;
}

#custom-media {
  background-color: #66cc99;
  color: #2a5c45;
  min-width: 100px;
}

#custom-media.custom-spotify {
  background-color: #66cc99;
}

#custom-media.custom-firefox {
  background-color: #66cc99;
}

#custom-media.custom-vlc {
  background-color: #ffa000;
}

#temperature {
  background-color: #f0932b;
}

#temperature.critical {
  background-color: #eb4d4b;
}

#tray > .passive {
  -gtk-icon-effect: dim;
}

#tray > .needs-attention {
  -gtk-icon-effect: highlight;
  background-color: #eb4d4b;
}

#idle_inhibitor {
  background-color: #2d3436;
}

#idle_inhibitor.activated {
  background-color: #ecf0f1;
  color: #2d3436;
}

#language {
  background: #00b093;
  color: #740864;
  padding: 0 0px;
  margin: 0 5px;
  min-width: 16px;
}

#keyboard-state {
  background: #97e1ad;
  color: #000000;
  padding: 0 0px;
  margin: 0 5px;
  min-width: 16px;
}

#keyboard-state > label {
  padding: 0 0px;
}

#keyboard-state > label.locked {
  background: rgba(0, 0, 0, 0.2);
}

Çözüm: config dosyasına şu satırı ekledim:

Kod:
"hyprland/window": {
    "format": "{title}"
},

style.css dosyasına ise şu satırı:

Kod:
window#waybar.empty #window{
  opacity: 0;
}
 
Son düzenleme:

Technopat Haberler

Yeni konular

Geri
Yukarı