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; [
|
||||
playerctl
|
||||
pw-volume
|
||||
alsa-utils
|
||||
socat
|
||||
jq
|
||||
|
|
|
@ -4,19 +4,11 @@
|
|||
|
||||
//Global Styles
|
||||
.bar-main {
|
||||
background-color: rgba(30, 30, 30, 0.9);
|
||||
color: #FFFFFF;
|
||||
border-radius: 10;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
|
||||
// font: 12px;
|
||||
|
||||
// color: #b0b4bc;
|
||||
// margin: 15px;
|
||||
// padding: 10px;
|
||||
// margin-bottom: 0px;
|
||||
// padding-bottom: 0px;
|
||||
color: #b0b4bc;
|
||||
margin: 15px;
|
||||
padding: 10px;
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.bar-section {
|
||||
|
@ -40,7 +32,7 @@
|
|||
|
||||
.regular {
|
||||
color: #b0b4bc;
|
||||
padding: 8px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.active-workspace {
|
||||
|
@ -49,11 +41,3 @@
|
|||
padding-left: 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 []
|
||||
(centerbox :orientation "h"
|
||||
(workspaces :current-idx current-workspace)
|
||||
(workspaces :names active-workspaces :current-idx current-workspace)
|
||||
(music)
|
||||
(info)))
|
||||
|
||||
(deflisten active-workspaces :initial "[]" "bash ./scripts/get-workspaces")
|
||||
(deflisten current-workspace :initial "1" "bash ./scripts/get-active-workspace")
|
||||
(defwidget workspaces [current-idx]
|
||||
(defwidget workspaces [names current-idx]
|
||||
(box
|
||||
:halign "start"
|
||||
:hexpand false
|
||||
:class "bar-main"
|
||||
:space-evenly true
|
||||
:spacing "12"
|
||||
:css "* {margin-left: 20px; margin-right: 20px;}"
|
||||
(box
|
||||
:class {current-idx == "1" ? "active-workspace" : "regular"}
|
||||
(label :text ""))
|
||||
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "1" ? "active-workspace" : "regular"}
|
||||
(label :text {names =~ `"1"` ? "" : ""}))
|
||||
(box
|
||||
:class {current-idx == "2" ? "active-workspace" : "regular"}
|
||||
(label :text ""))
|
||||
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "2" ? "active-workspace" : "regular"}
|
||||
(label :text {names =~ `"2"` ? "" : ""}))
|
||||
(box
|
||||
:class {current-idx == "3" ? "active-workspace" : "regular"}
|
||||
(label :text ""))
|
||||
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "3" ? "active-workspace" : "regular"}
|
||||
(label :text {names =~ `"3"` ? "" : ""}))
|
||||
(box
|
||||
:class {current-idx == "4" ? "active-workspace" : "regular"}
|
||||
(label :text ""))
|
||||
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "4" ? "active-workspace" : "regular"}
|
||||
(label :text {names =~ `"4"` ? "" : ""}))
|
||||
(box
|
||||
:class {current-idx == "5" ? "active-workspace" : "regular"}
|
||||
(label :text ""))
|
||||
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "5" ? "active-workspace" : "regular"}
|
||||
(label :text {names =~ `"5"` ? "" : ""}))
|
||||
(box
|
||||
:class {current-idx == "6" ? "active-workspace" : "regular"}
|
||||
(label :text ""))
|
||||
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "6" ? "active-workspace" : "regular"}
|
||||
(label :text {names =~ `"6"` ? "" : ""}))
|
||||
(box
|
||||
:class {current-idx == "7" ? "active-workspace" : "regular"}
|
||||
(label :text ""))
|
||||
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "7" ? "active-workspace" : "regular"}
|
||||
(label :text {names =~ `"7"` ? "" : ""}))
|
||||
(box
|
||||
:class {current-idx == "8" ? "active-workspace" : "regular"}
|
||||
(label :text ""))
|
||||
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "8" ? "active-workspace" : "regular"}
|
||||
(label :text {names =~ `"8"` ? "" : ""}))
|
||||
(box
|
||||
:class {current-idx == "9" ? "active-workspace" : "regular"}
|
||||
(label :text ""))))
|
||||
:class {replace(captures(names, "\"[0-9]\"")[captures(current-idx, "[0-9]")[0][0]][0], "\"", "") == "9" ? "active-workspace" : "regular"}
|
||||
(label :text {names =~ `"9"` ? "" : ""}))))
|
||||
|
||||
(defwidget info []
|
||||
(box
|
||||
|
@ -51,7 +51,7 @@
|
|||
:space-evenly false
|
||||
:spacing "10"
|
||||
(_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)
|
||||
(sep)
|
||||
(buttons)))
|
||||
|
@ -90,11 +90,11 @@
|
|||
(defwidget _battery [status battery]
|
||||
(box
|
||||
:hexpand false
|
||||
:class {status == "" ? "regular" : battery < 20 ? "alert" : "regular"}
|
||||
:class {battery < 20 ? "alert" : "regular"}
|
||||
(revealer-on-hover
|
||||
:toggle battery-visible
|
||||
:togglename "battery-visible"
|
||||
(label :text {status == 'Charging' || status == "" ? "" :
|
||||
(label :text {status == 'Charging' ? "" :
|
||||
battery < 20 ? "" :
|
||||
battery < 40 ? "" :
|
||||
battery < 60 ? "" :
|
||||
|
@ -144,7 +144,7 @@
|
|||
{music != "" ? "🎵${music}" : ""}))
|
||||
|
||||
(defpoll volume :interval "1s"
|
||||
"pw-volume status | jq '.percentage'")
|
||||
"scripts/getvol")
|
||||
|
||||
(defpoll time :interval "10s"
|
||||
"date '+%H:%M %b %d, %Y'")
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
#! /bin/bash
|
||||
function clamp {
|
||||
min=$1
|
||||
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 = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 8;
|
||||
border_size = 2.0;
|
||||
gaps_out = 10;
|
||||
border_size = 1.7;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
};
|
||||
|
||||
|
@ -75,7 +75,7 @@ in
|
|||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
decoration = {
|
||||
shadow_offset = "5 5";
|
||||
shadow_offset = "0 5";
|
||||
rounding = 5;
|
||||
"col.shadow" = "rgba(00000099)";
|
||||
};
|
||||
|
|
|
@ -8,16 +8,17 @@ in
|
|||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
workspace = if (hostname == "NicksNixDesktop") then [
|
||||
"1,monitor:DP-3,default:true"
|
||||
"3,monitor:DP-3"
|
||||
"5,monitor:DP-3"
|
||||
"7,monitor:DP-3"
|
||||
"9,monitor:DP-3"
|
||||
"1,monitor:DP-4"
|
||||
"3,monitor:DP-4"
|
||||
"5,monitor:DP-4"
|
||||
"7,monitor:DP-4"
|
||||
"9,monitor:DP-4"
|
||||
|
||||
"2,monitor:DP-2,default:true"
|
||||
"2,monitor:DP-2"
|
||||
"4,monitor:DP-2"
|
||||
"6,monitor:DP-2"
|
||||
"8,monitor:DP-2"
|
||||
"10,monitor:DP-2"
|
||||
] else [
|
||||
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue