flakes: switch codex-cli-nix back to sadjow/main
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -26,3 +26,4 @@ gotools
|
|||||||
/dotfiles/emacs.d/.cache/
|
/dotfiles/emacs.d/.cache/
|
||||||
/dotfiles/config/fontconfig/conf.d/10-hm-fonts.conf
|
/dotfiles/config/fontconfig/conf.d/10-hm-fonts.conf
|
||||||
/dotfiles/config/fontconfig/conf.d/52-hm-default-fonts.conf
|
/dotfiles/config/fontconfig/conf.d/52-hm-default-fonts.conf
|
||||||
|
/dotfiles/config/taffybar/_scratch/
|
||||||
|
|||||||
@@ -15,3 +15,7 @@ screenshot:
|
|||||||
# Capture the reserved top area on all monitors (one file per monitor).
|
# Capture the reserved top area on all monitors (one file per monitor).
|
||||||
screenshot-all:
|
screenshot-all:
|
||||||
@scripts/taffybar-screenshot-all
|
@scripts/taffybar-screenshot-all
|
||||||
|
|
||||||
|
# Crop the top bar out of an existing screenshot (defaults to 56px high).
|
||||||
|
crop in out="":
|
||||||
|
@if [[ -n "{{out}}" ]]; then scripts/taffybar-crop-bar "{{in}}" "{{out}}"; else scripts/taffybar-crop-bar "{{in}}"; fi
|
||||||
|
|||||||
@@ -1,18 +1,7 @@
|
|||||||
@define-color accent #f1b2b2;
|
/* Compatibility wrapper.
|
||||||
@define-color bar-background rgba(12, 15, 24, 0.55);
|
*
|
||||||
@define-color bar-gradient-start rgba(20, 26, 40, 0.68);
|
* Historically this config loaded "palette.css". Keep that stable, but source
|
||||||
@define-color bar-gradient-end rgba(12, 18, 30, 0.68);
|
* all actual color definitions from "theme.css".
|
||||||
@define-color bar-border rgba(255, 255, 255, 0.06);
|
*/
|
||||||
/* Temporary: keep menus high-contrast and readable while debugging theme issues. */
|
@import url("theme.css");
|
||||||
@define-color menu-background-color #ffffff;
|
|
||||||
@define-color menu-font-color #000000;
|
|
||||||
@define-color menu-highlight rgba(0, 0, 0, 0.08);
|
|
||||||
@define-color font-color #e7e4ee;
|
|
||||||
@define-color font-muted #b8b1c6;
|
|
||||||
@define-color pill-background rgba(48, 52, 69, 0.92);
|
|
||||||
@define-color pill-border rgba(92, 95, 120, 0.85);
|
|
||||||
@define-color pill-highlight rgba(255, 255, 255, 0.10);
|
|
||||||
@define-color pill-shadow rgba(0, 0, 0, 0.28);
|
|
||||||
@define-color transparent rgba(0.0, 0.0, 0.0, 0.0);
|
|
||||||
@define-color white #ffffff;
|
|
||||||
@define-color black #000000;
|
|
||||||
|
|||||||
@@ -6,6 +6,24 @@ root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|||||||
pkill -u "$USER" -x taffybar || true
|
pkill -u "$USER" -x taffybar || true
|
||||||
|
|
||||||
cd "$root"
|
cd "$root"
|
||||||
|
|
||||||
|
# Hyprland can restart and change the instance signature, leaving old shells with
|
||||||
|
# a stale HYPRLAND_INSTANCE_SIGNATURE. Fix it before launching taffybar so any
|
||||||
|
# `hyprctl` calls inside the bar work.
|
||||||
|
if command -v hyprctl >/dev/null 2>&1 && command -v jq >/dev/null 2>&1; then
|
||||||
|
if ! hyprctl monitors -j >/dev/null 2>&1; then
|
||||||
|
if [[ -n "${WAYLAND_DISPLAY:-}" ]]; then
|
||||||
|
inst="$(hyprctl instances -j | jq -r --arg sock "$WAYLAND_DISPLAY" '.[] | select(.wl_socket == $sock) | .instance' | head -n1)"
|
||||||
|
else
|
||||||
|
inst="$(hyprctl instances -j | jq -r '.[0].instance // empty')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${inst:-}" ]]; then
|
||||||
|
export HYPRLAND_INSTANCE_SIGNATURE="$inst"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
setsid -f direnv exec . cabal run >/tmp/taffybar.log 2>&1
|
setsid -f direnv exec . cabal run >/tmp/taffybar.log 2>&1
|
||||||
|
|
||||||
echo "Started taffybar in the background. Logs: /tmp/taffybar.log"
|
echo "Started taffybar in the background. Logs: /tmp/taffybar.log"
|
||||||
|
|||||||
@@ -4,4 +4,21 @@ set -euo pipefail
|
|||||||
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
cd "$root"
|
cd "$root"
|
||||||
|
|
||||||
|
# Hyprland can restart and change the instance signature, leaving old shells with
|
||||||
|
# a stale HYPRLAND_INSTANCE_SIGNATURE. Fix it before launching taffybar so any
|
||||||
|
# `hyprctl` calls inside the bar work.
|
||||||
|
if command -v hyprctl >/dev/null 2>&1 && command -v jq >/dev/null 2>&1; then
|
||||||
|
if ! hyprctl monitors -j >/dev/null 2>&1; then
|
||||||
|
if [[ -n "${WAYLAND_DISPLAY:-}" ]]; then
|
||||||
|
inst="$(hyprctl instances -j | jq -r --arg sock "$WAYLAND_DISPLAY" '.[] | select(.wl_socket == $sock) | .instance' | head -n1)"
|
||||||
|
else
|
||||||
|
inst="$(hyprctl instances -j | jq -r '.[0].instance // empty')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${inst:-}" ]]; then
|
||||||
|
export HYPRLAND_INSTANCE_SIGNATURE="$inst"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
exec direnv exec . cabal run
|
exec direnv exec . cabal run
|
||||||
|
|||||||
@@ -1,7 +1,23 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
monitors="$(hyprctl monitors -j)"
|
hyprctl_cmd=(hyprctl)
|
||||||
|
|
||||||
|
# Hyprland can restart and change the instance signature, leaving old shells with
|
||||||
|
# a stale HYPRLAND_INSTANCE_SIGNATURE. Detect the live instance and use it.
|
||||||
|
if ! hyprctl monitors -j >/dev/null 2>&1; then
|
||||||
|
if [[ -n "${WAYLAND_DISPLAY:-}" ]]; then
|
||||||
|
inst="$(hyprctl instances -j | jq -r --arg sock "$WAYLAND_DISPLAY" '.[] | select(.wl_socket == $sock) | .instance' | head -n1)"
|
||||||
|
else
|
||||||
|
inst="$(hyprctl instances -j | jq -r '.[0].instance // empty')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${inst:-}" ]]; then
|
||||||
|
hyprctl_cmd=(hyprctl --instance "$inst")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
monitors="$("${hyprctl_cmd[@]}" monitors -j)"
|
||||||
height="$(jq -r '.[] | select(.focused) | .reserved[1]' <<<"$monitors")"
|
height="$(jq -r '.[] | select(.focused) | .reserved[1]' <<<"$monitors")"
|
||||||
geo="$(jq -r '.[] | select(.focused) | "\(.x),\(.y) \(.width)x\(.reserved[1])"' <<<"$monitors")"
|
geo="$(jq -r '.[] | select(.focused) | "\(.x),\(.y) \(.width)x\(.reserved[1])"' <<<"$monitors")"
|
||||||
|
|
||||||
@@ -11,6 +27,7 @@ if [[ -z "$geo" || "$height" == "0" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
out="/tmp/taffybar-$(date +%Y%m%d-%H%M%S).png"
|
# Include nanoseconds so consecutive screenshots don't overwrite each other.
|
||||||
|
out="/tmp/taffybar-$(date +%Y%m%d-%H%M%S-%N).png"
|
||||||
grim -g "$geo" "$out"
|
grim -g "$geo" "$out"
|
||||||
echo "$out"
|
echo "$out"
|
||||||
|
|||||||
@@ -1,7 +1,24 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ts="$(date +%Y%m%d-%H%M%S)"
|
hyprctl_cmd=(hyprctl)
|
||||||
|
|
||||||
|
# Hyprland can restart and change the instance signature, leaving old shells with
|
||||||
|
# a stale HYPRLAND_INSTANCE_SIGNATURE. Detect the live instance and use it.
|
||||||
|
if ! hyprctl monitors -j >/dev/null 2>&1; then
|
||||||
|
if [[ -n "${WAYLAND_DISPLAY:-}" ]]; then
|
||||||
|
inst="$(hyprctl instances -j | jq -r --arg sock "$WAYLAND_DISPLAY" '.[] | select(.wl_socket == $sock) | .instance' | head -n1)"
|
||||||
|
else
|
||||||
|
inst="$(hyprctl instances -j | jq -r '.[0].instance // empty')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${inst:-}" ]]; then
|
||||||
|
hyprctl_cmd=(hyprctl --instance "$inst")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Include nanoseconds so consecutive screenshots don't overwrite each other.
|
||||||
|
ts="$(date +%Y%m%d-%H%M%S-%N)"
|
||||||
found="0"
|
found="0"
|
||||||
|
|
||||||
while IFS=$'\t' read -r name geo; do
|
while IFS=$'\t' read -r name geo; do
|
||||||
@@ -9,7 +26,7 @@ while IFS=$'\t' read -r name geo; do
|
|||||||
out="/tmp/taffybar-${name}-${ts}.png"
|
out="/tmp/taffybar-${name}-${ts}.png"
|
||||||
grim -g "$geo" "$out"
|
grim -g "$geo" "$out"
|
||||||
echo "$out"
|
echo "$out"
|
||||||
done < <(hyprctl monitors -j | jq -r '.[] | select(.reserved[1] > 0) | "\(.name)\t\(.x),\(.y) \(.width)x\(.reserved[1])"')
|
done < <("${hyprctl_cmd[@]}" monitors -j | jq -r '.[] | select(.reserved[1] > 0) | "\(.name)\t\(.x),\(.y) \(.width)x\(.reserved[1])"')
|
||||||
|
|
||||||
if [[ "$found" == "0" ]]; then
|
if [[ "$found" == "0" ]]; then
|
||||||
echo "No monitors with a top reserved area found." >&2
|
echo "No monitors with a top reserved area found." >&2
|
||||||
|
|||||||
@@ -1,41 +1,50 @@
|
|||||||
/* Top level styling */
|
/* Widget/layout styling for taffybar.
|
||||||
|
*
|
||||||
.taffy-window {
|
* Colors live in `theme.css` (loaded via `palette.css`).
|
||||||
background-color: @bar-background;
|
*/
|
||||||
background-image: linear-gradient(to bottom, @bar-gradient-start, @bar-gradient-end);
|
|
||||||
border-bottom: 1px solid @bar-border;
|
|
||||||
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
|
|
||||||
}
|
|
||||||
|
|
||||||
.taffy-window * {
|
.taffy-window * {
|
||||||
font-family: "Iosevka Aile", "Noto Sans", sans-serif;
|
/* Most text should come from Iosevka Aile; icon glyphs (Font Awesome / Nerd
|
||||||
|
Font PUA) should come from a Nerd Font family to avoid tiny fallback glyphs. */
|
||||||
|
font-family: "Iosevka Aile", "Iosevka Nerd Font", "Iosevka NF", "Noto Sans", sans-serif;
|
||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: @font-color;
|
color: @font-color;
|
||||||
background-color: @transparent;
|
/* Bar background is painted on `.taffy-box`; most widget nodes stay
|
||||||
|
transparent so pills (outer-pad) read as "solid". */
|
||||||
|
background-color: transparent;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.taffy-box {
|
.taffy-box {
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
background-color: @transparent;
|
|
||||||
|
|
||||||
|
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
background-color: @bar-background;
|
||||||
|
background-image: linear-gradient(to bottom, @bar-gradient-start, @bar-gradient-end);
|
||||||
}
|
}
|
||||||
|
|
||||||
.outer-pad {
|
.outer-pad {
|
||||||
background-color: @pill-background;
|
background-color: @pill-background;
|
||||||
border: 1px solid @pill-border;
|
border: 0px;
|
||||||
border-radius: 6px;
|
border-radius: 12px;
|
||||||
margin: 4px 6px;
|
margin: 4px 6px;
|
||||||
box-shadow: 0 1px 0 @pill-highlight, 0 6px 14px @pill-shadow;
|
/* No white outline; define shape with subtle inner highlight + dark stroke. */
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 @pill-highlight,
|
||||||
|
inset 0 0 0 1px @pill-border,
|
||||||
|
0 10px 24px @pill-shadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner-pad {
|
.inner-pad {
|
||||||
padding: 1px 8px;
|
padding: 2px 10px;
|
||||||
border-radius: 5px;
|
border-radius: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contents {
|
.contents {
|
||||||
@@ -44,6 +53,44 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make each widget's squircle background feel "solid": avoid GTK nodes and
|
||||||
|
labels painting their own backgrounds on top of `.outer-pad`. */
|
||||||
|
.outer-pad *,
|
||||||
|
.inner-pad,
|
||||||
|
.inner-pad *,
|
||||||
|
.contents,
|
||||||
|
.contents * {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Right side widget palette overrides */
|
||||||
|
.outer-pad.audio {
|
||||||
|
background-color: @widget-audio-bg;
|
||||||
|
border-color: @widget-audio-border;
|
||||||
|
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.30);
|
||||||
|
}
|
||||||
|
.outer-pad.audio * {
|
||||||
|
color: @widget-audio-fg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.outer-pad.network {
|
||||||
|
background-color: @widget-network-bg;
|
||||||
|
border-color: @widget-network-border;
|
||||||
|
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.30);
|
||||||
|
}
|
||||||
|
.outer-pad.network * {
|
||||||
|
color: @widget-network-fg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.outer-pad.mpris {
|
||||||
|
background-color: @widget-mpris-bg;
|
||||||
|
border-color: @widget-mpris-border;
|
||||||
|
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.30);
|
||||||
|
}
|
||||||
|
.outer-pad.mpris * {
|
||||||
|
color: @widget-mpris-fg;
|
||||||
|
}
|
||||||
|
|
||||||
/* Workspaces styling */
|
/* Workspaces styling */
|
||||||
|
|
||||||
.workspaces .inner-pad {
|
.workspaces .inner-pad {
|
||||||
@@ -61,17 +108,46 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.workspace-label {
|
.workspace-label {
|
||||||
padding-right: 6px;
|
/* Overlay label (workspace number) that sits inside the icon "squircle". */
|
||||||
padding-left: 2px;
|
padding: 1px 3px;
|
||||||
padding-top: 0px;
|
margin: 0px;
|
||||||
font-size: 9pt;
|
font-size: 10pt;
|
||||||
opacity: 0.95;
|
opacity: 0.92;
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
transition: color .2s;
|
transition: color .2s;
|
||||||
|
background-color: @transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The workspace label is overlaid bottom-left over the workspace icon strip. */
|
||||||
|
.workspaces .overlay-box {
|
||||||
|
transition: background-color .2s, border-color .2s;
|
||||||
|
|
||||||
|
/* The workspace widget's outer-pad has margin; without this, the overlay
|
||||||
|
sits in the margin area and looks "outside" the squircle. */
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces .overlay-box .workspace-label {
|
||||||
|
/* GtkLabel often doesn't paint its own background, so style the eventbox and
|
||||||
|
keep the label itself transparent. */
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
padding: 0px;
|
||||||
|
color: rgba(255, 255, 255, 0.92);
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces .active .overlay-box {
|
||||||
|
background-color: transparent;
|
||||||
|
border-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contents .window-icon {
|
.contents .window-icon {
|
||||||
border-width: 1px;
|
border-width: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active .contents .window-icon {
|
.active .contents .window-icon {
|
||||||
@@ -80,25 +156,34 @@
|
|||||||
|
|
||||||
.active .contents {
|
.active .contents {
|
||||||
background-color: rgba(255, 255, 255, 0.10);
|
background-color: rgba(255, 255, 255, 0.10);
|
||||||
border-radius: 999px;
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overlay-box {
|
/* (Handled above for workspaces.) */
|
||||||
transition: background-color .5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.active .overlay-box {
|
|
||||||
padding: 0px;
|
|
||||||
border-color: @transparent;
|
|
||||||
border-width: 0px;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.visible .contents {
|
.visible .contents {
|
||||||
background-color: rgba(255, 255, 255, 0.06);
|
background-color: rgba(255, 255, 255, 0.06);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.workspaces .window-icon-container,
|
||||||
|
.workspaces .window-icon-container.active {
|
||||||
|
/* Don't give each window icon its own background/border; the workspace
|
||||||
|
squircle is the background. */
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0px;
|
||||||
|
box-shadow: none;
|
||||||
|
padding: 0px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces .active .contents,
|
||||||
|
.workspaces .visible .contents {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces .window-icon {
|
||||||
|
border-width: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.window-icon-container {
|
.window-icon-container {
|
||||||
transition: opacity .2s, box-shadow .2s;
|
transition: opacity .2s, box-shadow .2s;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@@ -142,6 +227,7 @@
|
|||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.taffy-window button:checked, .taffy-window button:hover .Contents:hover {
|
.taffy-window button:checked, .taffy-window button:hover .Contents:hover {
|
||||||
box-shadow: inset 0 -2px @accent;
|
box-shadow: inset 0 -2px @accent;
|
||||||
background-color: rgba(255, 255, 255, 0.06);
|
background-color: rgba(255, 255, 255, 0.06);
|
||||||
@@ -293,6 +379,6 @@ popover modelbutton:hover * {
|
|||||||
letter-spacing: 0.2px;
|
letter-spacing: 0.2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mpris label {
|
r.mpris label {
|
||||||
color: @font-muted;
|
color: @font-muted;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import System.Taffybar.Widget
|
|||||||
import System.Taffybar.Widget.Generic.Icon
|
import System.Taffybar.Widget.Generic.Icon
|
||||||
import System.Taffybar.Widget.Generic.PollingGraph
|
import System.Taffybar.Widget.Generic.PollingGraph
|
||||||
import System.Taffybar.Widget.Generic.PollingLabel
|
import System.Taffybar.Widget.Generic.PollingLabel
|
||||||
|
import qualified System.Taffybar.Widget.NetworkManager as NetworkManager
|
||||||
|
import qualified System.Taffybar.Widget.PulseAudio as PulseAudio
|
||||||
import System.Taffybar.Widget.Util
|
import System.Taffybar.Widget.Util
|
||||||
import qualified System.Taffybar.Widget.HyprlandWorkspaces as Hyprland
|
import qualified System.Taffybar.Widget.HyprlandWorkspaces as Hyprland
|
||||||
import qualified System.Taffybar.Widget.Workspaces as X11Workspaces
|
import qualified System.Taffybar.Widget.Workspaces as X11Workspaces
|
||||||
@@ -285,12 +287,22 @@ main = do
|
|||||||
let relativeFiles = fromMaybe ["palette.css", "taffybar.css"] $ lookup hostName cssFilesByHostname
|
let relativeFiles = fromMaybe ["palette.css", "taffybar.css"] $ lookup hostName cssFilesByHostname
|
||||||
cssFiles <- mapM (getUserConfigFile "taffybar") relativeFiles
|
cssFiles <- mapM (getUserConfigFile "taffybar") relativeFiles
|
||||||
|
|
||||||
let myCPU = deocrateWithSetClassAndBoxes "cpu" $
|
let myCPU =
|
||||||
|
( deocrateWithSetClassAndBoxes "cpu" $
|
||||||
pollingGraphNew cpuCfg 5 cpuCallback
|
pollingGraphNew cpuCfg 5 cpuCallback
|
||||||
myMem = deocrateWithSetClassAndBoxes "mem" $
|
) :: TaffyIO Gtk.Widget
|
||||||
|
myMem =
|
||||||
|
( deocrateWithSetClassAndBoxes "mem" $
|
||||||
pollingGraphNew memCfg 5 memCallback
|
pollingGraphNew memCfg 5 memCallback
|
||||||
myNet = deocrateWithSetClassAndBoxes "net" $
|
) :: TaffyIO Gtk.Widget
|
||||||
|
myNet =
|
||||||
|
( deocrateWithSetClassAndBoxes "net" $
|
||||||
networkGraphNew netCfg Nothing
|
networkGraphNew netCfg Nothing
|
||||||
|
) :: TaffyIO Gtk.Widget
|
||||||
|
myAudio = deocrateWithSetClassAndBoxes "audio" $
|
||||||
|
PulseAudio.pulseAudioLabelNew
|
||||||
|
myNetwork = deocrateWithSetClassAndBoxes "network" $
|
||||||
|
NetworkManager.networkManagerWifiLabelNew
|
||||||
myLayout = deocrateWithSetClassAndBoxes "layout" $
|
myLayout = deocrateWithSetClassAndBoxes "layout" $
|
||||||
layoutNew defaultLayoutConfig
|
layoutNew defaultLayoutConfig
|
||||||
myWindows = deocrateWithSetClassAndBoxes "windows" $
|
myWindows = deocrateWithSetClassAndBoxes "windows" $
|
||||||
@@ -330,102 +342,46 @@ main = do
|
|||||||
{ clockUpdateStrategy = RoundedTargetInterval 60 0.0
|
{ clockUpdateStrategy = RoundedTargetInterval 60 0.0
|
||||||
, clockFormatString = "%a %b %_d, 🕑%I:%M %p"
|
, clockFormatString = "%a %b %_d, 🕑%I:%M %p"
|
||||||
}
|
}
|
||||||
-- Disabled for now: StatusNotifierWatcher errors under Hyprland.
|
myMpris =
|
||||||
-- myTray = deocrateWithSetClassAndBoxes "tray" $
|
mpris2NewWithConfig
|
||||||
-- sniTrayNewFromParams defaultTrayParams { trayLeftClickAction = PopupMenu
|
MPRIS2Config
|
||||||
-- , trayRightClickAction = Activate
|
{ mprisWidgetWrapper = deocrateWithSetClassAndBoxes "mpris" . return
|
||||||
-- }
|
|
||||||
myMpris = mpris2NewWithConfig
|
|
||||||
MPRIS2Config { mprisWidgetWrapper = deocrateWithSetClassAndBoxes "mpris" . return
|
|
||||||
, updatePlayerWidget =
|
, updatePlayerWidget =
|
||||||
simplePlayerWidget
|
simplePlayerWidget
|
||||||
defaultPlayerConfig
|
defaultPlayerConfig
|
||||||
{ setNowPlayingLabel = playingText 20 20 }
|
{ setNowPlayingLabel = playingText 20 20
|
||||||
|
}
|
||||||
}
|
}
|
||||||
myBatteryIcon = deocrateWithSetClassAndBoxes "battery-icon" batteryIconNew
|
myBatteryIcon = deocrateWithSetClassAndBoxes "battery-icon" batteryIconNew
|
||||||
myBatteryText =
|
myBatteryText =
|
||||||
deocrateWithSetClassAndBoxes "battery-text" $ textBatteryNew "$percentage$%"
|
deocrateWithSetClassAndBoxes "battery-text" $ textBatteryNew "$percentage$%"
|
||||||
batteryWidgets = [ myBatteryIcon, myBatteryText ]
|
batteryWidgets = [ myBatteryIcon, myBatteryText ]
|
||||||
baseEndWidgets =
|
baseEndWidgets = [ myAudio, myNetwork, myMpris ]
|
||||||
[ myMpris
|
|
||||||
]
|
|
||||||
fullEndWidgets = baseEndWidgets ++ [ myCPU, myMem, myNet, myMpris ]
|
|
||||||
laptopEndWidgets = batteryWidgets ++ baseEndWidgets
|
laptopEndWidgets = batteryWidgets ++ baseEndWidgets
|
||||||
baseConfigX11 =
|
startWidgetsForBackend =
|
||||||
defaultSimpleTaffyConfig
|
|
||||||
{ startWidgets = [ myWorkspaces, myLayout, myWindows ]
|
|
||||||
, endWidgets = baseEndWidgets
|
|
||||||
, barPosition = Top
|
|
||||||
, widgetSpacing = 0
|
|
||||||
, barPadding = 4
|
|
||||||
, barHeight = ScreenRatio $ 1/36
|
|
||||||
, cssPaths = cssFiles
|
|
||||||
, centerWidgets = [ myClock ]
|
|
||||||
}
|
|
||||||
baseConfigWayland =
|
|
||||||
defaultSimpleTaffyConfig
|
|
||||||
{ startWidgets = [ myHyprWorkspaces ]
|
|
||||||
, endWidgets = baseEndWidgets
|
|
||||||
, barPosition = Top
|
|
||||||
, widgetSpacing = 0
|
|
||||||
, barPadding = 4
|
|
||||||
, barHeight = ScreenRatio $ 1/36
|
|
||||||
, cssPaths = cssFiles
|
|
||||||
, centerWidgets = [ myClock ]
|
|
||||||
}
|
|
||||||
x11Overrides =
|
|
||||||
[ ( "uber-loaner"
|
|
||||||
, baseConfigX11 { endWidgets = laptopEndWidgets }
|
|
||||||
)
|
|
||||||
, ( "adell"
|
|
||||||
, baseConfigX11 { endWidgets = laptopEndWidgets }
|
|
||||||
)
|
|
||||||
, ( "stevie-nixos"
|
|
||||||
, baseConfigX11 { endWidgets = laptopEndWidgets
|
|
||||||
, startWidgets = [ myWorkspaces, myLayout ]
|
|
||||||
}
|
|
||||||
)
|
|
||||||
, ( "strixi-minaj"
|
|
||||||
, baseConfigX11 { endWidgets = laptopEndWidgets }
|
|
||||||
)
|
|
||||||
, ( "jay-lenovo"
|
|
||||||
, baseConfigX11 { endWidgets = laptopEndWidgets }
|
|
||||||
)
|
|
||||||
, ( "nixquick"
|
|
||||||
, baseConfigX11 { endWidgets = [ myMpris ] }
|
|
||||||
)
|
|
||||||
]
|
|
||||||
waylandOverrides =
|
|
||||||
[ ( "uber-loaner"
|
|
||||||
, baseConfigWayland { endWidgets = laptopEndWidgets }
|
|
||||||
)
|
|
||||||
, ( "adell"
|
|
||||||
, baseConfigWayland { endWidgets = laptopEndWidgets }
|
|
||||||
)
|
|
||||||
, ( "stevie-nixos"
|
|
||||||
, baseConfigWayland { endWidgets = laptopEndWidgets }
|
|
||||||
)
|
|
||||||
, ( "strixi-minaj"
|
|
||||||
, baseConfigWayland { endWidgets = laptopEndWidgets }
|
|
||||||
)
|
|
||||||
, ( "jay-lenovo"
|
|
||||||
, baseConfigWayland { endWidgets = laptopEndWidgets }
|
|
||||||
)
|
|
||||||
, ( "nixquick"
|
|
||||||
, baseConfigWayland { endWidgets = [ myMpris ] }
|
|
||||||
)
|
|
||||||
]
|
|
||||||
selectedConfig =
|
|
||||||
case backend of
|
case backend of
|
||||||
BackendX11 ->
|
BackendX11 -> [ myWorkspaces, myLayout, myWindows ]
|
||||||
fromMaybe baseConfigX11 $ lookup hostName x11Overrides
|
BackendWayland -> [ myHyprWorkspaces ]
|
||||||
BackendWayland ->
|
baseConfig =
|
||||||
fromMaybe baseConfigWayland $ lookup hostName waylandOverrides
|
defaultSimpleTaffyConfig
|
||||||
simpleTaffyConfig = selectedConfig
|
{ startWidgets = startWidgetsForBackend
|
||||||
{ centerWidgets = [ myClock ]
|
, endWidgets = baseEndWidgets
|
||||||
-- , endWidgets = []
|
, barPosition = Top
|
||||||
-- , startWidgets = []
|
, widgetSpacing = 0
|
||||||
|
, barPadding = 4
|
||||||
|
, barHeight = ScreenRatio $ 1 / 36
|
||||||
|
, cssPaths = cssFiles
|
||||||
|
, centerWidgets = [ myClock ]
|
||||||
}
|
}
|
||||||
|
hostOverrides =
|
||||||
|
[ ("uber-loaner", \cfg -> cfg { endWidgets = laptopEndWidgets })
|
||||||
|
, ("adell", \cfg -> cfg { endWidgets = laptopEndWidgets })
|
||||||
|
, ("stevie-nixos", \cfg -> cfg { endWidgets = laptopEndWidgets })
|
||||||
|
, ("strixi-minaj", \cfg -> cfg { endWidgets = laptopEndWidgets })
|
||||||
|
, ("jay-lenovo", \cfg -> cfg { endWidgets = laptopEndWidgets })
|
||||||
|
]
|
||||||
|
simpleTaffyConfig =
|
||||||
|
fromMaybe baseConfig $ ($ baseConfig) <$> lookup hostName hostOverrides
|
||||||
startTaffybar $
|
startTaffybar $
|
||||||
withLogServer $
|
withLogServer $
|
||||||
withToggleServer $
|
withToggleServer $
|
||||||
|
|||||||
12
nix-darwin/flake.lock
generated
12
nix-darwin/flake.lock
generated
@@ -70,16 +70,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770321000,
|
"lastModified": 1770406581,
|
||||||
"narHash": "sha256-g5Q2VES3eKkLiHfRTeuhmStxZvgb+/oTtRnSEXrPZQk=",
|
"narHash": "sha256-5EBQV4crivXXwhrA+1s9ApMWryES/eadcNETtHin6Ko=",
|
||||||
"owner": "colonelpanic8",
|
"owner": "sadjow",
|
||||||
"repo": "codex-cli-nix",
|
"repo": "codex-cli-nix",
|
||||||
"rev": "9386e1dfd5555b949bb934f062e8cb7971868f8d",
|
"rev": "d3abf748ac6a06016a6fff14b5a99dedacf72378",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "colonelpanic8",
|
"owner": "sadjow",
|
||||||
"ref": "fix/add-libcap-to-rpath",
|
"ref": "main",
|
||||||
"repo": "codex-cli-nix",
|
"repo": "codex-cli-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
codex-cli-nix = {
|
codex-cli-nix = {
|
||||||
url = "github:colonelpanic8/codex-cli-nix/fix/add-libcap-to-rpath";
|
# Default branch is `main` on GitHub (not `master`).
|
||||||
|
url = "github:sadjow/codex-cli-nix/main";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
12
nixos/flake.lock
generated
12
nixos/flake.lock
generated
@@ -153,16 +153,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770321000,
|
"lastModified": 1770406581,
|
||||||
"narHash": "sha256-g5Q2VES3eKkLiHfRTeuhmStxZvgb+/oTtRnSEXrPZQk=",
|
"narHash": "sha256-5EBQV4crivXXwhrA+1s9ApMWryES/eadcNETtHin6Ko=",
|
||||||
"owner": "colonelpanic8",
|
"owner": "sadjow",
|
||||||
"repo": "codex-cli-nix",
|
"repo": "codex-cli-nix",
|
||||||
"rev": "9386e1dfd5555b949bb934f062e8cb7971868f8d",
|
"rev": "d3abf748ac6a06016a6fff14b5a99dedacf72378",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "colonelpanic8",
|
"owner": "sadjow",
|
||||||
"ref": "fix/add-libcap-to-rpath",
|
"ref": "main",
|
||||||
"repo": "codex-cli-nix",
|
"repo": "codex-cli-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,8 @@
|
|||||||
nixtheplanet.url = "github:matthewcroughan/nixtheplanet";
|
nixtheplanet.url = "github:matthewcroughan/nixtheplanet";
|
||||||
|
|
||||||
codex-cli-nix = {
|
codex-cli-nix = {
|
||||||
url = "github:colonelpanic8/codex-cli-nix/fix/add-libcap-to-rpath";
|
# Default branch is `main` on GitHub (not `master`).
|
||||||
|
url = "github:sadjow/codex-cli-nix/main";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user