mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-24 13:45:29 -08:00
Compare commits
No commits in common. "34172f0ecb98b6eff2c7bc1deaac87c13a05ca18" and "d2947e3803f7ea2fc5cc6f44d1cf21c8f3cbfae0" have entirely different histories.
34172f0ecb
...
d2947e3803
7 changed files with 53 additions and 59 deletions
|
@ -7,7 +7,6 @@ in
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
playerctl
|
playerctl
|
||||||
pw-volume
|
|
||||||
alsa-utils
|
alsa-utils
|
||||||
socat
|
socat
|
||||||
jq
|
jq
|
||||||
|
|
|
@ -4,19 +4,11 @@
|
||||||
|
|
||||||
//Global Styles
|
//Global Styles
|
||||||
.bar-main {
|
.bar-main {
|
||||||
background-color: rgba(30, 30, 30, 0.9);
|
color: #b0b4bc;
|
||||||
color: #FFFFFF;
|
margin: 15px;
|
||||||
border-radius: 10;
|
padding: 10px;
|
||||||
padding-left: 10px;
|
margin-bottom: 0px;
|
||||||
padding-right: 10px;
|
padding-bottom: 0px;
|
||||||
|
|
||||||
// font: 12px;
|
|
||||||
|
|
||||||
// color: #b0b4bc;
|
|
||||||
// margin: 15px;
|
|
||||||
// padding: 10px;
|
|
||||||
// margin-bottom: 0px;
|
|
||||||
// padding-bottom: 0px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.bar-section {
|
.bar-section {
|
||||||
|
@ -40,7 +32,7 @@
|
||||||
|
|
||||||
.regular {
|
.regular {
|
||||||
color: #b0b4bc;
|
color: #b0b4bc;
|
||||||
padding: 8px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active-workspace {
|
.active-workspace {
|
||||||
|
@ -49,11 +41,3 @@
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side-stuff {
|
|
||||||
background-color: rgba(20, 20, 20, 0.9);
|
|
||||||
color: #FFFFFF;
|
|
||||||
border-radius: 10;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
(defwidget bar []
|
(defwidget bar []
|
||||||
(centerbox :orientation "h"
|
(centerbox :orientation "h"
|
||||||
(workspaces :current-idx current-workspace)
|
(workspaces :names active-workspaces :current-idx current-workspace)
|
||||||
(music)
|
(music)
|
||||||
(info)))
|
(info)))
|
||||||
|
|
||||||
|
(deflisten active-workspaces :initial "[]" "bash ./scripts/get-workspaces")
|
||||||
(deflisten current-workspace :initial "1" "bash ./scripts/get-active-workspace")
|
(deflisten current-workspace :initial "1" "bash ./scripts/get-active-workspace")
|
||||||
(defwidget workspaces [current-idx]
|
(defwidget workspaces [names current-idx]
|
||||||
(box
|
(box
|
||||||
:halign "start"
|
:halign "start"
|
||||||
:hexpand false
|
:hexpand false
|
||||||
:class "bar-main"
|
|
||||||
:space-evenly true
|
:space-evenly true
|
||||||
:spacing "12"
|
:spacing "12"
|
||||||
:css "* {margin-left: 20px; margin-right: 20px;}"
|
:css "* {margin-left: 20px; margin-right: 20px;}"
|
||||||
(box
|
(box
|
||||||
:class {current-idx == "1" ? "active-workspace" : "regular"}
|
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "1" ? "active-workspace" : "regular"}
|
||||||
(label :text ""))
|
(label :text {names =~ `"1"` ? "" : ""}))
|
||||||
(box
|
(box
|
||||||
:class {current-idx == "2" ? "active-workspace" : "regular"}
|
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "2" ? "active-workspace" : "regular"}
|
||||||
(label :text ""))
|
(label :text {names =~ `"2"` ? "" : ""}))
|
||||||
(box
|
(box
|
||||||
:class {current-idx == "3" ? "active-workspace" : "regular"}
|
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "3" ? "active-workspace" : "regular"}
|
||||||
(label :text ""))
|
(label :text {names =~ `"3"` ? "" : ""}))
|
||||||
(box
|
(box
|
||||||
:class {current-idx == "4" ? "active-workspace" : "regular"}
|
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "4" ? "active-workspace" : "regular"}
|
||||||
(label :text ""))
|
(label :text {names =~ `"4"` ? "" : ""}))
|
||||||
(box
|
(box
|
||||||
:class {current-idx == "5" ? "active-workspace" : "regular"}
|
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "5" ? "active-workspace" : "regular"}
|
||||||
(label :text ""))
|
(label :text {names =~ `"5"` ? "" : ""}))
|
||||||
(box
|
(box
|
||||||
:class {current-idx == "6" ? "active-workspace" : "regular"}
|
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "6" ? "active-workspace" : "regular"}
|
||||||
(label :text ""))
|
(label :text {names =~ `"6"` ? "" : ""}))
|
||||||
(box
|
(box
|
||||||
:class {current-idx == "7" ? "active-workspace" : "regular"}
|
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "7" ? "active-workspace" : "regular"}
|
||||||
(label :text ""))
|
(label :text {names =~ `"7"` ? "" : ""}))
|
||||||
(box
|
(box
|
||||||
:class {current-idx == "8" ? "active-workspace" : "regular"}
|
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "8" ? "active-workspace" : "regular"}
|
||||||
(label :text ""))
|
(label :text {names =~ `"8"` ? "" : ""}))
|
||||||
(box
|
(box
|
||||||
:class {current-idx == "9" ? "active-workspace" : "regular"}
|
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "9" ? "active-workspace" : "regular"}
|
||||||
(label :text ""))))
|
(label :text {names =~ `"9"` ? "" : ""}))))
|
||||||
|
|
||||||
(defwidget info []
|
(defwidget info []
|
||||||
(box
|
(box
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing "10"
|
:spacing "10"
|
||||||
(_volume :volume volume)
|
(_volume :volume volume)
|
||||||
(_battery :status {EWW_BATTERY == "" ? "" : EWW_BATTERY.BAT0.status} :battery {EWW_BATTERY == "" ? "" : EWW_BATTERY.BAT0.capacity}))
|
(_battery :status {EWW_BATTERY.BAT0.status} :battery {EWW_BATTERY.BAT0.capacity}))
|
||||||
(_network :strength net-strength :name net-name)
|
(_network :strength net-strength :name net-name)
|
||||||
(sep)
|
(sep)
|
||||||
(buttons)))
|
(buttons)))
|
||||||
|
@ -90,11 +90,11 @@
|
||||||
(defwidget _battery [status battery]
|
(defwidget _battery [status battery]
|
||||||
(box
|
(box
|
||||||
:hexpand false
|
:hexpand false
|
||||||
:class {status == "" ? "regular" : battery < 20 ? "alert" : "regular"}
|
:class {battery < 20 ? "alert" : "regular"}
|
||||||
(revealer-on-hover
|
(revealer-on-hover
|
||||||
:toggle battery-visible
|
:toggle battery-visible
|
||||||
:togglename "battery-visible"
|
:togglename "battery-visible"
|
||||||
(label :text {status == 'Charging' || status == "" ? "" :
|
(label :text {status == 'Charging' ? "" :
|
||||||
battery < 20 ? "" :
|
battery < 20 ? "" :
|
||||||
battery < 40 ? "" :
|
battery < 40 ? "" :
|
||||||
battery < 60 ? "" :
|
battery < 60 ? "" :
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
{music != "" ? "🎵${music}" : ""}))
|
{music != "" ? "🎵${music}" : ""}))
|
||||||
|
|
||||||
(defpoll volume :interval "1s"
|
(defpoll volume :interval "1s"
|
||||||
"pw-volume status | jq '.percentage'")
|
"scripts/getvol")
|
||||||
|
|
||||||
(defpoll time :interval "10s"
|
(defpoll time :interval "10s"
|
||||||
"date '+%H:%M %b %d, %Y'")
|
"date '+%H:%M %b %d, %Y'")
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#! /bin/bash
|
||||||
#
|
|
||||||
function clamp {
|
function clamp {
|
||||||
min=$1
|
min=$1
|
||||||
max=$2
|
max=$2
|
||||||
|
|
11
modules/ewwbar/eww-config/scripts/get-workspaces
Executable file
11
modules/ewwbar/eww-config/scripts/get-workspaces
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
spaces (){
|
||||||
|
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
|
||||||
|
seq 1 10 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
|
||||||
|
}
|
||||||
|
|
||||||
|
spaces
|
||||||
|
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
||||||
|
spaces
|
||||||
|
done
|
|
@ -56,8 +56,8 @@ in
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
gaps_in = 5;
|
gaps_in = 5;
|
||||||
gaps_out = 8;
|
gaps_out = 10;
|
||||||
border_size = 2.0;
|
border_size = 1.7;
|
||||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ in
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||||
decoration = {
|
decoration = {
|
||||||
shadow_offset = "5 5";
|
shadow_offset = "0 5";
|
||||||
rounding = 5;
|
rounding = 5;
|
||||||
"col.shadow" = "rgba(00000099)";
|
"col.shadow" = "rgba(00000099)";
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,16 +8,17 @@ in
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
workspace = if (hostname == "NicksNixDesktop") then [
|
workspace = if (hostname == "NicksNixDesktop") then [
|
||||||
"1,monitor:DP-3,default:true"
|
"1,monitor:DP-4"
|
||||||
"3,monitor:DP-3"
|
"3,monitor:DP-4"
|
||||||
"5,monitor:DP-3"
|
"5,monitor:DP-4"
|
||||||
"7,monitor:DP-3"
|
"7,monitor:DP-4"
|
||||||
"9,monitor:DP-3"
|
"9,monitor:DP-4"
|
||||||
|
|
||||||
"2,monitor:DP-2,default:true"
|
"2,monitor:DP-2"
|
||||||
"4,monitor:DP-2"
|
"4,monitor:DP-2"
|
||||||
"6,monitor:DP-2"
|
"6,monitor:DP-2"
|
||||||
"8,monitor:DP-2"
|
"8,monitor:DP-2"
|
||||||
|
"10,monitor:DP-2"
|
||||||
] else [
|
] else [
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue