diff --git a/2configs/gui/hyprland/autostart.nix b/2configs/gui/hyprland/autostart.nix index 2b8d5e5..b0c63db 100644 --- a/2configs/gui/hyprland/autostart.nix +++ b/2configs/gui/hyprland/autostart.nix @@ -4,8 +4,8 @@ let in { services.displayManager.sddm.enable = true; services.displayManager.sddm.wayland.enable = true; - services.displayManager.autoLogin = { - enable = true; - user = mainUser; - }; + #services.displayManager.autoLogin = { + # enable = true; + # user = mainUser; + #}; } diff --git a/2configs/gui/hyprland/default.nix b/2configs/gui/hyprland/default.nix index 63c9007..49046e4 100644 --- a/2configs/gui/hyprland/default.nix +++ b/2configs/gui/hyprland/default.nix @@ -11,25 +11,19 @@ in { # autostart programs.hyprland.enable = true; - programs.hyprland.package = pkgs.hyprland.overrideAttrs { - src = pkgs.fetchFromGitHub { - owner = "hyprwm"; - repo = "Hyprland"; - fetchSubmodules = true; - rev = "v0.41.1"; - hash = "sha256-hLnnNBWP1Qjs1I3fndMgp8rbWJruxdnGTq77A4Rv4R4="; - }; - }; programs.hyprland.xwayland.enable = true; - programs.hyprlock.enable = true; + # hyprlock and hypridle should be started by home-manager + # programs.hyprlock.enable = true; # automatically enabled by programs.hyprlock - # services.hypridle.enable = true; - # security.pam.services.hyprlock = {}; + #services.hypridle.enable = true; + security.pam.services.hyprlock = {}; environment.systemPackages = [ pkgs.brightnessctl ]; home-manager.users.${mainUser} = { + xdg.configFile."waybar/config.jsonc".source = ./waybar.jsonc; + home.sessionVariables.NIXOS_OZONE_WL = "1"; home.packages = with pkgs; [ dolphin wofi @@ -51,11 +45,11 @@ in { path = "screenshot"; blur_passes = 3; blur_size = 8; - } - ]; + } + ]; - input-field = [ - { + input-field = [ + { size = "200, 50"; position = "0, -80"; monitor = ""; @@ -67,85 +61,215 @@ in { outline_thickness = 5; placeholder_text = ''Password...''; shadow_passes = 2; - } - ]; - }; + } + ]; + }; - services.hypridle = { - enable = true; - settings = { - general = { + services.hypridle = { + enable = true; + settings = { + general = { ignore_dbus_inhibit = false; before_sleep_cmd = "loginctl lock-session"; after_sleep_cmd = "hyprctl dispatch dpms on"; + # what to do when `loginctl lock-session` sends dbus lock event lock_cmd = "pidof hyprlock || hyprlock"; - }; + }; - listener = [ + listener = [ { - timeout = 150; - on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";# turn off keyboard backlight. - on-resume = "brightnessctl -rd rgb:kbd_backlight"; # turn on keyboard backlight. + timeout = 600; + on-timeout = "loginctl lock-session"; } { - timeout = 600; - on-timeout = "loginctl lock-session"; + timeout = 630; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; } { - timeout = 630; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; + timeout = 1800; + on-timeout = "systemctl suspend"; } - { - timeout = 1800; - on-timeout = "systemctl suspend"; - } - ]; - }; - }; - programs.waybar.enable = true; - # programs.waybar.systemd.enable = true; + ]; + }; + }; + # waybar + programs.waybar.enable = true; + programs.waybar.package = pkgs.waybar.overrideAttrs (oldAttrs: { + mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; + }); + programs.waybar.systemd.enable = true; + # network-manager applet services.network-manager-applet.enable = true; + services.blueman-applet.enable = true; + services.copyq.enable = true; home.pointerCursor = { - gtk.enable = true; + gtk.enable = true; # x11.enable = true; package = pkgs.bibata-cursors; name = "Bibata-Modern-Classic"; size = 16; - }; + }; - wayland.windowManager.hyprland = { - #enable = true; + wayland.windowManager.hyprland = { + enable = true; # extraConfig = builtins.readFile ./hyprland.conf; - # xwayland.enable = true; - # systemd.enable = true; + xwayland.enable = true; + systemd.enable = true; + systemd.variables = ["--all"]; + settings = { + monitor = [ + "eDP-1,1920x1080,0x0,1.0" + ",preferred,auto,1.0" + "desc:LG Electronics LG HDR 4K 0x00016601,preferred,auto,2" + "desc:LG Electronics LG HDR 4K 0x0009DD88,preferred,auto,2" + ]; + xwayland = { + force_zero_scaling = true; + }; + "$terminal" = "kitty"; + "$fileManager" = "pcmanfm"; + "$menu" = "wofi --show drun"; + exec-once = [ + #"nm-applet" + # "waybar" + #"blueman-applet" + #"copyq --start-server" + ]; + env = [ + "XCURSOR_SIZE,18" + "HYPRCURSOR_SIZE,18" + ]; + general = { + gaps_in = 1; + gaps_out = 1; + border_size = 1; + "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; + "col.inactive_border" = "rgba(595959aa)"; + resize_on_border = false; + allow_tearing = false; + layout = "dwindle"; + }; + decoration = { + rounding = 0; - # settings = { - # bind = - # [ - # "SUPER , F, exec, firefox" - # "SUPER SHIFT, c, killactive" - # ", Print, exec, grimblast copy area" - # ] - # ++ ( - # # workspaces - # # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - # builtins.concatLists (builtins.genList ( - # x: let # 1..10 - # ws = let - # c = (x + 1) / 10; - # in - # builtins.toString (x + 1 - (c * 10)); - # in [ - # "SUPER, ${ws}, workspace, ${toString (x + 1)}" - # "SUPER SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - # ] - # ) - # 10) - # ); - #}; - }; - }; - } + # Change transparency of focused and unfocused windows + active_opacity = 1.0; + inactive_opacity = 1.0; + + drop_shadow = false; + shadow_range = 4; + shadow_render_power = 3; + "col.shadow" = "rgba(1a1a1aee)"; + + blur = { + enabled = true; + size = 3; + passes = 1; + vibrancy = 0.1696; + }; + }; + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.05, 0.05, 1.05"; + animation = [ + "windows, 1, 1.1, myBezier" + "windowsOut, 1, 1.1, default, popin 80%" + "border, 1, 1.0, default" + "borderangle, 1, 1, default" + "fade, 1, 1, default" + "workspaces, 1, 1, default" + ]; + }; + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + dwindle = { + pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true; # You probably want this + }; + misc = { + force_default_wallpaper = -1; + disable_hyprland_logo = true; + }; + input = { + kb_layout = "us"; + kb_variant = "altgr-intl"; + kb_model = ""; + kb_options = ""; + kb_rules = ""; + follow_mouse = 1; + + sensitivity = 0; # -1.0 - 1.0, 0 means no modification. + + touchpad = { + natural_scroll = false; + }; + }; + gestures = { + workspace_swipe = true; + }; + "$mainMod" = "SUPER"; + bind = [ + "$mainMod, Return, exec, $terminal" + "$mainMod SHIFT, C, killactive," + "$mainMod ,F, fullscreen,0" + "$mainMod, M, exit," + "$mainMod, E, exec, $fileManager" + "$mainMod, V, togglefloating," + "$mainMod, R, exec, $menu" + "$mainMod, P, pseudo, # dwindle" + "$mainMod, J, togglesplit, # dwindle" + "$mainMod, L, exec, hyprlock" + + # Move focus with mainMod + arrow keys + "$mainMod, left, movefocus, l" + "$mainMod, right, movefocus, r" + "$mainMod, up, movefocus, u" + "$mainMod, down, movefocus, d" + + # Switch workspaces with mainMod + [0-9] + "$mainMod, 1, workspace, 1" + "$mainMod, 2, workspace, 2" + "$mainMod, 3, workspace, 3" + "$mainMod, 4, workspace, 4" + "$mainMod, 5, workspace, 5" + "$mainMod, 6, workspace, 6" + "$mainMod, 7, workspace, 7" + "$mainMod, 8, workspace, 8" + "$mainMod, 9, workspace, 9" + "$mainMod, 0, workspace, 10" + + # Move active window to a workspace with mainMod + SHIFT + [0-9] + "$mainMod SHIFT, 1, movetoworkspace, 1" + "$mainMod SHIFT, 2, movetoworkspace, 2" + "$mainMod SHIFT, 3, movetoworkspace, 3" + "$mainMod SHIFT, 4, movetoworkspace, 4" + "$mainMod SHIFT, 5, movetoworkspace, 5" + "$mainMod SHIFT, 6, movetoworkspace, 6" + "$mainMod SHIFT, 7, movetoworkspace, 7" + "$mainMod SHIFT, 8, movetoworkspace, 8" + "$mainMod SHIFT, 8, movetoworkspace, 8" + "$mainMod SHIFT, 9, movetoworkspace, 9" + "$mainMod SHIFT, 10, movetoworkspace, 10" + # screenshot + "$mainMod, Print, exec, grimblast --notify --cursor save area ~/shots/$(date +'%Y-%m-%d-At-%Ih%Mm%Ss').png" + ",Print, exec, grimblast --notify --cursor copy area" + ]; + bindm = [ + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + bindel= [ + ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@5%-" + ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ]; + bindl= ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + windowrulev2 = "suppressevent maximize, class:.*"; + debug = { + disable_logs = false; + }; + }; + }; + }; +} diff --git a/2configs/gui/hyprland/hyprland.conf b/2configs/gui/hyprland/hyprland.conf deleted file mode 100644 index 49d4520..0000000 --- a/2configs/gui/hyprland/hyprland.conf +++ /dev/null @@ -1,265 +0,0 @@ -autogenerated = 0 # remove this line to remove the warning - -# This is an example Hyprland config file. -# Refer to the wiki for more information. -# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ - -# Please note not all available settings / options are set here. -# For a full list, see the wiki - -# You can split this configuration into multiple files -# Create your files separately and then link them to this file like this: -# source = ~/.config/hypr/myColors.conf - - -################ -### MONITORS ### -################ - -# See https://wiki.hyprland.org/Configuring/Monitors/ -# -# do not scale -monitor=,preferred,auto,1.0 - -# automatic scaling (1.25) -# monitor=,preferred,auto,auto - - -################### -### MY PROGRAMS ### -################### - -# See https://wiki.hyprland.org/Configuring/Keywords/ - -# Set programs that you use -$terminal = kitty -$fileManager = dolphin -$menu = wofi --show drun - - -################# -### AUTOSTART ### -################# - -# Autostart necessary processes (like notifications daemons, status bars, etc.) -# Or execute your favorite apps at launch like this: - -# exec-once = $terminal -exec-once = nm-applet & hypridle & waybar & blueman-applet & copyq --start-server & -# exec-once = waybar & hyprpaper & firefox - - -############################# -### ENVIRONMENT VARIABLES ### -############################# - -# See https://wiki.hyprland.org/Configuring/Environment-variables/ - -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 - - -##################### -### LOOK AND FEEL ### -##################### - -# Refer to https://wiki.hyprland.org/Configuring/Variables/ - -# https://wiki.hyprland.org/Configuring/Variables/#general -general { - - gaps_in = 1 - gaps_out = 1 - - border_size = 1 - - # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - col.inactive_border = rgba(595959aa) - - # Set to true enable resizing windows by clicking and dragging on borders and gaps - resize_on_border = false - - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on - allow_tearing = false - - layout = dwindle -} - -# https://wiki.hyprland.org/Configuring/Variables/#decoration -decoration { - rounding = 0 - - # Change transparency of focused and unfocused windows - active_opacity = 1.0 - inactive_opacity = 1.0 - - drop_shadow = false - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) - - # https://wiki.hyprland.org/Configuring/Variables/#blur - blur { - enabled = true - size = 3 - passes = 1 - - vibrancy = 0.1696 - } -} - -# https://wiki.hyprland.org/Configuring/Variables/#animations -animations { - enabled = true - - # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more - - bezier = myBezier, 0.05, 0.05, 0.05, 1.05 - - animation = windows, 1, 1.1, myBezier - animation = windowsOut, 1, 1.1, default, popin 80% - animation = border, 1, 1.0, default - animation = borderangle, 1, 1, default - animation = fade, 1, 1, default - animation = workspaces, 1, 1, default -} - -# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more -dwindle { - pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = true # You probably want this -} - -# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more -master { - new_is_master = true -} - -# https://wiki.hyprland.org/Configuring/Variables/#misc -misc { - force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( -} - - -############# -### INPUT ### -############# - -# https://wiki.hyprland.org/Configuring/Variables/#input -input { - kb_layout = us - kb_variant = altgr-intl - kb_model = - kb_options = - kb_rules = - - follow_mouse = 1 - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - touchpad { - natural_scroll = false - } -} - -# https://wiki.hyprland.org/Configuring/Variables/#gestures -gestures { - workspace_swipe = true -} - -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more -device { - name = epic-mouse-v1 - sensitivity = -0.5 -} - - -#################### -### KEYBINDINGSS ### -#################### - -# See https://wiki.hyprland.org/Configuring/Keywords/ -$mainMod = SUPER # Sets "Windows" key as main modifier - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, Return, exec, $terminal -bind = $mainMod SHIFT, C, killactive, -bind = $mainMod ,F, fullscreen,0 -bind = $mainMod, M, exit, -bind = $mainMod, E, exec, $fileManager -bind = $mainMod, V, togglefloating, -bind = $mainMod, R, exec, $menu -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, J, togglesplit, # dwindle -bind = $mainMod, L, exec, hyprlock - -# Move focus with mainMod + arrow keys -bind = $mainMod, left, movefocus, l -bind = $mainMod, right, movefocus, r -bind = $mainMod, up, movefocus, u -bind = $mainMod, down, movefocus, d - -# Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, workspace, 1 -bind = $mainMod, 2, workspace, 2 -bind = $mainMod, 3, workspace, 3 -bind = $mainMod, 4, workspace, 4 -bind = $mainMod, 5, workspace, 5 -bind = $mainMod, 6, workspace, 6 -bind = $mainMod, 7, workspace, 7 -bind = $mainMod, 8, workspace, 8 -bind = $mainMod, 9, workspace, 9 -bind = $mainMod, 0, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 - -# Toggle special workspace (scratchpad) similar to guake -bind = $mainMod, S, togglespecialworkspace, magic -bind = $mainMod SHIFT, S, movetoworkspace, special:magic - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainMod, mouse_down, workspace, e+1 -bind = $mainMod, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - -# Media Keys - -bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -bindel=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle - -# screenshot -bind = $mainMod, Print, exec, grimblast --notify --cursor save area ~/shots/$(date +'%Y-%m-%d-At-%Ih%Mm%Ss').png -bind = ,Print, exec, grimblast --notify --cursor copy area - - -############################## -### WINDOWS AND WORKSPACES ### -############################## - -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules - -# Example windowrule v1 -# windowrule = float, ^(kitty)$ - -# Example windowrule v2 -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ - -windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. diff --git a/2configs/gui/hyprland/waybar.jsonc b/2configs/gui/hyprland/waybar.jsonc new file mode 100644 index 0000000..56a5042 --- /dev/null +++ b/2configs/gui/hyprland/waybar.jsonc @@ -0,0 +1,217 @@ +// -*- mode: jsonc -*- +{ + // "layer": "top", // Waybar at top layer + // "position": "bottom", // Waybar position (top|bottom|left|right) + "height": 30, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 4, // Gaps between modules (4px) + // Choose the order of the modules + "hyprland/workspaces": { + "format": "{icon}", + "on-scroll-up": "hyprctl dispatch workspace e+1", + "on-scroll-down": "hyprctl dispatch workspace e-1", + "disable-scroll": true, + "all-outputs": true, + "warp-on-scroll": false, + "format": "{name}: {icon}", + "format-icons": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "urgent": "", + "focused": "", + "default": "" + } + }, + "modules-left": [ + "hyprland/workspaces", + "hyprland/mode", + "hyprland/scratchpad", + "custom/media" + ], + "modules-center": [ + "hyprland/window" + ], + "modules-right": [ + "mpd", + "idle_inhibitor", + "pulseaudio", + "network", + "power-profiles-daemon", + "cpu", + "memory", + "temperature", + "backlight", + "keyboard-state", + "hyprland/language", + "battery", + "battery#bat2", + "clock", + "tray", + "custom/power" + ], + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "hyprland/mode": { + "format": "<span style=\"italic\">{}</span>" + }, + "hyprland/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "mpd": { + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", + "format-disconnected": "Disconnected ", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", + "unknown-tag": "N/A", + "interval": 5, + "consume-icons": { + "on": " " + }, + "random-icons": { + "off": "<span color=\"#f53c3c\"></span> ", + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", + "format-alt": "{:%Y-%m-%d}" + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + "memory": { + "format": "{}% " + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""] + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-full": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "battery#bat2": { + "bat": "BAT2" + }, + "power-profiles-daemon": { + "format": "{icon}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, + "format-icons": { + "default": "", + "performance": "", + "balanced": "", + "power-saver": "" + } + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // 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, + "menu": "on-click", + "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder + "menu-actions": { + "shutdown": "shutdown", + "reboot": "reboot", + "suspend": "systemctl suspend", + "hibernate": "systemctl hibernate" + } + } +}