feat: eww new tokens

This commit is contained in:
hesam-init 2024-07-04 21:17:38 +03:30
parent 446268e7f5
commit abb016ac6e
13 changed files with 106 additions and 111 deletions

View file

@ -52,11 +52,11 @@
min-width: 60px;
background-color: $surface1;
margin: get-token(margin);
border-radius: get-token(border-radius);
border-radius: $rounded;
highlight {
background-color: $surface2;
border-radius: get-token(border-radius);
border-radius: $rounded;
}
}

View file

@ -3,23 +3,21 @@
}
.widget {
margin: get-token(margin, small);
padding: get-token(padding);
border-radius: get-token(border-radius);
margin: $widget-margin;
padding: $widget-padding;
border-radius: $rounded;
background-color: $surface0;
}
.panel-widget {
@extend .widget;
padding: get-token(padding);
margin: get-token(margin, large);
border-radius: get-token(border-radius);
margin: $panel-widget-margin;
}
.icon {
font-family: "Symbols Nerd Font";
font-size: get-token(font-sizes, small);
font-size: $icon-size;
}
.popup {

View file

@ -33,8 +33,6 @@
.workspaces {
@extend .widget;
padding: 12px;
.workspace {
min-height: 16px;
background-color: $surface2;
@ -62,7 +60,6 @@
}
&.occupied {
// color: $surface2;
color: transparentize($white, 0.4);
}

View file

@ -1,3 +1,13 @@
$rounded: 0.8em;
$widget-padding: 0.75em 0.65em;
$widget-margin: 0.2em;
$panel-widget-margin: 0.4em;
$icon-size: 1.25em;
$font-size: 1.2em;
$design-tokens: (
font-sizes: (
small: 16px,
@ -28,11 +38,11 @@ $design-tokens: (
@function get-token($category, $key: null) {
$tokens: map-get($design-tokens, $category);
@if $tokens == null {
@if $tokens ==null {
@error "Category `#{$category}` not found in design tokens.";
}
@if $key == null {
@if $key ==null {
@if map-has-key($tokens, default) {
$key: default;
} @else {
@ -42,7 +52,7 @@ $design-tokens: (
$value: map-get($tokens, $key);
@if $value == null {
@if $value ==null {
@error "Token `#{$key}` not found in category `#{$category}`.";
}

View file

@ -0,0 +1,33 @@
// Midnight Frost palette
$black: #0c1015;
$gray100: #1c2026;
$gray90: #262b33;
$gray80: #31363f;
$gray70: #3d434d;
$gray60: #545b68;
$gray50: #6b7280;
$gray40: #838a98;
$gray30: #9ca3b0;
$gray20: #b5bbc8;
$gray10: #ced3de;
$white: #ebeef5;
$red: #e63946;
$green: #2ecc71;
$green_dark: #27ae60;
$yellow: #f1c40f;
$yellow_dark: #f39c12;
$blue: #3498db;
$blue_dark: #2980b9;
$magenta: #9b59b6;
$magenta_dark: #8e44ad;
$cyan: #1abc9c;
$cyan_dark: #16a085;
$base: $black;
$surface0: $gray100;
$surface1: $gray90;
$surface2: $gray80;
$white0: $gray10;
$white1: $white;
$white2: $white;
$accent: $red;

View file

@ -0,0 +1,33 @@
// Sunburst Oasis palette
$black: #141a1f;
$gray100: #1f2a33;
$gray90: #2a3740;
$gray80: #35444e;
$gray70: #41525d;
$gray60: #566873;
$gray50: #6b7e8a;
$gray40: #8195a1;
$gray30: #98acb8;
$gray20: #b0c3cf;
$gray10: #c8dae6;
$white: #e0f0fd;
$red: #ff6b6b;
$green: #5ec26c;
$green_dark: #4ca158;
$yellow: #feca57;
$yellow_dark: #d9a638;
$blue: #54a0ff;
$blue_dark: #3d7acc;
$magenta: #ff78c6;
$magenta_dark: #d35d9e;
$cyan: #48dbfb;
$cyan_dark: #3aafcc;
$base: $black;
$surface0: $gray100;
$surface1: $gray90;
$surface2: $gray80;
$white0: $gray10;
$white1: $white;
$white2: $white;
$accent: $red;

View file

@ -1,4 +1,4 @@
@import "./assets/scss/themes/fullerene.scss";
@import "./assets/scss/themes/feverblush.scss";
@import "./assets/scss/tokens";
@import "./assets/scss/native";
@import "./assets/scss/global";

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
current_state=$(eww get revealControlpanel)
if [ "$current_state" = "true" ]; then
new_state="false"
else
new_state="true"
fi
eww update revealControlpanel="$new_state"

View file

@ -1,90 +0,0 @@
#!/bin/bash
# change this to your eww bin. Don't question mine
EWW_BIN="$(which eww) -c $HOME/.config/eww/carbonmonoxide"
# EWW_BIN="$HOME/Packages/eww/target/release/eww"
dashboard() {
LOCK_FILE="$HOME/.config/eww-dashboard.lock"
run() {
${EWW_BIN} open dashboard
}
if [[ ! -f "$LOCK_FILE" ]]; then
touch "$LOCK_FILE"
run && echo "ok good!"
else
${EWW_BIN} close dashboard
rm "$LOCK_FILE" && echo "closed"
fi
}
control() {
LOCK_FILE="$HOME/.config/eww-control.lock"
run() {
${EWW_BIN} open ControlPanel
}
if [[ ! -f "$LOCK_FILE" ]]; then
touch "$LOCK_FILE"
run && echo "ok good!"
else
${EWW_BIN} close ControlPanel
rm "$LOCK_FILE" && echo "closed"
fi
}
calendar() {
LOCK_FILE="$HOME/.config/eww-calendar.lock"
run() {
${EWW_BIN} open calendar
}
if [[ ! -f "$LOCK_FILE" ]]; then
touch "$LOCK_FILE"
run && echo "ok good!"
else
${EWW_BIN} close calendar
rm "$LOCK_FILE" && echo "closed"
fi
}
music() {
LOCK_FILE="$HOME/.config/eww-music.lock"
run() {
${EWW_BIN} open music
}
if [[ ! -f "$LOCK_FILE" ]]; then
touch "$LOCK_FILE"
run && echo "ok good!"
else
${EWW_BIN} close music
rm "$LOCK_FILE" && echo "closed"
fi
}
if [ "$1" = "calendar" ]; then
calendar
elif [ "$1" = "music" ]; then
music
elif [ "$1" = "control" ]; then
control
elif [ "$1" = "dashboard" ]; then
dashboard
elif [ "$1" = "colourpick" ]; then
hyprpicker -a
notify-send -a colourpicker -i ~/.config/eww/image/eyedropper.png -t 3000 "Colour copied to clipboard"
elif [ "$1" = "scrop" ]; then
# control
# sleep 0.5
grim -g "$(slurp)" - | wl-copy
notify-send -a screenshot -i ~/.config/eww/image/screenshot.png -t 3000 "Screenshot Taken" "Image copied to clipboard"
elif [ "$1" = "sscreen" ]; then
# control
grim - | wl-copy
fi

View file

@ -23,13 +23,9 @@
(box
:orientation "v"
:space-evenly false
:valign "start"
:vexpand false
(Logo)
(DotsWorkspaces)
; (Shortcuts)
))
(defwidget BarMiddle []
@ -37,6 +33,7 @@
:orientation "v"
:space-evenly false
:valign "center"
:height 280
(Clock)

View file

@ -35,6 +35,9 @@ bind = $mainMod, N, exec, $network_manager
bind = $mainMod, J, exec, $pkg_manager
bind = $mainMod, B, exec, $bluetooth-manager
# EWw
bind = $mainMod, Z, exec, $toggle_control_panel
# Screenshot
bind = $mainMod, PRINT, exec, $screenshot -m window
bind =, PRINT, exec, $screenshot -m output

View file

@ -19,6 +19,9 @@ env = QT_QPA_PLATFORM,wayland
# env = WLR_DRM_NO_ATOMIC,1
$SCRIPT_PATH = ~/.config/hypr/scripts
$EWW_SCRIPT_PATH = ~/.config/eww/scripts
$toggle_control_panel = $EWW_SCRIPT_PATH/eww/toggle-control-panel
$mainMod = SUPER
$terminal = alacritty -o "window.opacity=0"

@ -1 +1 @@
Subproject commit da98fbe8a915bf60f0345994e0cb8c11f3e6836c
Subproject commit d848a0e2f3ac07ccf3349958921f7cd216c20761