From 0f7958ed08b6d5794e0518887143218699476993 Mon Sep 17 00:00:00 2001 From: hesam-init Date: Tue, 20 Feb 2024 00:04:01 +0330 Subject: [PATCH] feat: workspaces --- eww/.config/eww/bar/assets/scss/colors.scss | 21 +++++++ eww/.config/eww/bar/assets/scss/index.scss | 58 ++++++++++++++++++- .../bar/assets/scss/widgets/workspaces.scss | 9 +++ eww/.config/eww/bar/eww.scss | 55 ++---------------- eww/.config/eww/bar/launch_bar | 5 -- eww/.config/eww/bar/scripts/workspace | 4 +- 6 files changed, 91 insertions(+), 61 deletions(-) create mode 100644 eww/.config/eww/bar/assets/scss/colors.scss create mode 100644 eww/.config/eww/bar/assets/scss/widgets/workspaces.scss diff --git a/eww/.config/eww/bar/assets/scss/colors.scss b/eww/.config/eww/bar/assets/scss/colors.scss new file mode 100644 index 0000000..31a6ae2 --- /dev/null +++ b/eww/.config/eww/bar/assets/scss/colors.scss @@ -0,0 +1,21 @@ +$background-bar: rgb(68, 47, 173); +$background: rgba(11, 10, 16, 1); +$widget-background: rgba(17, 16, 25, 1); +$shadow: rgba(0, 0, 0, 0.3); +$grey: rgba(105, 101, 124, 0.7); + +$black: #282A36; +$red: #f1a7b3; +$green: #AAC5A0; +$yellow: #f6d6b3; +$orange: #f2c798; +$blue: #A8C5E6; +$blue2: #e1eefd; +$purple: #f1a7e2; +$purple2: #ecdbee; +$teal: #72B69C; +$white: #eae9f0; + +$primary: #d3e8ff; +$secondary: #f1a7e2; +$tertiary: #93f0e2; \ No newline at end of file diff --git a/eww/.config/eww/bar/assets/scss/index.scss b/eww/.config/eww/bar/assets/scss/index.scss index f4b7da4..655ea6f 100644 --- a/eww/.config/eww/bar/assets/scss/index.scss +++ b/eww/.config/eww/bar/assets/scss/index.scss @@ -1,5 +1,57 @@ -* { +.bar { + padding: 0.1rem; +} + +.works { + font-size: 12px; + font-weight: normal; + margin: 5px 0px 0px 20px; + background-color: #0f0f17; +} + +.sidestuff slider { all: unset; - font-family: feather; - font-family: mononoki Nerd Font; + color: #ffd5cd; +} + +.metric scale trough highlight { + all: unset; + background-color: #D35D6E; + color: #000000; + border-radius: 10px; +} + +.metric scale trough { + all: unset; + background-color: #4e4e4e; + border-radius: 50px; + min-height: 3px; + min-width: 50px; + margin-left: 10px; + margin-right: 20px; +} + +.metric scale trough highlight { + all: unset; + background-color: #D35D6E; + color: #000000; + border-radius: 10px; +} + +.metric scale trough { + all: unset; + background-color: #4e4e4e; + border-radius: 50px; + min-height: 3px; + min-width: 50px; + margin-left: 10px; + margin-right: 20px; +} + +.label-ram { + font-size: large; +} + +.workspaces button:hover { + color: #D35D6E; } \ No newline at end of file diff --git a/eww/.config/eww/bar/assets/scss/widgets/workspaces.scss b/eww/.config/eww/bar/assets/scss/widgets/workspaces.scss new file mode 100644 index 0000000..40fb001 --- /dev/null +++ b/eww/.config/eww/bar/assets/scss/widgets/workspaces.scss @@ -0,0 +1,9 @@ +.works { + font-size: 18px; + // margin: 10px 0px 0px 10px; + background-color: rgba(00, 00, 00, 0.0); +} + +.ws-btn { + margin: 0px 7px 0px 0px; +} \ No newline at end of file diff --git a/eww/.config/eww/bar/eww.scss b/eww/.config/eww/bar/eww.scss index 459a7f2..7a5f1f8 100644 --- a/eww/.config/eww/bar/eww.scss +++ b/eww/.config/eww/bar/eww.scss @@ -1,54 +1,7 @@ -@import "./assets/scss/main.scss"; +@import "assets/scss/colors.scss"; +@import "assets/scss/index.scss"; +@import "assets/scss/widgets/workspaces.scss"; -.bar { - background-color: #0f0f17; - padding: 0.5rem; - border-radius: 0.8rem; -} - -.sidestuff slider { +* { all: unset; - color: #ffd5cd; -} - -.metric scale trough highlight { - all: unset; - background-color: #D35D6E; - color: #000000; - border-radius: 10px; -} - -.metric scale trough { - all: unset; - background-color: #4e4e4e; - border-radius: 50px; - min-height: 3px; - min-width: 50px; - margin-left: 10px; - margin-right: 20px; -} - -.metric scale trough highlight { - all: unset; - background-color: #D35D6E; - color: #000000; - border-radius: 10px; -} - -.metric scale trough { - all: unset; - background-color: #4e4e4e; - border-radius: 50px; - min-height: 3px; - min-width: 50px; - margin-left: 10px; - margin-right: 20px; -} - -.label-ram { - font-size: large; -} - -.workspaces button:hover { - color: #D35D6E; } \ No newline at end of file diff --git a/eww/.config/eww/bar/launch_bar b/eww/.config/eww/bar/launch_bar index cb7b28b..b9b2d50 100755 --- a/eww/.config/eww/bar/launch_bar +++ b/eww/.config/eww/bar/launch_bar @@ -2,11 +2,6 @@ EWW="eww -c $HOME/.config/eww/bar" -if [[ ! $(pidof eww) ]]; then - eww daemon - sleep 1 -fi - run_eww() { ${EWW} open bar } diff --git a/eww/.config/eww/bar/scripts/workspace b/eww/.config/eww/bar/scripts/workspace index 2148493..94ea341 100755 --- a/eww/.config/eww/bar/scripts/workspace +++ b/eww/.config/eww/bar/scripts/workspace @@ -1,7 +1,7 @@ #! /bin/bash #define icons for workspaces 1-9 -ic=(0     輸  " " " " ) +ic=(    輸) # ic=(0 1 2 3 4 5 6 7 8 9) # ic=(0 一 二 三 四 五 六 七 八 九 〇) @@ -49,8 +49,8 @@ workspaces() { unset -v o"$num" fi } + module() { - #output eww widget echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \ (box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" :valign \"center\" \ (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/winter/scripts/workspace 1\'\" :onrightclick \"hyprctl dispatch workspace 1 && $HOME/.config/hypr/themes/winter/scripts/default_app\" :class \"ws-btn 0$o1$f1\" \"${ic[1]}\") \