Skip to content

Commit

Permalink
feat: waybar animation overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Oct 16, 2023
1 parent ea3b51e commit d5ebfc3
Show file tree
Hide file tree
Showing 3 changed files with 155 additions and 23 deletions.
110 changes: 109 additions & 1 deletion modules/home/desktop/addons/waybar/default-modules.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,33 @@
""
]
},
"pulseaudio": {
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon}",
"format-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": [
"",
""
]
},
"scroll-step": 1,
"on-click": "pavucontrol",
"ignored-sinks": [
"Easy Effects Sink"
]
},
"pulseaudio/slider": {
"min": 0,
"max": 100,
"orientation": "horizontal"
},
"custom/media": {
"format": "{icon} {}",
"return-type": "json",
Expand All @@ -131,6 +158,26 @@
"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/quit": {
"format": "󰗼",
"tooltip": false,
"on-click": "hyprctl dispatch exit"
},
"custom/lock": {
"format": "󰍁",
"tooltip": false,
"on-click": "swaylock"
},
"custom/reboot": {
"format": "󰜉",
"tooltip": false,
"on-click": "reboot"
},
"custom/power": {
"format": "",
"tooltip": false,
"on-click": "shutdown now"
},
"custom/separator-right": {
"format": "",
"tooltip": false
Expand All @@ -139,6 +186,30 @@
"format": "",
"tooltip": false
},
"custom/ellipses": {
"format": "",
"tooltip": false
},
"group/group-power": {
"orientation": "horizontal",
"drawer": {
"transition-duration": 500,
"children-class": "not-power",
"transition-left-to-right": false
},
"modules": [
"custom/wlogout",
"custom/quit",
"custom/lock",
"custom/reboot"
]
},
"group/tray": {
"orientation": "horizontal",
"modules": [
"tray"
]
},
"group/stats": {
"orientation": "horizontal",
"modules": [
Expand All @@ -149,14 +220,51 @@
"temperature"
]
},
"group/audio": {
"orientation": "horizontal",
"drawer": {
"transition-duration": 500,
"transition-left-to-right": false
},
"modules": [
"pulseaudio",
"pulseaudio/slider"
]
},
"group/tray-drawer": {
"orientation": "horizontal",
"drawer": {
"transition-duration": 500,
"transition-left-to-right": true
},
"modules": [
"custom/separator-right",
"tray"
]
},
"group/stats-drawer": {
"orientation": "horizontal",
"drawer": {
"transition-duration": 500,
"transition-left-to-right": false
},
"modules": [
"custom/separator-right",
"network",
"cpu",
"memory",
"disk",
"temperature"
]
},
"group/notifications": {
"orientation": "horizontal",
"modules": [
"idle_inhibitor",
// "custom/updates",
"custom/notification",
"custom/github",
"wireplumber"
"group/audio"
]
},
"wlr/workspaces": {
Expand Down
48 changes: 26 additions & 22 deletions modules/home/desktop/addons/waybar/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ let
"active-only" = "false";
"on-scroll-up" = "${getExe' hyprland.packages.${system}.hyprland "hyprctl"} dispatch workspace e+1";
"on-scroll-down" = "${getExe' hyprland.packages.${system}.hyprland "hyprctl"} dispatch workspace e-1";
"format" = "{icon}";
"format" = "{name} > {windows}";
"format-icons" = {
"1" = "";
"2" = "";
Expand Down Expand Up @@ -103,25 +103,27 @@ let
# "format-window-separator" = "->";
"window-rewrite-default" = "";
"window-rewrite" = {
"1Password" = "󰢁";
"Caprine" = "󰈎";
"Github Desktop" = "󰊤";
"Godot" = "";
"Mysql-workbench-bin" = "";
"Slack" = "󰒱";
"code" = "󰨞";
"class<1Password>" = "󰢁";
"class<Caprine>" = "󰈎";
"class<Github Desktop>" = "󰊤";
"class<Godot>" = "";
"class<Mysql-workbench-bin>" = "";
"class<Slack>" = "󰒱";
"class<code>" = "󰨞";
"code-url-handler" = "󰨞";
"discord" = "󰙯";
"firefox" = "";
"kitty" = "";
"mediainfo-gui" = "󱂷";
"org.kde.digikam" = "󰄄";
"org.telegram.desktop" = "";
".pitivi-wrapped" = "󱄢";
"steam" = "";
"thunderbird" = "";
"virt-manager" = "󰢹";
"vlc" = "󰕼";
"class<discord>" = "󰙯";
"class<firefox>" = "";
"class<firefox> title<.*github.*>" = "";
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" = "";
"class<kitty>" = "";
"class<mediainfo-gui>" = "󱂷";
"class<org.kde.digikam>" = "󰄄";
"class<org.telegram.desktop>" = "";
"class<.pitivi-wrapped>" = "󱄢";
"class<steam>" = "";
"class<thunderbird>" = "";
"class<virt-manager>" = "󰢹";
"class<vlc>" = "󰕼";
};
};

Expand Down Expand Up @@ -164,13 +166,13 @@ in
"margin-right" = 20;
# "modules-center" = [ "mpris" ];
"modules-left" = [
"custom/wlogout"
"group/group-power"
"hyprland/workspaces"
"custom/separator-left"
"hyprland/window"
];
"modules-right" = [
"tray"
"group/tray"
"custom/separator-right"
"group/stats"
"custom/separator-right"
Expand All @@ -190,12 +192,14 @@ in
"margin-right" = 20;
"modules-center" = [ ];
"modules-left" = [
"custom/wlogout"
"group/group-power"
"hyprland/workspaces"
"custom/separator-left"
"hyprland/window"
];
"modules-right" = [
"group/tray-drawer"
"group/stats-drawer"
"idle_inhibitor"
"custom/weather"
"clock"
Expand Down
20 changes: 20 additions & 0 deletions modules/home/desktop/addons/waybar/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,23 @@ window.DP-3 #workspaces {
color: #000000;
}
}

#pulseaudio-slider slider {
min-height: 0px;
min-width: 0px;
opacity: 0;
background-image: none;
border: none;
box-shadow: none;
}
#pulseaudio-slider trough {
min-height: 10px;
min-width: 80px;
border-radius: 5px;
background-color: @base;
}
#pulseaudio-slider highlight {
min-width: 10px;
border-radius: 5px;
background-color: @green;
}

0 comments on commit d5ebfc3

Please sign in to comment.