add swww and pywal

This commit is contained in:
Benjamin Palko 2024-03-22 16:05:37 -05:00
parent 076fe3ab81
commit 7798e8360c
19 changed files with 604 additions and 51 deletions

3
.zshrc
View file

@ -10,6 +10,9 @@ export ZSH="$HOME/.oh-my-zsh"
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell" ZSH_THEME="robbyrussell"
# Load pywal palette
cat ~/.cache/wal/sequences
# Set list of themes to pick from when loading at random # Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load # Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/ # a theme from this variable instead of looking in $ZSH/themes/

11
hypr/config/startup.conf Normal file
View file

@ -0,0 +1,11 @@
# Notification Daemon
exec-once = swaync
# Idle Daemon
exec-once = hypridle
# Status-bar
exec-once = bash ~/.config/hypr/scripts/start-waybar.sh
# Emotes
exec-once = emote
# Wallpaper Daemon
exec-once = swww init

View file

@ -19,8 +19,10 @@ monitor=,preferred,auto,auto
# Execute your favorite apps at launch # Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox # exec-once = waybar & hyprpaper & firefox
source = ~/.config/hypr/config/startup.conf
exec-once = hypridle & waybar & emote # PyWal Colors
source = ~/.cache/wal/colors-hyprland.conf
# Source a file (multi-file configs) # Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf # source = ~/.config/hypr/myColors.conf
@ -61,8 +63,8 @@ general {
gaps_in = 5 gaps_in = 5
gaps_out = 20 gaps_out = 20
border_size = 2 border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.active_border = $color4 $color13 45deg
col.inactive_border = rgba(595959aa) col.inactive_border = $color0
layout = dwindle layout = dwindle

View file

@ -0,0 +1,12 @@
#!/bin/bash
CONFIG_FILES="$HOME/.config/waybar/ $HOME/.cache/wal/"
trap "killall waybar" EXIT
while true; do
sleep 0.4
waybar &
inotifywait -e create,modify -r $CONFIG_FILES
killall waybar
done

100
swaync/config.json Normal file
View file

@ -0,0 +1,100 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"positionX": "center",
"positionY": "top",
"layer": "overlay",
"control-center-layer": "right",
"layer-shell": true,
"cssPriority": "application",
"control-center-margin-top": 5,
"control-center-margin-bottom": 0,
"control-center-margin-right": 0,
"control-center-margin-left": 0,
"notification-2fa-action": true,
"notification-inline-replies": false,
"notification-icon-size": 24,
"notification-body-image-height": 100,
"notification-body-image-width": 200,
"timeout": 6,
"timeout-low": 3,
"timeout-critical": 0,
"fit-to-screen": false,
"control-center-width": 350,
"control-center-height": 720,
"notification-window-width": 400,
"keyboard-shortcuts": true,
"image-visibility": "when available",
"transition-time": 200,
"hide-on-clear": false,
"hide-on-action": true,
"script-fail-notify": true,
"widgets": [
"dnd",
"buttons-grid",
"mpris",
"volume",
"backlight",
"title",
"notifications"
],
"widget-config": {
"title": {
"text": "Notifications",
"clear-all-button": true,
"button-text": "Clear"
},
"dnd": {
"text": "Do Not Disturb"
},
"label": {
"max-lines": 1,
"text": "Notification"
},
"mpris": {
"image-size": 10,
"image-radius": 0
},
"volume": {
"label": "󰕾"
},
"backlight": {
"label": "󰃟"
},
"buttons-grid": {
"actions": [
{
"label": "󰐥",
"command": "systemctl poweroff"
},
{
"label": "󰜉",
"command": "systemctl reboot"
},
{
"label": "󰌾",
"command": "~/.config/hypr/scripts/LockScreen.sh"
},
{
"label": "󰍃",
"command": "hyprctl dispatch exit"
},
{
"label": "󰀝",
"command": "~/.config/hypr/scripts/AirplaneMode.sh"
},
{
"label": "󰕾",
"command": "pactl set-sink-mute @DEFAULT_SINK@ toggle"
},
{
"label": "󰍬",
"command": "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
},
{
"label": "󰂯",
"command": "blueman-manager"
}
]
}
}
}

348
swaync/style.css Normal file
View file

@ -0,0 +1,348 @@
/* ----------- 💫 https://github.com/JaKooLit 💫 -------- */
@import url("~/.cache/wal/colors.css")
@define-color noti-border-color @color2;
@define-color noti-bg rgba(0, 0, 0, 0.8);
@define-color noti-bg-alt #111111;
@define-color noti-bg-hover @color2;
@define-color text-color @color2;
@define-color text-color-alt @color7;
@define-color text-color-disabled rgba(150, 150, 150, 0.8);
* {
font-family: FiraCode;
font-weight: Bolder;
}
.control-center .notification-row:focus,
.control-center .notification-row:hover {
opacity: 1;
background: @noti-bg;
border-radius: 10px;
}
.notification-row {
outline: none;
margin: 0px;
}
.notification {
border-radius: 10px;
}
.notification-content {
color: @text-color;
background: @noti-bg;
padding: 3px 10px 3px 6px;
border-radius: 10px;
border: 2px solid @noti-border-color;
margin: 0px;
}
.notification-default-action {
margin: 0;
padding: 0;
border-radius: 10px;
}
.close-button {
background: #f7768e;
color: @noti-bg;
text-shadow: none;
padding: 0;
border-radius: 10px;
margin-top: 5px;
margin-right: 5px;
}
.close-button:hover {
box-shadow: none;
background: #f7768e;
transition: all 0.15s ease-in-out;
border: none;
}
.notification-action {
border: 2px solid @noti-border-color;
border-top: none;
border-radius: 10px;
}
.notification-default-action:hover,
.notification-action:hover {
color: @text-color;
background: @color1;
}
.notification-default-action {
border-radius: 10px;
margin: 5px;
}
.notification-default-action:not(:only-child) {
border-bottom-left-radius: 7px;
border-bottom-right-radius: 7px;
}
.notification-action:first-child {
border-bottom-left-radius: 10px;
background: #1b1b2b;
}
.notification-action:last-child {
border-bottom-right-radius: 10px;
background: #1b1b2b;
}
.inline-reply {
margin-top: 8px;
}
.inline-reply-entry {
background: @noti-bg;
color: @text-color;
caret-color: @text-color;
border: 1px solid @noti-border-color;
border-radius: 10px;
}
.inline-reply-button {
font-size: 0.5rem;
margin-left: 4px;
background: @noti-bg;
border: 1px solid @noti-border-color;
border-radius: 10px;
color: @text-color;
}
.inline-reply-button:disabled {
background: initial;
color: @text-color-disabled;
border: 1px solid transparent;
}
.inline-reply-button:hover {
background: @noti-bg-hover;
}
.body-image {
margin-top: 6px;
color: @text-color-alt;
border-radius: 10px;
}
.summary {
font-size: 1rem;
font-weight: 200;
background: transparent;
color: @text-color-alt;
text-shadow: none;
}
.time {
font-size: 1rem;
font-weight: 200;
background: transparent;
color: @text-color;
text-shadow: none;
margin-right: 18px;
}
.body {
font-size: 1rem;
font-weight: 200;
background: transparent;
color: @text-color;
text-shadow: none;
}
.control-center {
background: @noti-bg;
border: 2px solid @noti-border-color;
color: @text-color;
border-radius: 10px;
}
.control-center-list {
background: transparent;
}
.control-center-list-placeholder {
opacity: 0.5;
}
.floating-notifications {
background: transparent;
}
.blank-window {
background: alpha(black, 0.1);
}
.widget-title {
color: @noti-border-color;
background: @noti-bg-alt;
padding: 3px 6px;
margin: 5px;
font-size: 1rem;
border-radius: 10px;
}
.widget-title > button {
font-size: 0.75rem;
color: @text-color;
border-radius: 10px;
background: transparent;
border: 0.5px solid @noti-border-color;
}
.widget-title > button:hover {
background: #f7768e;
color: @noti-border-color;
}
.widget-dnd {
background: @noti-bg-alt;
padding: 3px 6px;
margin: 5px;
border-radius: 10px;
font-size: 1rem;
color: @noti-border-color;
}
.widget-dnd > switch {
border-radius: 10px;
/* border: 1px solid #7aa2f7; */
background: @noti-border-color;
}
.widget-dnd > switch:checked {
background: #f7768e;
border: 1px solid #f7768e;
}
.widget-dnd > switch slider {
background: @noti-bg;
border-radius: 10px;
}
.widget-dnd > switch:checked slider {
background: @noti-bg;
border-radius: 10px;
}
.widget-label {
margin: 5px;
}
.widget-label > label {
font-size: 1rem;
color: @text-color;
}
.widget-mpris {
color: @text-color;
background: @noti-bg-alt;
padding: 3px 6px;
margin: 5px;
border-radius: 10px;
}
.widget-mpris > box > button {
border-radius: 10px;
}
.widget-mpris-player {
padding: 3px 6px;
margin: 5px;
}
.widget-mpris-title {
font-weight: 100;
font-size: 1rem;
}
.widget-mpris-subtitle {
font-size: 0.75rem;
}
.widget-buttons-grid {
font-size: large;
color: @noti-border-color;
padding: 2px;
margin: 5px;
border-radius: 10px;
background: @noti-bg-alt;
}
.widget-buttons-grid > flowbox > flowboxchild > button {
margin: 1px;
background: @noti-bg;
border-radius: 10px;
color: @text-color;
}
.widget-buttons-grid > flowbox > flowboxchild > button:hover {
background: rgba(122, 162, 247, 0.1);
color: @text-color-alt;
}
.widget-menubar > box > .menu-button-bar > button {
border: none;
background: transparent;
}
.topbar-buttons > button {
border: none;
background: transparent;
}
.widget-volume {
background: @noti-bg-alt;
padding: 2px;
margin: 10px 10px 5px 10px;
border-radius: 10px;
font-size: x-large;
color: @text-color;
}
.widget-volume > box > button {
background: #7aa2f7;
border: none;
}
.per-app-volume {
background-color: @noti-bg;
padding: 4px 8px 8px;
margin: 0 8px 8px;
border-radius: 10px;
color: @text-color;
}
.widget-backlight {
background: @noti-bg-alt;
padding: 5px;
margin: 10px 10px 5px 10px;
border-radius: 10px;
font-size: x-large;
color: @text-color;
}
.low {
background: @text-color;
padding: 0px;
border-radius: 10px;
}
.normal {
background: @text-color;
padding: 0px;
border-radius: 10px;
}
.critical {
background: red;
padding: 0px;
border-radius: 10px;
}

View file

@ -0,0 +1,19 @@
$background = rgb({background.strip})
$foreground = rgb({foreground.strip})
$color0 = rgb({color0.strip})
$color1 = rgb({color1.strip})
$color2 = rgb({color2.strip})
$color3 = rgb({color3.strip})
$color4 = rgb({color4.strip})
$color5 = rgb({color5.strip})
$color6 = rgb({color6.strip})
$color7 = rgb({color7.strip})
$color8 = rgb({color8.strip})
$color9 = rgb({color9.strip})
$color10 = rgb({color10.strip})
$color11 = rgb({color11.strip})
$color12 = rgb({color12.strip})
$color13 = rgb({color13.strip})
$color14 = rgb({color14.strip})
$color15 = rgb({color15.strip})

View file

@ -2,9 +2,9 @@
{ {
"layer": "top", // Waybar at top layer "layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right) // "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height) "height": 36, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width // "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px) "spacing": 8, // Gaps between modules (4px)
// Choose the order of the modules // Choose the order of the modules
"modules-left": [ "modules-left": [
"hyprland/workspaces", "hyprland/workspaces",
@ -14,13 +14,15 @@
"custom/spotify" "custom/spotify"
], ],
"modules-right": [ "modules-right": [
"custom/swww",
"wireplumber", "wireplumber",
"network", "network",
"cpu", "cpu",
"memory", "memory",
"temperature", "temperature",
"idle_inhibitor", "idle_inhibitor",
"clock" "clock",
"custom/swaync"
], ],
"idle_inhibitor": { "idle_inhibitor": {
"format": "{icon}", "format": "{icon}",
@ -30,7 +32,7 @@
} }
}, },
"tray": { "tray": {
// "icon-size": 21, "icon-size": 18,
"spacing": 10 "spacing": 10
}, },
"clock": { "clock": {
@ -69,13 +71,35 @@
}, },
"custom/spotify": { "custom/spotify": {
"format": "{}", "format": "{}",
"on-click": "playerctl play-pause",
"exec": "/usr/bin/python3 $HOME/.config/waybar/modules/mediaplayer.py --player spotify",
"return-type": "json", "return-type": "json",
"max-length": 40, "max-length": 40,
"format-icons": { "format-icons": {
"spotify": "", "spotify": " ",
"default": "🎜" "default": "🎜 "
}, }
"exec": "/usr/bin/python3 $HOME/.config/waybar/modules/mediaplayer.py --player spotify" // Filter player based on name },
"custom/swaync": {
"format": "{icon}",
"exec": "swaync-client -swb",
"return-type": "json",
"on-click": "sleep 0.1 && swaync-client -t -sw",
"format-icons": {
"notification": "<span foreground='red'><small><sup>⬤</sup></small></span>",
"none": " ",
"dnd-notification": "<span foreground='red'><small><sup>⬤</sup></small></span>",
"dnd-none": " "
}
},
"custom/swww": {
"format": "{icon}",
"tooltip": false,
"tooltip-format": "Change Wallpaper",
"on-click": "bash ~/.config/waybar/modules/switch-wallpaper.sh &",
"format-icons": {
"default": " "
}
} }
} }

View file

@ -0,0 +1,10 @@
# -n tells `wal` to skip setting the wallpaper.
wal -i ~/Wallpapers/ -n
# Using feh to tile the wallpaper now.
# We grab the wallpaper location from wal's cache so
# that this works even when a directory is passed.
swww img "$(< "${HOME}/.cache/wal/wal")" --transition-type wipe --transition-angle 45
notify-send "Changing Wallpaper"

View file

@ -1,9 +1,16 @@
* { * {
/* `otf-font-awesome` is required to be installed for icons */ /* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 12px; text-shadow: none;
transition: color 0.5s ease-in-out;
transition: background-color 0.5s ease-in-out;
} }
/*
* Color Palette
*/
@import url('../../.cache/wal/colors-waybar.css');
/* /*
* General * General
*/ */
@ -20,6 +27,8 @@
@import url('./styles/modules/memory.css'); @import url('./styles/modules/memory.css');
@import url('./styles/modules/network.css'); @import url('./styles/modules/network.css');
@import url('./styles/modules/spotify.css'); @import url('./styles/modules/spotify.css');
@import url('./styles/modules/swaync.css');
@import url('./styles/modules/swww.css');
@import url('./styles/modules/temperature.css'); @import url('./styles/modules/temperature.css');
@import url('./styles/modules/tray.css'); @import url('./styles/modules/tray.css');
@import url('./styles/modules/wireplumber.css'); @import url('./styles/modules/wireplumber.css');

View file

@ -1,34 +1,14 @@
/*
* Modules groups
*/
.modules-left { .modules-left {
padding: 0 3px; padding: 0 3px;
border: 1px solid rgba(125, 125, 125, 0.66);
border-radius: 5px;
background: rgba(0, 0, 0, 0.66);
margin-left: 10px; margin-left: 10px;
animation: fadeIn 2.5s;
} }
.modules-center { .modules-center {
padding: 0 3px; padding: 0 3px;
border: 1px solid rgba(125, 125, 125, 0.66);
border-radius: 5px;
background: rgba(0, 0, 0, 0.66);
animation: fadeIn 2.5s;
} }
.modules-right { .modules-right {
padding: 0 3px; padding: 0 3px;
border: 1px solid rgba(125, 125, 125, 0.66);
border-radius: 5px;
background: rgba(0, 0, 0, 0.66);
margin-right: 10px; margin-right: 10px;
animation: fadeIn 2.5s;
}
@keyframes fadeIn {
0% { opacity: 0; }
100% { opacity: 1; }
} }

View file

@ -1,11 +1,13 @@
.module {
border-radius: 9999px;
margin: 4px 0;
}
label.module { label.module {
padding: 0 10px; padding: 0 10px;
box-shadow: inset 0 -2px; /* box-shadow: inset 0 -2px; */
transition: color 0.5s ease-in-out;
transition: background-color 0.5s ease-in-out;
} }
box.module { box.module {
padding: 0 10px; padding: 0 10px;
box-shadow: inset 0 -2px;
} }

View file

@ -1,4 +1,5 @@
#clock { #clock {
color: #8fbcbb; color: #eee;
background-color: @color4;
} }

View file

@ -1,3 +1,5 @@
.custom-spotify { .custom-spotify {
color: #1db954; color: #333;
background-color: #1db954;
font-style: italic;
} }

View file

@ -0,0 +1,4 @@
.custom-swaync {
background-color: white;
}

View file

@ -0,0 +1,4 @@
.custom-swww {
color: @color9;
}

View file

@ -1,5 +1,6 @@
#wireplumber { #wireplumber {
color: #a3be8c; color: #eee;
background-color: @color6;
} }
#wireplumber.muted { #wireplumber.muted {

View file

@ -1,29 +1,39 @@
#workspaces { #workspaces {
padding-left: 0; padding: 0;
padding-right: 0; border: 2px solid @color4;
} }
#workspaces button { #workspaces button {
padding: 0 5px; padding: 0 4px;
box-shadow: none;
border: none; border: none;
border-radius: 0px; border-radius: 0;
box-shadow: inset 0 -3px transparent; color: @color8;
transition: color 0.5s ease; }
#workspaces button:first-child {
padding-left: 8px;
border-radius: 9999px 0 0 9999px;
}
#workspaces button:last-child {
padding-right: 8px;
border-radius: 0 9999px 9999px 0;
} }
#workspaces button.active { #workspaces button.active {
color: #5e81ac; background-color: @color4;
box-shadow: inset 0 -3px #5e81ac; color: @color8;
} }
#workspaces button:hover { #workspaces button:hover {
background: rgba(0, 0, 0, 0.2); background: @color4;
box-shadow: inset 0 -3px #5e81ac; color: @color8;
} }
#workspaces button.focused { #workspaces button.focused {
background-color: #81a1c1; background-color: @color5;
} }
#workspaces button.urgent { #workspaces button.urgent {

View file

@ -1,7 +1,18 @@
window#waybar { window#waybar {
background-color: transparent; background: linear-gradient(90deg, mix(@color0, transparent, 0.5), mix(@color1, transparent, 0.5), mix(@color0, transparent, 0.5));
animation: fadeIn 2.5s;
}
button {
text-shadow: none;
} }
window#waybar.hidden { window#waybar.hidden {
opacity: 0.2; opacity: 0.2;
} }
@keyframes fadeIn {
0% { opacity: 0; }
100% { opacity: 1; }
}