eww mako and wezterm

This commit is contained in:
Jonas H
2026-02-27 23:34:25 +01:00
parent b8719a9907
commit deb0457d7c
24 changed files with 1021 additions and 0 deletions

View File

@@ -0,0 +1,189 @@
*{
all: unset;
}
window {
font-family: "JetBrainsMono Nerd Font", monospace;
background-color: #000000;
color: #FFFFFF;
}
/* Global normalization - no widget should add spacing */
eventbox, box, label, scale {
padding: 0;
margin: 0;
}
$font-family: "JetBrainsMono Nerd Font", monospace;
// Global colors (sync with ~/.config/colors)
$bg-bar: #000000;
$track: #3a3a3a;
$accent: #E0AF68;
$urgent: #F7768E;
$fg: #ffffff;
// Legacy
$background: $bg-bar;
$foreground: $fg;
.workspace-entry {
/* Styles for all workspace entries */
padding: 0 0.5em;
font-family: $font-family;
color : $foreground;
}
.workspace-entry.current {
/* Styles for the current workspace */
color: $accent;
font-weight: bold;
}
.workspace-entry.urgent {
/* Styles for urgent workspaces */
color: $urgent;
font-weight: bold;
}
.time-label {
font-family: $font-family;
color : $foreground;
font-weight: bold;
margin-right: 5px;
}
.notification-eventbox {
padding: 0;
min-width: 0;
min-height: 0;
}
.notification-icon {
font-family: $font-family;
color : $foreground;
font-weight: bold;
margin-right: 5px;
}
.battery-percent {
font-family: $font-family;
color : $foreground;
font-weight: bold;
margin-right: 5px;
}
.battery-icon {
font-family: $font-family;
color : $foreground;
font-weight: bold;
}
.bar {
background-color: $background;
}
.wifi-eventbox {
padding: 0;
min-width: 0;
min-height: 0;
}
.wifi-icon{
color : $foreground;
background-color: $background;
font-weight: bold;
}
.brightness-icon {
color: $foreground;
font-weight: bold;
margin-right: 3px;
}
.volume-icon {
color: $foreground;
font-weight: bold;
margin-right: 3px;
}
.volume-bar {
min-width: 10px;
min-height: 6px;
padding: 0;
margin: 0;
margin-right: 10px;
border: none;
outline: none;
}
.volume-bar trough {
background-color: $track;
border-radius: 3px;
min-height: 6px;
min-width: 10px;
padding: 0;
margin: 0;
border: none;
outline: none;
}
.volume-bar highlight {
background-color: $fg;
border-radius: 3px;
padding: 0;
margin: 0;
}
.volume-bar slider {
all: unset;
padding: 0;
margin: 0;
min-width: 0;
min-height: 0;
}
.brightness-bar {
min-width: 10px;
min-height: 6px;
padding: 0;
margin: 0;
margin-right: 10px;
border: none;
outline: none;
}
.brightness-bar trough {
background-color: $track;
border-radius: 3px;
min-height: 6px;
min-width: 10px;
padding: 0;
margin: 0;
border: none;
outline: none;
}
.brightness-bar highlight {
background-color: $fg;
border-radius: 3px;
padding: 0;
margin: 0;
}
.brightness-bar slider {
all: unset;
padding: 0;
margin: 0;
min-width: 0;
min-height: 0;
}
tooltip {
background-color: $bg-bar;
color: $fg;
border: none;
border-radius: 0;
font-family: "JetBrainsMono Nerd Font", monospace;
}

View File

@@ -0,0 +1,122 @@
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace")
(defwidget workspaces [monitor]
(eventbox :onscroll "bash ~/.config/eww/scripts/change-active-workspace {} ${current_workspace}" :class "workspaces-widget"
(box :spacing 10 :orientation "h" :halign "start" :space-evenly false
(label :text "${workspaces}${current_workspace}" :visible false)
(for workspace in workspaces
(box
:visible {workspace.output == monitor}
(eventbox :onclick "swaymsg workspace number ${workspace.id}"
(box :class "workspace-entry ${workspace.focused ? 'current' : ''} ${workspace.urgent ? 'urgent' : ''}"
(label :text "${workspace.id}"))))))))
(defpoll time :interval "1s"
"date '+%H:%M'")
(defpoll time_tooltip :interval "1s"
"date '+%A, %B %d, %Y'")
(defwidget time-widget []
(label
:text {time}
:tooltip time_tooltip
:class "time-label"))
(defwidget notification-widget []
(eventbox :class "notification-eventbox" :onclick "bash ~/.config/eww/scripts/notification-history-toggle"
:tooltip "Toggle notification history"
(label :text "" :class "notification-icon")))
(deflisten BATPERC :initial "" "bash ~/.config/eww/scripts/battery-perc-monitor")
(deflisten BATICON :initial "" "bash ~/.config/eww/scripts/battery-icon-monitor")
(deflisten BATTIME :initial "" "bash ~/.config/eww/scripts/battery-time-monitor")
(defwidget battery-widget []
(box :orientation "horizontal" :spacing 0 :tooltip "Time remaining: ${BATTIME}"
(label :text {BATICON} :class "battery-icon")
(label :text {BATPERC} :class "battery-percent")))
(defwidget internet []
(label :text wifi-icon
:tooltip wifi-name
:class "wifi-icon"))
(deflisten wifi-icon :initial "󰪎" "bash ~/.config/eww/scripts/wifi-monitor")
(deflisten wifi-name :initial "" "bash ~/.config/eww/scripts/wifi-name-monitor")
(deflisten brightness :initial "50" "bash ~/.config/eww/scripts/brightness")
(defwidget brightness-widget []
(eventbox :onscroll "[ {} = up ] && brightnessctl set 10%+ || brightnessctl set 10%-"
:tooltip "Brightness: ${brightness}%"
(box :orientation "h" :spacing 0
(label :text "󰌵" :class "brightness-icon")
(scale :min 0
:max 100
:value brightness
:class "brightness-bar"
:onchange "brightnessctl set {}%"))))
(deflisten volume :initial "50" "bash ~/.config/eww/scripts/volume")
(deflisten volume-icon :initial "" "bash ~/.config/eww/scripts/volume-icon-monitor")
(defwidget volume-widget []
(eventbox :onscroll "[ {} = up ] && pactl set-sink-volume @DEFAULT_SINK@ +10% || pactl set-sink-volume @DEFAULT_SINK@ -10%"
:tooltip "Volume: ${volume}%"
(box :orientation "h" :spacing 0
(label :text volume-icon :class "volume-icon")
(scale :min 0
:max 100
:value volume
:class "volume-bar"
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"))))
(defwidget system []
(box :orientation "h" :halign "end" :spacing 0
(internet)
(brightness-widget)
(volume-widget)
(battery-widget)
(time-widget)
(notification-widget)))
(defwidget bar [monitor]
(box :orientation "h" :space-evenly false
(workspaces :monitor monitor)
(box :hexpand true)
(system)))
(defwindow bar0
:monitor 0
:geometry (geometry :x "0%"
:y "0px"
:width "100%"
:height "30px"
:anchor "top center")
:stacking "fg"
:exclusive true
:reserve (struts :distance "40px" :side "top")
:windowtype "dock"
:wm-ignore false
(bar :monitor "HDMI-A-1"))
(defwindow bar1
:monitor 1
:geometry (geometry :x "0%"
:y "0px"
:width "100%"
:height "30px"
:anchor "top center")
:stacking "fg"
:exclusive true
:reserve (struts :distance "40px" :side "top")
:windowtype "dock"
:wm-ignore false
(bar :monitor "eDP-1"))

View File

@@ -0,0 +1,92 @@
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace")
(defwidget workspaces [monitor]
(eventbox :onscroll "bash ~/.config/eww/scripts/change-active-workspace {} ${current_workspace}" :class "workspaces-widget"
(box :spacing 10 :orientation "h" :halign "start" :space-evenly false
(label :text "${workspaces}${current_workspace}" :visible false)
(for workspace in workspaces
(box
:visible {workspace.output == monitor}
(eventbox :onclick "swaymsg workspace number ${workspace.id}"
(box :class "workspace-entry ${workspace.focused ? 'current' : ''} ${workspace.urgent ? 'urgent' : ''}"
(label :text "${workspace.id}"))))))))
(defpoll time :interval "1s"
"date '+%H:%M'")
(defwidget time-widget []
(label
:text {time}
:class "time-label"))
(deflisten BATPERC :initial "" "bash ~/.config/eww/scripts/battery-perc-monitor")
(deflisten BATICON :initial "" "bash ~/.config/eww/scripts/battery-icon-monitor")
(defwidget battery-widget []
(box :orientation "horizontal" :spacing 0
(label :text {BATICON} :class "battery-icon")
(label :text {BATPERC} :class "battery-percent")))
(defwidget wifi []
(label :text wifi-icon
:class "wifi-icon"))
(deflisten wifi-icon :initial "󰪎" "bash ~/.config/eww/scripts/wifi-monitor")
(deflisten wifi-name :initial "" "bash ~/.config/eww/scripts/wifi-name-monitor")
(deflisten brightness :initial "50" "bash ~/.config/eww/scripts/brightness")
(defwidget brightness-widget []
(eventbox :onscroll "[ {} = up ] && brightnessctl set 5%+ || brightnessctl set 5%-"
(box :orientation "h" :spacing 0
(label :text "󰌵" :class "brightness-icon")
(scale :min 0
:max 100
:value brightness
:class "brightness-bar"
:onchange "brightnessctl set {}%"))))
(deflisten volume :initial "50" "bash ~/.config/eww/scripts/volume")
(defwidget volume-widget []
(box :orientation "h" :spacing 0
(label :text "" :class "volume-icon")
(scale :min 0
:max 100
:value volume
:class "volume-bar"
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%")))
(defwidget system []
(box :orientation "h" :halign "end" :spacing 0
(brightness-widget)
(volume-widget)
(wifi)
(battery-widget)
(time-widget)))
(defwidget bar [monitor]
(box :orientation "h" :space-evenly false
(workspaces :monitor monitor)
(box :hexpand true)
(system)))
(defwindow bar0
:monitor 0
:geometry (geometry :x "0%"
:y "0px"
:width "100%"
:height "30px"
:anchor "top center")
:stacking "fg"
:exclusive true
:reserve (struts :distance "40px" :side "top")
:windowtype "dock"
:wm-ignore false
(bar :monitor "eDP-1"))

View File

@@ -0,0 +1,29 @@
#!/bin/bash
## Get battery info
BATTERY="$(acpi | awk -F ' ' 'NR==1 {print $4; exit}' | tr -d \%,)"
CHARGE="$(acpi | awk -F ' ' 'END {print $3}' | tr -d \,)"
main() {
if [[ ($CHARGE = *"Charging"*) && ($BATTERY -lt "100") ]]; then
echo "󱐋"
elif [[ $CHARGE = *"Full"* ]]; then
echo ""
else
if [[ ($BATTERY -lt 100) && (($BATTERY -gt 65) || ($BATTERY -eq 65)) ]]; then
echo ""
elif [[ ($BATTERY -lt 65) && (($BATTERY -gt 35) || ($BATTERY -eq 35)) ]]; then
echo ""
elif [[ ($BATTERY -lt 35) && (($BATTERY -gt 10) || ($BATTERY -eq 10)) ]]; then
echo ""
elif [[ ($BATTERY -lt 10) && (($BATTERY -gt 0) || ($BATTERY -eq 0)) ]]; then
echo ""
fi
fi
}
if [[ $1 == '--icon' ]]; then
main
elif [[ $1 == '--perc' ]]; then
echo "${BATTERY}%"
fi

View File

@@ -0,0 +1,13 @@
#!/bin/bash
get_icon() {
bash ~/.config/eww/scripts/battery --icon
}
# Output initial state
get_icon
# Monitor battery events using upower
upower --monitor | while read -r line; do
get_icon
done

View File

@@ -0,0 +1,13 @@
#!/bin/bash
get_perc() {
bash ~/.config/eww/scripts/battery --perc
}
# Output initial state
get_perc
# Monitor battery events using upower
upower --monitor | while read -r line; do
get_perc
done

View File

@@ -0,0 +1,13 @@
#!/bin/bash
get_time() {
acpi -b | grep -oP '\d{2}:\d{2}:\d{2}' || echo "Calculating..."
}
# Output initial state
get_time
# Monitor battery events using upower
upower --monitor | while read -r line; do
get_time
done

View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Get current brightness percentage
get_brightness() {
local current=$(brightnessctl get)
local max=$(brightnessctl max)
echo $((current * 100 / max))
}
# Output initial brightness
get_brightness
# Monitor brightness changes
inotifywait -m -e modify /sys/class/backlight/*/brightness 2>/dev/null | while read -r; do
get_brightness
done

View File

@@ -0,0 +1,8 @@
#!/bin/bash
current=$1
direction=$2
if [ "$direction" = "up" ]; then
swaymsg workspace number $((current + 1))
elif [ "$direction" = "down" ]; then
swaymsg workspace number $((current - 1))
fi

View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Function to get focused workspace
get_focused() {
swaymsg -t get_workspaces | jq -r '.[] | select(.focused==true) | .num'
}
# Output initial state
get_focused
# Subscribe to workspace events and output updates
swaymsg -t subscribe -m '["workspace"]' | while read -r event; do
get_focused
done

View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Function to get and format workspaces
get_workspaces() {
swaymsg -t get_workspaces | jq -c '[.[] | {id: .num, output: .output, focused: .focused, visible: .visible, urgent: .urgent}]'
}
# Output initial state
get_workspaces
# Subscribe to workspace events and output updates
swaymsg -t subscribe -m '["workspace"]' | while read -r event; do
get_workspaces
done

View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Toggle notification history display (mako version)
# Shows up to 10 previous notifications, or closes all if any are displayed
# Check if there are any notifications currently displayed
displayed=$(makoctl list 2>/dev/null | grep -c "^Notification" 2>/dev/null)
if [ "$displayed" -gt 0 ]; then
# If notifications are showing, dismiss them all
makoctl dismiss -a
else
# If no notifications are showing, restore up to 10 from history
for i in {1..10}; do
makoctl restore 2>/dev/null || break
done
fi

View File

@@ -0,0 +1,6 @@
#!/bin/sh
if [ "$1" = "wifi" ]; then
alacritty -e nmtui
fi

View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Get current volume percentage
get_volume() {
pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+%' | head -1 | tr -d '%'
}
# Output initial volume
get_volume
# Subscribe to volume changes
pactl subscribe | grep --line-buffered "sink" | while read -r line; do
get_volume
done

View File

@@ -0,0 +1,19 @@
#!/bin/bash
# Get current mute state and return appropriate icon
get_volume_icon() {
muted=$(pactl get-sink-mute @DEFAULT_SINK@ | grep -o 'yes\|no')
if [ "$muted" = "yes" ]; then
echo " "
else
echo ""
fi
}
# Output initial icon
get_volume_icon
# Subscribe to volume changes (including mute/unmute)
pactl subscribe | grep --line-buffered "sink" | while read -r line; do
get_volume_icon
done

View File

@@ -0,0 +1,13 @@
#!/bin/sh
symbol() {
[ $(cat /sys/class/net/w*/operstate) = down ] && echo 󰪎 && exit
echo 󰖟
}
name() {
nmcli | grep "^wlp" | sed 's/\ connected\ to\ /Connected to /g' | cut -d ':' -f2
}
[ "$1" = "icon" ] && symbol && exit
[ "$1" = "name" ] && name && exit

View File

@@ -0,0 +1,13 @@
#!/bin/bash
get_icon() {
[ $(cat /sys/class/net/w*/operstate 2>/dev/null) = down ] && echo "󰪎" || echo "󰖟"
}
# Output initial state
get_icon
# Monitor network changes
nmcli monitor | while read -r line; do
get_icon
done

View File

@@ -0,0 +1,13 @@
#!/bin/bash
get_name() {
nmcli | grep "^wlp" | sed 's/\ connected\ to\ /Connected to /g' | cut -d ':' -f2
}
# Output initial state
get_name
# Monitor network changes
nmcli monitor | while read -r line; do
get_name
done

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 MiB

49
mako/.config/mako/config Normal file
View File

@@ -0,0 +1,49 @@
# Mako notification configuration
# Styled to match Sway/Fuzzel/eww theme
# Generated from template using ~/.config/update-colors
# Appearance
font=JetBrainsMono Nerd Font 10
background-color=#1c2433
text-color=#afbbd2
border-color=#69C3FF
border-size=3
border-radius=7
width=300
height=300
margin=5
padding=8
icon-path=/usr/share/icons/Papirus-Dark
# Layout
anchor=top-right
outer-margin=30,0,0,0
# Behavior
default-timeout=6000
ignore-timeout=0
max-visible=20
sort=-time
# Format - show app name in italics
format=<b>%s</b> <i>(%a)</i>\n%b
markup=1
# Mouse bindings - click to focus app, invoke action, and close
on-button-left=exec ~/.config/mako/scripts/handle-click $id
on-button-middle=none
on-button-right=exec makoctl dismiss -n $id
# Urgency levels
[urgency=low]
background-color=#212a3b
border-color=#405275
[urgency=normal]
background-color=#1c2433
border-color=#69C3FF
[urgency=critical]
background-color=#1c2433
border-color=#FF738A
default-timeout=0

View File

@@ -0,0 +1,49 @@
# Mako notification configuration
# Styled to match Sway/Fuzzel/eww theme
# Generated from template using ~/.config/update-colors
# Appearance
font=JetBrainsMono Nerd Font 10
background-color=#$BG
text-color=#$FG
border-color=#$BORDER
border-size=3
border-radius=7
width=300
height=300
margin=5
padding=8
icon-path=/usr/share/icons/Papirus-Dark
# Layout
anchor=top-center
outer-margin=30,0,0,0
# Behavior
default-timeout=6000
ignore-timeout=0
max-visible=20
sort=-time
# Format - show app name in italics
format=<b>%s</b> <i>(%a)</i>\n%b
markup=1
# Mouse bindings - click to focus app, invoke action, and close
on-button-left=exec ~/.config/mako/scripts/handle-click $id
on-button-middle=none
on-button-right=exec makoctl dismiss -n $id
# Urgency levels
[urgency=low]
background-color=#$BG_BAR
border-color=#$TRACK
[urgency=normal]
background-color=#$BG
border-color=#$BORDER
[urgency=critical]
background-color=#$BG
border-color=#$URGENT
default-timeout=0

View File

@@ -0,0 +1,43 @@
#!/bin/bash
# Handle notification click: focus app → invoke action → close
# Called by mako with notification ID as parameter
ID="$1"
if [ -z "$ID" ]; then
exit 0
fi
# Get app name from notification using makoctl
APPNAME=$(makoctl list | grep -A 2 "^Notification $ID" | grep "App name:" | cut -d: -f2- | xargs)
# Step 1: Focus the application window in Sway (if app name found)
if [ -n "$APPNAME" ]; then
# Get the workspace of the window
WORKSPACE=$(swaymsg -t get_tree | jq -r ".. | select(.app_id?==\"$APPNAME\" or .window_properties?.class?==\"$APPNAME\") | .workspace" | head -1)
# If workspace not found, try case-insensitive
if [ -z "$WORKSPACE" ] || [ "$WORKSPACE" = "null" ]; then
WORKSPACE=$(swaymsg -t get_tree | jq -r ".. | select(.app_id?|test(\"$APPNAME\";\"i\") or .window_properties?.class?|test(\"$APPNAME\";\"i\")) | .workspace" | head -1)
fi
# Switch to the workspace if found
if [ -n "$WORKSPACE" ] && [ "$WORKSPACE" != "null" ]; then
swaymsg workspace "$WORKSPACE" 2>/dev/null
sleep 0.1
fi
# Now focus the window
swaymsg "[app_id=\"$APPNAME\"]" focus 2>/dev/null || \
swaymsg "[app_id=\"(?i)$APPNAME\"]" focus 2>/dev/null || \
swaymsg "[class=\"$APPNAME\"]" focus 2>/dev/null || \
swaymsg "[class=\"(?i)$APPNAME\"]" focus 2>/dev/null
sleep 0.1
fi
# Step 2: Invoke the notification's default action (if any)
makoctl invoke -n "$ID" 2>/dev/null
# Step 3: Dismiss the notification
makoctl dismiss -n "$ID" 2>/dev/null

View File

@@ -0,0 +1,240 @@
-- Bearded Arc Theme
-- Based on: https://github.com/BeardedBear/bearded-theme
-- Adapted for WezTerm
local main = {}
local main_palette = {
base = '#1c2433',
overlay = '#212a3b',
muted = '#4a5e84',
text = '#afbbd2',
red = '#FF738A',
yellow = '#EACD61',
orange = '#FF955C',
green = '#3CEC85',
cyan = '#69C3FF',
purple = '#B78AFF',
highlight = '#8196b5',
}
local main_active_tab = {
bg_color = main_palette.overlay,
fg_color = main_palette.text,
}
local main_inactive_tab = {
bg_color = main_palette.base,
fg_color = main_palette.muted,
}
function main.colors()
return {
foreground = main_palette.text,
background = main_palette.base,
cursor_bg = main_palette.yellow,
cursor_border = main_palette.yellow,
cursor_fg = main_palette.text,
selection_bg = '#405275',
selection_fg = main_palette.text,
ansi = {
main_palette.overlay,
main_palette.red,
main_palette.green,
main_palette.yellow,
main_palette.cyan,
main_palette.purple,
main_palette.orange,
main_palette.text,
},
brights = {
main_palette.muted,
main_palette.red,
main_palette.green,
main_palette.yellow,
main_palette.cyan,
main_palette.purple,
main_palette.orange,
main_palette.text,
},
tab_bar = {
background = main_palette.base,
active_tab = main_active_tab,
inactive_tab = main_inactive_tab,
inactive_tab_hover = main_active_tab,
new_tab = main_inactive_tab,
new_tab_hover = main_active_tab,
inactive_tab_edge = main_palette.muted, -- (Fancy tab bar only)
},
}
end
function main.window_frame() -- (Fancy tab bar only)
return {
active_titlebar_bg = main_palette.base,
inactive_titlebar_bg = main_palette.base,
}
end
local moon = {}
local moon_palette = {
base = '#1a212f',
overlay = '#253043',
muted = '#4a5e84',
text = '#afbbd2',
red = '#FF738A',
yellow = '#EACD61',
orange = '#FF955C',
green = '#3CEC85',
cyan = '#69C3FF',
purple = '#B78AFF',
highlight = '#8196b5',
}
local moon_active_tab = {
bg_color = moon_palette.overlay,
fg_color = moon_palette.text,
}
local moon_inactive_tab = {
bg_color = moon_palette.base,
fg_color = moon_palette.muted,
}
function moon.colors()
return {
foreground = moon_palette.text,
background = moon_palette.base,
cursor_bg = moon_palette.yellow,
cursor_border = moon_palette.yellow,
cursor_fg = moon_palette.text,
selection_bg = moon_palette.overlay,
selection_fg = moon_palette.text,
ansi = {
moon_palette.overlay,
moon_palette.red,
moon_palette.green,
moon_palette.yellow,
moon_palette.cyan,
moon_palette.purple,
moon_palette.orange,
moon_palette.text,
},
brights = {
moon_palette.muted,
moon_palette.red,
moon_palette.green,
moon_palette.yellow,
moon_palette.cyan,
moon_palette.purple,
moon_palette.orange,
moon_palette.text,
},
tab_bar = {
background = moon_palette.base,
active_tab = moon_active_tab,
inactive_tab = moon_inactive_tab,
inactive_tab_hover = moon_active_tab,
new_tab = moon_inactive_tab,
new_tab_hover = moon_active_tab,
inactive_tab_edge = moon_palette.muted, -- (Fancy tab bar only)
},
}
end
function moon.window_frame() -- (Fancy tab bar only)
return {
active_titlebar_bg = moon_palette.base,
inactive_titlebar_bg = moon_palette.base,
}
end
local dawn = {}
local dawn_palette = {
base = '#151b26',
overlay = '#1a212f',
muted = '#4a5e84',
text = '#d0d7e4',
red = '#E35535',
yellow = '#FF955C',
magenta = '#F38CEC',
green = '#3CEC85',
cyan = '#69C3FF',
purple = '#B78AFF',
highlight = '#405275',
}
local dawn_active_tab = {
bg_color = dawn_palette.overlay,
fg_color = dawn_palette.text,
}
local dawn_inactive_tab = {
bg_color = dawn_palette.base,
fg_color = dawn_palette.muted,
}
function dawn.colors()
return {
foreground = dawn_palette.text,
background = dawn_palette.base,
cursor_bg = dawn_palette.muted,
cursor_border = dawn_palette.muted,
cursor_fg = dawn_palette.text,
selection_bg = dawn_palette.overlay,
selection_fg = dawn_palette.text,
ansi = {
dawn_palette.overlay,
dawn_palette.red,
dawn_palette.green,
dawn_palette.yellow,
dawn_palette.cyan,
dawn_palette.purple,
dawn_palette.magenta,
dawn_palette.text,
},
brights = {
dawn_palette.muted,
dawn_palette.red,
dawn_palette.green,
dawn_palette.yellow,
dawn_palette.cyan,
dawn_palette.purple,
dawn_palette.magenta,
dawn_palette.text,
},
tab_bar = {
background = dawn_palette.base,
active_tab = dawn_active_tab,
inactive_tab = dawn_inactive_tab,
inactive_tab_hover = dawn_active_tab,
new_tab = dawn_inactive_tab,
new_tab_hover = dawn_active_tab,
inactive_tab_edge = dawn_palette.muted, -- (Fancy tab bar only)
},
}
end
function dawn.window_frame() -- (Fancy tab bar only)
return {
active_titlebar_bg = dawn_palette.base,
inactive_titlebar_bg = dawn_palette.base,
}
end
return {
main = main,
moon = moon,
dawn = dawn,
}

View File

@@ -0,0 +1,23 @@
local wezterm = require 'wezterm'
local config = {}
local theme = require('theme/init').main
-- Font configuration
config.font = wezterm.font 'JetBrainsMono Nerd Font'
config.font_size = 11.0
config.colors = theme.colors()
-- Window
config.enable_tab_bar = false
config.window_close_confirmation = 'NeverPrompt'
config.wayland_scroll_factor = 0.15
-- Wayland specific fixes
config.enable_wayland = true
-- Enable Kitty keyboard protocol for better key disambiguation (Ctrl+I vs Tab)
config.enable_kitty_keyboard = true
return config