first phase of flake conversion
This commit is contained in:
parent
1b47e24cb0
commit
2ea78bdd47
53 changed files with 491 additions and 50 deletions
6
flake/home/bolt.nix
Normal file
6
flake/home/bolt.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
home = {
|
||||
username = "bolt";
|
||||
homeDirectory = "/home/bolt";
|
||||
};
|
||||
}
|
37
flake/home/dots/Xresources
Normal file
37
flake/home/dots/Xresources
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
! special
|
||||
*.foreground: #d3dae3
|
||||
*.background: #181b28
|
||||
*.cursorColor: #d3dae3
|
||||
|
||||
! black
|
||||
*.color0: #2f343f
|
||||
*.color8: #1e2233
|
||||
|
||||
! red
|
||||
*.color1: #ed244e
|
||||
*.color9: #da4453
|
||||
|
||||
! green
|
||||
*.color2: #27ae60
|
||||
*.color10: #71f79f
|
||||
|
||||
! yellow
|
||||
*.color3: #f67400
|
||||
*.color11: #fdbc4b
|
||||
|
||||
! blue
|
||||
*.color4: #2980b9
|
||||
*.color12: #1d99f3
|
||||
|
||||
! magenta
|
||||
*.color5: #c50ed2
|
||||
*.color13: #9b59b6
|
||||
|
||||
! cyan
|
||||
*.color6: #3daee9
|
||||
*.color14: #5294e2
|
||||
|
||||
! white
|
||||
*.color7: #a1a9b1
|
||||
*.color15: #656a73
|
33
flake/home/dots/eww/colors.scss
Normal file
33
flake/home/dots/eww/colors.scss
Normal file
|
@ -0,0 +1,33 @@
|
|||
$black: #2f343f;
|
||||
$black_a: #1e2233;
|
||||
|
||||
$red: #ed244e;
|
||||
$red_a: #da4453;
|
||||
|
||||
$green: #27ae60;
|
||||
$green_a: #71f79f;
|
||||
|
||||
$yellow: #f67400;
|
||||
$yellow_a: #fdbc4b;
|
||||
|
||||
$blue: #2980b9;
|
||||
$blue_a: #1d99f3;
|
||||
|
||||
$magenta: #c50ed2;
|
||||
$magenta_a: #9b59b6;
|
||||
|
||||
$cyan: #3daee9;
|
||||
$cyan_a: #5294e2;
|
||||
|
||||
$white: #a1a9b1;
|
||||
$white_a: #656a73;
|
||||
|
||||
$fg: #d3dae3;
|
||||
$bg: #060604;
|
||||
|
||||
$border: $red;
|
||||
$shadow: $black;
|
||||
$base: $bg;
|
||||
$bg1: $black;
|
||||
$text: $fg;
|
||||
$outline: $black;
|
17
flake/home/dots/fuzzel/fuzzel.ini
Normal file
17
flake/home/dots/fuzzel/fuzzel.ini
Normal file
|
@ -0,0 +1,17 @@
|
|||
dpi-aware=no
|
||||
font=Montreux Classic:size=14
|
||||
icon-theme=Papirus-Dark
|
||||
terminal=kitty
|
||||
[dmenu]
|
||||
exit-immediately-if-empty=yes
|
||||
[border]
|
||||
width=3
|
||||
radius=24
|
||||
[colors]
|
||||
background="060604FF"
|
||||
text="d3dae3FF"
|
||||
selection="ed244eFF"
|
||||
selection-text="d3dae3ff"
|
||||
selection-match="71f79fff"
|
||||
match="27ae60FF"
|
||||
border="2f343fFF"
|
131
flake/home/dots/hyprland/hyprland.conf
Normal file
131
flake/home/dots/hyprland/hyprland.conf
Normal file
|
@ -0,0 +1,131 @@
|
|||
exec-once = eww open bar
|
||||
exec-once = swayidle -w timeout 300 'waylock'
|
||||
exec-once = swayidle -w timeout 600 'systemctl suspend' after-resume 'eww open bar'
|
||||
exec-once = ckb-next -c -b
|
||||
exec-once = swaybg -i $HOME/Downloads/fantastyland-dark.png -m fill
|
||||
exec-once = xrdb -l ~/.Xresources
|
||||
exec-once = swayosd
|
||||
exec-once = keepassxc
|
||||
exec = eww reload
|
||||
exec = gsettings set org.gnome.desktop.interface gtk-theme 'Sweet-Dark'
|
||||
exec = gsettings set org.gnome.desktop.interface font-name 'Montreux Classic'
|
||||
exec = gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark'
|
||||
|
||||
input {
|
||||
kb_layout=us
|
||||
kb_options=caps:escape,escape:caps
|
||||
sensitivity=0.0
|
||||
accel_profile=flat
|
||||
}
|
||||
|
||||
general {
|
||||
layout=dwindle
|
||||
border_size=3
|
||||
gaps_in=15
|
||||
gaps_out=25
|
||||
resize_on_border=true
|
||||
hover_icon_on_border=true
|
||||
col.active_border=0xffa1a9b1
|
||||
col.inactive_border=0xff2f343f
|
||||
col.group_border=0xffda4453
|
||||
col.group_border_active=0xffed244e
|
||||
}
|
||||
|
||||
dwindle {
|
||||
preserve_split=true
|
||||
pseudotile=true
|
||||
use_active_for_splits=true
|
||||
no_gaps_when_only=false
|
||||
}
|
||||
|
||||
decoration {
|
||||
rounding=8
|
||||
blur=0
|
||||
# screen_shader=/home/bolt/Code/desktop.frag
|
||||
}
|
||||
|
||||
misc {
|
||||
vfr=true
|
||||
vrr=1
|
||||
mouse_move_enables_dpms=true
|
||||
key_press_enables_dpms=true
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled=1
|
||||
bezier=overshot,0.05,0.9,0.1,1.1
|
||||
bezier=smooth,0.06,0.94,0.1,1.0
|
||||
bezier=slosmooth,0.1,0.89,0.14,0.96
|
||||
animation=windows,1,6,overshot,popin
|
||||
animation=workspaces,1,6,smooth,slidevert
|
||||
animation=specialWorkspace,1,6,overshot,slide
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo=true
|
||||
disable_splash_rendering=true
|
||||
}
|
||||
|
||||
monitor=,highrr,auto,1
|
||||
|
||||
windowrule=noanim,^(wlogout)$
|
||||
windowrule=workspace special silent,^(keepassxc)$
|
||||
windowrulev2 = workspace special silent, title:(KeePassXC)$
|
||||
|
||||
|
||||
bindm=SUPER,mouse:272,movewindow
|
||||
bindm=SUPER,mouse:273,resizewindow
|
||||
bind=SUPER,Return,exec,kitty
|
||||
bind=SUPER,E,exec,kitty joshuto
|
||||
bind=SUPER,F,exec,firefox
|
||||
bind=SUPER,D,exec,fuzzel
|
||||
bind=SUPER,N,exec,swaync-client -t
|
||||
|
||||
bind=SUPER_SHIFT,Q,killactive
|
||||
bind=SUPER_SHIFT,space,fullscreen,0
|
||||
bind=SUPER,space,togglefloating
|
||||
bind=SUPER,space,centerwindow
|
||||
|
||||
|
||||
bind=SUPER,h,movefocus,l
|
||||
bind=SUPER,l,movefocus,r
|
||||
bind=SUPER,j,movefocus,d
|
||||
bind=SUPER,k,movefocus,u
|
||||
bind=SUPER_SHIFT,h,movewindow,l
|
||||
bind=SUPER_SHIFT,l,movewindow,r
|
||||
bind=SUPER_SHIFT,j,movewindow,d
|
||||
bind=SUPER_SHIFT,k,movewindow,u
|
||||
|
||||
bind=SUPER,s,togglesplit
|
||||
bind=SUPER,a,changegroupactive,f
|
||||
bind=SUPER,z,changegroupactive,b
|
||||
bind=SUPER,x,togglegroup
|
||||
|
||||
bind=SUPER,1,workspace,1
|
||||
bind=SUPER,2,workspace,2
|
||||
bind=SUPER,3,workspace,3
|
||||
bind=SUPER,4,workspace,4
|
||||
bind=SUPER_SHIFT,1,movetoworkspacesilent,1
|
||||
bind=SUPER_SHIFT,2,movetoworkspacesilent,2
|
||||
bind=SUPER_SHIFT,3,movetoworkspacesilent,3
|
||||
bind=SUPER_SHIFT,4,movetoworkspacesilent,4
|
||||
|
||||
bind=SUPER_CTRL,h,resizeactive,-40 0
|
||||
bind=SUPER_CTRL,l,resizeactive,40 0
|
||||
bind=SUPER_CTRL,j,resizeactive,0 -40
|
||||
bind=SUPER_CTRL,k,resizeactive,0 40
|
||||
|
||||
bind=SUPER,minus,togglespecialworkspace
|
||||
bind=SUPER_SHIFT,minus,movetoworkspace,special
|
||||
|
||||
bind=SUPER_SHIFT,S,exec,grim -g "$(slurp)" -t png -o "$HOME/Pictures/$(date +%F_%H-%m-%S).png" && notify-send "Screenshot taken."
|
||||
bind=SUPER_SHIFT_CTRL,S,exec,if [[ $(pgrep wf-recorder; echo $?) -eq 0 ]]; then wf-recorder -a -f "$HOME/Videos/recording_$(date +%F_%H-%m-%S).mp4" & notify-send "Recording desktop.."; else pkill wf-recorder && notify-send "Recording complete."; fi
|
||||
bind=SUPER_SHIFT,E,exec,wlogout
|
||||
bind=,XF86AudioMute,exec,swayosd --output-volume mute-toggle
|
||||
bind=,XF86AudioRaiseVolume,exec,swayosd --output-volume raise
|
||||
bind=,XF86AudioLowerVolume,exec,swayosd --output-volume lower
|
||||
bind=,XF86AudioStop,exec,playerctl stop
|
||||
bind=,XF86AudioPlay,exec,playerctl play-pause
|
||||
bind=,XF86AudioPrev,exec,playerctl previous
|
||||
bind=,XF86AudioNext,exec,playerctl next
|
||||
|
62
flake/home/dots/swaync/config.json
Normal file
62
flake/home/dots/swaync/config.json
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"$schema": "~/.config/swaync/configSchema.json",
|
||||
|
||||
"positionX": "center",
|
||||
"positionY": "bottom",
|
||||
"control-center-positionX": "none",
|
||||
"control-center-positionY": "top",
|
||||
"control-center-margin-top": 8,
|
||||
"control-center-margin-bottom": 8,
|
||||
"control-center-margin-right": 8,
|
||||
"control-center-margin-left": 8,
|
||||
"control-center-width": 500,
|
||||
"control-center-height": 600,
|
||||
"fit-to-screen": false,
|
||||
|
||||
"layer": "overlay",
|
||||
"cssPriority": "user",
|
||||
"notification-icon-size": 64,
|
||||
"notification-body-image-height": 100,
|
||||
"notification-body-image-width": 200,
|
||||
"timeout": 6,
|
||||
"timeout-low": 6,
|
||||
"timeout-critical": 0,
|
||||
"notification-window-width": 600,
|
||||
"keyboard-shortcuts": true,
|
||||
"image-visibility": "when-available",
|
||||
"transition-time": 200,
|
||||
"hide-on-clear": true,
|
||||
"hide-on-action": true,
|
||||
"script-fail-notify": true,
|
||||
|
||||
"widgets": [
|
||||
"inhibitors",
|
||||
"title",
|
||||
"dnd",
|
||||
"mpris",
|
||||
"notifications"
|
||||
],
|
||||
"widget-config": {
|
||||
"inhibitors": {
|
||||
"text": "Inhibitors",
|
||||
"button-text": "Clear All",
|
||||
"clear-all-button": true
|
||||
},
|
||||
"title": {
|
||||
"text": "Notifications",
|
||||
"clear-all-button": false,
|
||||
"button-text": "Clear All"
|
||||
},
|
||||
"dnd": {
|
||||
"text": "Do Not Disturb"
|
||||
},
|
||||
"label": {
|
||||
"max-lines": 5,
|
||||
"text": "Label Text"
|
||||
},
|
||||
"mpris": {
|
||||
"image-size": 96,
|
||||
"image-radius": 12
|
||||
}
|
||||
}
|
||||
}
|
523
flake/home/dots/swaync/configSchema.json
Normal file
523
flake/home/dots/swaync/configSchema.json
Normal file
|
@ -0,0 +1,523 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "SwayNotificationCenter JSON schema",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"description": "Pointer to the schema against which this document should be validated."
|
||||
},
|
||||
"positionX": {
|
||||
"type": "string",
|
||||
"description": "Horizontal position of control center and notification window",
|
||||
"default": "right",
|
||||
"enum": ["right", "left", "center"]
|
||||
},
|
||||
"layer": {
|
||||
"type": "string",
|
||||
"description": "Layer of control center window",
|
||||
"default": "top",
|
||||
"enum": ["background", "bottom", "top", "overlay"]
|
||||
},
|
||||
"cssPriority": {
|
||||
"type": "string",
|
||||
"description": "Which GTK priority to use when loading the default and user CSS files. Pick \"user\" to override XDG_CONFIG_HOME/gtk-3.0/gtk.css",
|
||||
"default": "application",
|
||||
"enum": ["application", "user"]
|
||||
},
|
||||
"positionY": {
|
||||
"type": "string",
|
||||
"description": "Vertical position of control center and notification window",
|
||||
"default": "top",
|
||||
"enum": ["top", "bottom"]
|
||||
},
|
||||
"control-center-positionX": {
|
||||
"type": "string",
|
||||
"description": "Optional: Horizontal position of the control center. Supersedes positionX if not set to `none`",
|
||||
"default": "none",
|
||||
"enum": ["right", "left", "center", "none"]
|
||||
},
|
||||
"control-center-positionY": {
|
||||
"type": "string",
|
||||
"description": "Optional: Vertical position of the control center. Supersedes positionY if not set to `none`",
|
||||
"default": "none",
|
||||
"enum": ["top", "bottom", "none"]
|
||||
},
|
||||
"control-center-margin-top": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the top of the notification center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-margin-bottom": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the bottom of the notification center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-margin-right": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the right of the notification center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-margin-left": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the left of the notification center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"notification-icon-size": {
|
||||
"type": "integer",
|
||||
"description": "The notification icon size (in pixels)",
|
||||
"default": 64,
|
||||
"minimum": 16
|
||||
},
|
||||
"notification-body-image-height": {
|
||||
"type": "integer",
|
||||
"description": "The notification body image height (in pixels)",
|
||||
"default": 100,
|
||||
"minimum": 100
|
||||
},
|
||||
"notification-body-image-width": {
|
||||
"type": "integer",
|
||||
"description": "The notification body image width (in pixels)",
|
||||
"default": 200,
|
||||
"minimum": 200
|
||||
},
|
||||
"timeout": {
|
||||
"type": "integer",
|
||||
"description": "The notification timeout for notifications with normal priority",
|
||||
"default": 10
|
||||
},
|
||||
"timeout-low": {
|
||||
"type": "integer",
|
||||
"description": "The notification timeout for notifications with low priority",
|
||||
"default": 5
|
||||
},
|
||||
"timeout-critical": {
|
||||
"type": "integer",
|
||||
"description": "The notification timeout for notifications with critical priority. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"notification-window-width": {
|
||||
"type": "integer",
|
||||
"description": "Width of the notification in pixels",
|
||||
"default": 500
|
||||
},
|
||||
"fit-to-screen": {
|
||||
"type": "boolean",
|
||||
"description": "If the control center should expand to both edges of the screen",
|
||||
"default": true
|
||||
},
|
||||
"control-center-height": {
|
||||
"type": "integer",
|
||||
"description": "Height of the control center in pixels. Ignored when 'fit-to-screen' is set to 'true'",
|
||||
"default": 600,
|
||||
"minimum": 300
|
||||
},
|
||||
"control-center-width": {
|
||||
"type": "integer",
|
||||
"description": "Width of the control center in pixels",
|
||||
"default": 500,
|
||||
"minimum": 300
|
||||
},
|
||||
"keyboard-shortcuts": {
|
||||
"type": "boolean",
|
||||
"description": "If control center should use keyboard shortcuts",
|
||||
"default": true
|
||||
},
|
||||
"image-visibility": {
|
||||
"type": "string",
|
||||
"description": "An explanation about the purpose of this instance.",
|
||||
"default": "when-available",
|
||||
"enum": ["always", "when-available", "never"]
|
||||
},
|
||||
"transition-time": {
|
||||
"type": "integer",
|
||||
"description": "The notification animation duration. 0 to disable",
|
||||
"default": 200
|
||||
},
|
||||
"hide-on-clear": {
|
||||
"type": "boolean",
|
||||
"description": "Hides the control center after pressing \"Clear All\"",
|
||||
"default": false
|
||||
},
|
||||
"hide-on-action": {
|
||||
"type": "boolean",
|
||||
"description": "Hides the control center when clicking on notification action",
|
||||
"default": true
|
||||
},
|
||||
"script-fail-notify": {
|
||||
"type": "boolean",
|
||||
"description": "Sends a notification if a script fails to run",
|
||||
"default": true
|
||||
},
|
||||
"scripts": {
|
||||
"type": "object",
|
||||
"description": "Which scripts to check and potentially run for every notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for exec) use regex. If all properties match the given notification, the script will be run. Only the first matching script will be run.",
|
||||
"minProperties": 1,
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^.{1,}$": {
|
||||
"type": "object",
|
||||
"description": "Your script object.",
|
||||
"required": ["exec"],
|
||||
"minProperties": 2,
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"exec": {
|
||||
"type": "string",
|
||||
"description": "The script to run. Can also run regular shell commands."
|
||||
},
|
||||
"app-name": {
|
||||
"type": "string",
|
||||
"description": "The app-name. Uses Regex."
|
||||
},
|
||||
"desktop-entry": {
|
||||
"type": "string",
|
||||
"description": "The desktop-entry. Uses Regex."
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "The summary of the notification. Uses Regex."
|
||||
},
|
||||
"body": {
|
||||
"type": "string",
|
||||
"description": "The body of the notification. Uses Regex."
|
||||
},
|
||||
"urgency": {
|
||||
"type": "string",
|
||||
"description": "The urgency of the notification.",
|
||||
"default": "Normal",
|
||||
"enum": ["Low", "Normal", "Critical"]
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"description": "Which category the notification belongs to. Uses Regex."
|
||||
},
|
||||
"run-on": {
|
||||
"type": "string",
|
||||
"description": "Whether to run the script on an action being activated, or when the notification is received.",
|
||||
"enum": ["action", "receive"],
|
||||
"default": "receive"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"notification-visibility": {
|
||||
"type": "object",
|
||||
"description": "Set the visibility of each incoming notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for state) use regex. If all properties match the given notification, the notification will be follow the provided state. Only the first matching object will be used.",
|
||||
"minProperties": 1,
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^.{1,}$": {
|
||||
"type": "object",
|
||||
"description": "Your script object.",
|
||||
"required": ["state"],
|
||||
"minProperties": 2,
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "The notification visibility state.",
|
||||
"default": "enabled",
|
||||
"enum": ["ignored", "muted", "enabled", "transient"]
|
||||
},
|
||||
"app-name": {
|
||||
"type": "string",
|
||||
"description": "The app-name. Uses Regex."
|
||||
},
|
||||
"desktop-entry": {
|
||||
"type": "string",
|
||||
"description": "The desktop-entry. Uses Regex."
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "The summary of the notification. Uses Regex."
|
||||
},
|
||||
"body": {
|
||||
"type": "string",
|
||||
"description": "The body of the notification. Uses Regex."
|
||||
},
|
||||
"urgency": {
|
||||
"type": "string",
|
||||
"description": "The urgency of the notification.",
|
||||
"default": "Normal",
|
||||
"enum": ["Low", "Normal", "Critical"]
|
||||
},
|
||||
"override-urgency": {
|
||||
"type": "string",
|
||||
"description": "The new urgency of the notification (optional)",
|
||||
"default": "unset",
|
||||
"enum": ["unset", "low", "normal", "critical"]
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"description": "Which category the notification belongs to. Uses Regex."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"widgets": {
|
||||
"type": "array",
|
||||
"description": "Which order and which widgets to display. If the \"notifications\" widget isn't specified, it will be placed at the bottom.",
|
||||
"default": ["inhibitors", "title", "dnd", "notifications"],
|
||||
"items": {
|
||||
"type": "string",
|
||||
// Sadly can't use regex and enums at the same time. Fix in the future?
|
||||
"pattern": "^[a-zA-Z0-9_-]{1,}(#[a-zA-Z0-9_-]{1,}){0,1}?$"
|
||||
}
|
||||
},
|
||||
"widget-config": {
|
||||
"type": "object",
|
||||
"description": "Configure specific widget properties.",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
// New widgets go here
|
||||
"^title(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
// References the widget structure from "widgets" below
|
||||
"$ref": "#/widgets/title"
|
||||
},
|
||||
"^dnd(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/dnd"
|
||||
},
|
||||
"^label(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/label"
|
||||
},
|
||||
"^mpris(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/mpris"
|
||||
},
|
||||
"^buttons-grid(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/buttons-grid"
|
||||
},
|
||||
"^menubar(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/menubar"
|
||||
},
|
||||
"^volume(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/volume"
|
||||
},
|
||||
"^backlight(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/backlight"
|
||||
},
|
||||
"^inhibitors(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
// References the widget structure from "widgets" below
|
||||
"$ref": "#/widgets/inhibitors"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"widgets": {
|
||||
// New widgets go here
|
||||
"title": {
|
||||
"type": "object",
|
||||
"description": "Control Center Title Widget",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "The title of the widget",
|
||||
"default": "Notifications"
|
||||
},
|
||||
"clear-all-button": {
|
||||
"type": "boolean",
|
||||
"description": "Wether to display a \"Clear All\" button",
|
||||
"default": true
|
||||
},
|
||||
"button-text": {
|
||||
"type": "string",
|
||||
"description": "\"Clear All\" button text",
|
||||
"default": "Clear All"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dnd": {
|
||||
"type": "object",
|
||||
"description": "Control Center Do Not Disturb Widget",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "The title of the widget",
|
||||
"default": "Do Not Disturb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"label": {
|
||||
"type": "object",
|
||||
"description": "A generic widget that allows the user to add custom text",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "The text content of the widget",
|
||||
"default": "Label Text"
|
||||
},
|
||||
"max-lines": {
|
||||
"type": "integer",
|
||||
"description": "The maximum lines",
|
||||
"default": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"mpris": {
|
||||
"type": "object",
|
||||
"description": "A widget that displays multiple music players",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"image-size": {
|
||||
"type": "integer",
|
||||
"description": "The size of the album art",
|
||||
"default": 96
|
||||
},
|
||||
"image-radius": {
|
||||
"type": "integer",
|
||||
"description": "The border radius of the album art",
|
||||
"default": 12
|
||||
}
|
||||
}
|
||||
},
|
||||
"buttons-grid": {
|
||||
"type": "object",
|
||||
"description": "A widget to add a grid of buttons that execute shell commands",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"description": "A list of actions containing a label and a command",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Text to be displayed in button",
|
||||
"default": "label"
|
||||
},
|
||||
"command": {
|
||||
"type": "string",
|
||||
"description": "Command to be executed on click",
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"menubar": {
|
||||
"type": "object",
|
||||
"description": "A bar that contains action-buttons and buttons to open a dropdown with action-buttons",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^menu(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"type": "object",
|
||||
"description": "A button that opens a dropdown with action-buttons",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Text to be displayed in button",
|
||||
"default": "Menu"
|
||||
},
|
||||
"position": {
|
||||
"type": "string",
|
||||
"description": "Horizontal position of the button in the bar",
|
||||
"default": "right",
|
||||
"enum": ["right", "left"]
|
||||
},
|
||||
"animation_type": {
|
||||
"type": "string",
|
||||
"default": "slide_down",
|
||||
"description": "Animation type for menu",
|
||||
"enum": ["slide_down", "slide_up", "none"]
|
||||
},
|
||||
"animation_duration":{
|
||||
"type": "integer",
|
||||
"default": 250,
|
||||
"description": "Duration of animation in milliseconds"
|
||||
},
|
||||
"actions": {
|
||||
"$ref" : "#/widgets/buttons-grid/properties/actions"
|
||||
}
|
||||
}
|
||||
},
|
||||
"^buttons(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"type": "object",
|
||||
"description": "A list of action-buttons to be displayed in the topbar",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"position": {
|
||||
"type": "string",
|
||||
"description": "Horizontal position of the button in the bar",
|
||||
"default": "right",
|
||||
"enum": ["right", "left"]
|
||||
},
|
||||
"actions": {
|
||||
"$ref" : "#/widgets/buttons-grid/properties/actions"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"volume": {
|
||||
"type": "object",
|
||||
"description": "Slider to control pulse volume",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Text displayed in front of the volume slider",
|
||||
"default": "Volume"
|
||||
}
|
||||
}
|
||||
},
|
||||
"backlight": {
|
||||
"type": "object",
|
||||
"description": "Slider to control monitor brightness",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Text displayed in front of the backlight slider",
|
||||
"default": "Brightness"
|
||||
},
|
||||
"device": {
|
||||
"type": "string",
|
||||
"description": "Name of monitor (find possible devices using `ls /sys/class/backlight` or `ls /sys/class/leds`)",
|
||||
"default": "intel_backlight"
|
||||
},
|
||||
"subsystem": {
|
||||
"type": "string",
|
||||
"description": "Kernel subsystem for brightness control",
|
||||
"default": "backlight",
|
||||
"enum": ["backlight", "leds"]
|
||||
},
|
||||
"min": {
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"description": "Lowest possible value for brightness"
|
||||
}
|
||||
}
|
||||
},
|
||||
"inhibitors": {
|
||||
"type": "object",
|
||||
"description": "Control Center Inhibitors Widget",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "The title of the widget",
|
||||
"default": "Inhibitors"
|
||||
},
|
||||
"clear-all-button": {
|
||||
"type": "boolean",
|
||||
"description": "Wether to display a \"Clear All\" button",
|
||||
"default": true
|
||||
},
|
||||
"button-text": {
|
||||
"type": "string",
|
||||
"description": "\"Clear All\" button text",
|
||||
"default": "Clear All"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
348
flake/home/dots/swaync/style.css
Normal file
348
flake/home/dots/swaync/style.css
Normal file
|
@ -0,0 +1,348 @@
|
|||
/*
|
||||
* vim: ft=less
|
||||
*/
|
||||
|
||||
@define-color cc-bg #060604;
|
||||
|
||||
@define-color noti-border-color #2f343f;
|
||||
@define-color noti-bg #060604;
|
||||
@define-color noti-bg-hover #1e2233;
|
||||
@define-color noti-bg-focus #2f343f;
|
||||
@define-color noti-close-bg #060604;
|
||||
@define-color noti-close-bg-hover #1e2233;
|
||||
|
||||
@define-color bg-selected #2f343f;
|
||||
|
||||
* {
|
||||
font-family: "Montreux Classic", sans-serif;
|
||||
}
|
||||
|
||||
.notification-row {
|
||||
transition: all 200ms ease;
|
||||
outline: none;
|
||||
margin-bottom: 4px;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.control-center .notification-row:focus,
|
||||
.control-center .notification-row:hover {
|
||||
opacity: 1;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.notification-row:focus .notification,
|
||||
.notification-row:hover .notification {
|
||||
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0px 0px 0px 3px @bg-selected;
|
||||
}
|
||||
|
||||
.control-center .notification {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.control-center .notification-row {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.notification {
|
||||
transition: all 200ms ease;
|
||||
border-radius: 24px;
|
||||
margin: 6px 6px;
|
||||
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Uncomment to enable specific urgency colors
|
||||
.low {
|
||||
background: yellow;
|
||||
padding: 6px;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.normal {
|
||||
background: green;
|
||||
padding: 6px;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.critical {
|
||||
background: red;
|
||||
padding: 6px;
|
||||
border-radius: 24px;
|
||||
}
|
||||
*/
|
||||
|
||||
.notification-content {
|
||||
background: transparent;
|
||||
padding: 6px;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
background: @noti-close-bg;
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
padding: 0;
|
||||
border-radius: 100%;
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
min-width: 24px;
|
||||
min-height: 24px;
|
||||
}
|
||||
|
||||
.close-button:hover {
|
||||
box-shadow: none;
|
||||
background: @noti-close-bg-hover;
|
||||
transition: all 0.15s ease-in-out;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.notification-default-action,
|
||||
.notification-action {
|
||||
padding: 4px;
|
||||
margin: 0;
|
||||
box-shadow: none;
|
||||
background: @noti-bg;
|
||||
border: 3px solid @noti-border-color;
|
||||
color: white;
|
||||
transition: all 200ms ease;
|
||||
}
|
||||
|
||||
.notification-default-action:hover,
|
||||
.notification-action:hover {
|
||||
-gtk-icon-effect: none;
|
||||
background: @noti-bg-hover;
|
||||
}
|
||||
|
||||
.notification-default-action {
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
/* When alternative actions are visible */
|
||||
.notification-default-action:not(:only-child) {
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
}
|
||||
|
||||
.notification-action {
|
||||
border-radius: 0px;
|
||||
border-top: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
/* add bottom border radius to eliminate clipping */
|
||||
.notification-action:first-child {
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
|
||||
.notification-action:last-child {
|
||||
border-bottom-right-radius: 10px;
|
||||
border-right: 1px solid @noti-border-color;
|
||||
}
|
||||
|
||||
.image {
|
||||
}
|
||||
|
||||
.body-image {
|
||||
margin-top: 6px;
|
||||
background-color: white;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.summary {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
background: transparent;
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
background: transparent;
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
.body {
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
background: transparent;
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.control-center {
|
||||
background: @cc-bg;
|
||||
border-radius: 24px;
|
||||
background-clip: border-box;
|
||||
padding: 4px;
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7),
|
||||
0 2px 6px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.control-center-list {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.control-center-list-placeholder {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.floating-notifications {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* Window behind control center and on all other monitors */
|
||||
.blank-window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*** Widgets ***/
|
||||
|
||||
/* Title widget */
|
||||
.widget-title {
|
||||
margin: 8px;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
.widget-title > button {
|
||||
font-size: initial;
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
background: @noti-bg;
|
||||
border: 3px solid @noti-border-color;
|
||||
box-shadow: none;
|
||||
border-radius: 24px;
|
||||
}
|
||||
.widget-title > button:hover {
|
||||
background: @noti-bg-hover;
|
||||
}
|
||||
|
||||
/* DND widget */
|
||||
.widget-dnd {
|
||||
margin: 8px;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.widget-dnd > switch {
|
||||
font-size: initial;
|
||||
border-radius: 24px;
|
||||
background: @noti-bg;
|
||||
border: 3px solid @noti-border-color;
|
||||
box-shadow: none;
|
||||
}
|
||||
.widget-dnd > switch:checked {
|
||||
background: @bg-selected;
|
||||
}
|
||||
.widget-dnd > switch slider {
|
||||
background: @noti-bg-hover;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
/* Label widget */
|
||||
.widget-label {
|
||||
margin: 8px;
|
||||
}
|
||||
.widget-label > label {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
/* Mpris widget */
|
||||
.widget-mpris {
|
||||
/* The parent to all players */
|
||||
}
|
||||
.widget-mpris-player {
|
||||
padding: 8px;
|
||||
margin: 8px;
|
||||
background-color: @noti-bg;
|
||||
border-radius: 24px;
|
||||
}
|
||||
.widget-mpris-title {
|
||||
font-weight: bold;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
.widget-mpris-subtitle {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
/* Buttons widget */
|
||||
.widget-buttons-grid {
|
||||
padding: 8px;
|
||||
margin: 8px;
|
||||
border-radius: 24px;
|
||||
background-color: @noti-bg;
|
||||
}
|
||||
|
||||
.widget-buttons-grid>flowbox>flowboxchild>button{
|
||||
background: @noti-bg;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid>flowbox>flowboxchild>button:hover {
|
||||
background: @noti-bg-hover;
|
||||
}
|
||||
|
||||
/* Menubar widget */
|
||||
.widget-menubar>box>.menu-button-bar>button {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* .AnyName { Name defined in config after #
|
||||
background-color: @noti-bg;
|
||||
padding: 8px;
|
||||
margin: 8px;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.AnyName>button {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.AnyName>button:hover {
|
||||
background-color: @noti-bg-hover;
|
||||
} */
|
||||
|
||||
.topbar-buttons>button { /* Name defined in config after # */
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* Volume widget */
|
||||
|
||||
.widget-volume {
|
||||
background-color: @noti-bg;
|
||||
padding: 8px;
|
||||
margin: 8px;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
/* Backlight widget */
|
||||
.widget-backlight {
|
||||
background-color: @noti-bg;
|
||||
padding: 8px;
|
||||
margin: 8px;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
/* Title widget */
|
||||
.widget-inhibitors {
|
||||
margin: 8px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
.widget-inhibitors > button {
|
||||
font-size: initial;
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
background: @noti-bg;
|
||||
border: 3px solid @noti-border-color;
|
||||
box-shadow: none;
|
||||
border-radius: 24px;
|
||||
}
|
||||
.widget-inhibitors > button:hover {
|
||||
background: @noti-bg-hover;
|
||||
}
|
36
flake/home/dots/wlogout/layout
Normal file
36
flake/home/dots/wlogout/layout
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"label" : "lock",
|
||||
"action" : "waylock",
|
||||
"text" : "Lock",
|
||||
"keybind" : "l"
|
||||
}
|
||||
{
|
||||
"label" : "logout",
|
||||
"action" : "loginctl terminate-user $USER",
|
||||
"text" : "Logout",
|
||||
"keybind" : "e"
|
||||
}
|
||||
{
|
||||
"label" : "suspend",
|
||||
"action" : "systemctl suspend",
|
||||
"text" : "Suspend",
|
||||
"keybind" : "s"
|
||||
}
|
||||
{
|
||||
"label" : "shutdown",
|
||||
"action" : "systemctl poweroff",
|
||||
"text" : "Shutdown",
|
||||
"keybind" : "d"
|
||||
}
|
||||
{
|
||||
"label" : "reboot",
|
||||
"action" : "systemctl reboot",
|
||||
"text" : "Reboot",
|
||||
"keybind" : "r"
|
||||
}
|
||||
{
|
||||
"label" : "hibernate",
|
||||
"action" : "systemctl hibernate",
|
||||
"text" : "Hibernate",
|
||||
"keybind" : "h"
|
||||
}
|
44
flake/home/dots/wlogout/style.css
Normal file
44
flake/home/dots/wlogout/style.css
Normal file
|
@ -0,0 +1,44 @@
|
|||
* {
|
||||
background-image: none;
|
||||
}
|
||||
window {
|
||||
background-color: #181b28;
|
||||
}
|
||||
button {
|
||||
color: #FFFFFF;
|
||||
background-color: #181b28;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
}
|
||||
|
||||
button:focus, button:active, button:hover {
|
||||
background-color: #27ae60;
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png"));
|
||||
}
|
||||
|
||||
#hibernate {
|
||||
background-image: image(url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png"));
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
|
||||
}
|
42
flake/home/dots/zsh
Normal file
42
flake/home/dots/zsh
Normal file
|
@ -0,0 +1,42 @@
|
|||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
la_culr()
|
||||
{
|
||||
ls -lha --group-directories-first --color $@ | culr
|
||||
}
|
||||
|
||||
ls_culr()
|
||||
{
|
||||
ls -lh --group-directories-first --color $@ | culr
|
||||
}
|
||||
|
||||
ps_culr()
|
||||
{
|
||||
ps ww$@ | culr
|
||||
}
|
||||
|
||||
alias ...=\"cd ../..\"
|
||||
alias ....=\"cd ../../..\"
|
||||
alias .....=\"cd ../../../..\"
|
||||
|
||||
alias fresh=\"clear; echo; ~/.nix/header.sh\"
|
||||
alias icat=\"kitty +kitten icat\"
|
||||
alias chmox=\"chmod +x\"
|
||||
alias gs=\"git status\"
|
||||
alias gcl=\"git clone\"
|
||||
alias ga=\"git add\"
|
||||
alias gcb=\"git checkout -b\"
|
||||
alias gco=\"git checkout\"
|
||||
alias gl=\"git pull\"
|
||||
alias gp=\"git push\"
|
||||
alias gd=\"git diff\"
|
||||
alias gcam=\"git commit -am\"
|
||||
alias gcm=\"git commit -m\"
|
||||
alias gr=\"git restore\"
|
||||
alias gm=\"git merge\"
|
||||
alias l=\"ls_culr\"
|
||||
alias la=\"la_culr\"
|
||||
alias p=\"ps_culr\"
|
||||
alias mnt=\"mount | column -t | culr\"
|
||||
alias kaboom=\"printf 'type any input if you wish to update\n\npress enter to continue\n'; read upgrade; if [ -n \\\"\\\$upgrade\\\" ]; then echo upgrading..; sudo nix-channel --update; else echo no upgrade!; fi; sudo nixos-rebuild switch -j9 && rm ~/.gtkrc-2.0; home-manager switch && sudo nix-collect-garbage && nix-store --optimise\"
|
||||
fresh
|
284
flake/home/home.nix
Normal file
284
flake/home/home.nix
Normal file
|
@ -0,0 +1,284 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
wlogout_style_base = dots/wlogout/style.css;
|
||||
wlogout_style = pkgs.runCommandLocal "wlogout_style_base" {wlogpath = lib.strings.escape ["/"] "${pkgs.wlogout}";} ''
|
||||
cp ${wlogout_style_base} $out
|
||||
sed -i "s/\/usr\/share\/wlogout/$wlogpath\/share\/wlogout/g" $out
|
||||
sed -i "s/\/etc\/wlogout/$wlogpath\/etc\/wlogout/g" $out
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
./programs/eww/default.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
thunderbird
|
||||
clementine
|
||||
inkscape
|
||||
|
||||
btop
|
||||
bat
|
||||
joshuto
|
||||
ripgrep
|
||||
fd
|
||||
lazygit
|
||||
fzf
|
||||
zoxide
|
||||
zellij
|
||||
glib # for gsettings
|
||||
fuzzel
|
||||
grim
|
||||
slurp
|
||||
swaybg
|
||||
wlogout
|
||||
wf-recorder
|
||||
libnotify
|
||||
xorg.xrdb
|
||||
swayidle
|
||||
swaynotificationcenter
|
||||
# swayosd
|
||||
waylock
|
||||
playerctl
|
||||
|
||||
kdeconnect
|
||||
syncthing
|
||||
keepassxc
|
||||
|
||||
direnv
|
||||
|
||||
mpv
|
||||
|
||||
meslo-lgs-nf
|
||||
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
|
||||
gtk-engine-murrine
|
||||
];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemdIntegration = true;
|
||||
nvidiaPatches = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
hidpi = false;
|
||||
};
|
||||
recommendedEnvironment = true;
|
||||
extraConfig = builtins.readFile dots/hyprland/hyprland.conf;
|
||||
};
|
||||
|
||||
programs.eww-hyprland = {
|
||||
enable = true;
|
||||
colors = builtins.readFile dots/eww/colors.scss;
|
||||
};
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
systemd.user.services."hyprland-system76" = {
|
||||
Unit = {
|
||||
Description = "the hyprland process scheduler hook";
|
||||
Requires = [ "dbus.service" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = ''${pkgs.hyprland-s76}/bin/hyprland-system76-scheduler-hook.sh'';
|
||||
};
|
||||
};
|
||||
|
||||
xresources.extraConfig = builtins.readFile ./dots/Xresources;
|
||||
|
||||
xdg.enable = true;
|
||||
xdg.configFile = builtins.mapAttrs (name: value: { enable=true; text=builtins.readFile value; })
|
||||
{
|
||||
"wlogout/layout" = dots/wlogout/layout;
|
||||
"wlogout/style.css" = wlogout_style;
|
||||
"swaync/config.json" = dots/swaync/config.json;
|
||||
"swaync/configSchema.json" = dots/swaync/configSchema.json;
|
||||
"swaync/style.css" = dots/swaync/style.css;
|
||||
"fuzzel/fuzzel.ini" = dots/fuzzel/fuzzel.ini;
|
||||
};
|
||||
|
||||
xdg.systemDirs.data = [
|
||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
GTK_THEME = "Sweet-Dark";
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.sweet;
|
||||
name = "Sweet-Dark";
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.papirus-icon-theme;
|
||||
name = "Papirus-Dark";
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.firefox =
|
||||
{
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
id = 0;
|
||||
name = "Default";
|
||||
settings = {
|
||||
"browser.startup.homepage" = "about:blank";
|
||||
};
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
vimium-c
|
||||
darkreader
|
||||
localcdn
|
||||
ublock-origin
|
||||
plasma-integration
|
||||
keepassxc-browser
|
||||
user-agent-string-switcher
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.helix.enable = true;
|
||||
programs.helix.settings = {
|
||||
theme = "gruvbox_dark_hard";
|
||||
editor.lsp.display-messages = true;
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "Ellograph CF";
|
||||
size = 10;
|
||||
};
|
||||
settings = {
|
||||
foreground = "#d3dae3";
|
||||
background = "#060604";
|
||||
cursor = "#d3dae3";
|
||||
selection_foreground = "#fdbc4b";
|
||||
selection_background = "#1e2233";
|
||||
color0 = "#2f343f";
|
||||
color1 = "#ed244e";
|
||||
color2 = "#27ae60";
|
||||
color3 = "#f67400";
|
||||
color4 = "#2980b9";
|
||||
color5 = "#c50ed2";
|
||||
color6 = "#3daee9";
|
||||
color7 = "#a1a9b1";
|
||||
color8 = "#1e2233";
|
||||
color9 = "#da4453";
|
||||
color10 = "#71f79f";
|
||||
color11 = "#fdbc4b";
|
||||
color12 = "#1d99f3";
|
||||
color13 = "#9b59b6";
|
||||
color14 = "#5294e2";
|
||||
color15 = "#656a73";
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "atagen";
|
||||
userEmail = "atagen@boss.co";
|
||||
extraConfig = {
|
||||
credential.helper = "keepassxc";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
enableVteIntegration = true;
|
||||
autocd = true;
|
||||
defaultKeymap = "viins";
|
||||
initExtra = builtins.readFile ./dots/zsh;
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "zsh-vi-mode";
|
||||
src = pkgs.zsh-vi-mode;
|
||||
file = "share/zsh-vi-mode/zsh-vi-mode.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
src = pkgs.zsh-autopair;
|
||||
file = "share/zsh-autopair/zsh-autopair.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.zsh-completions;
|
||||
file = "share/zsh-completions/zsh-completions.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-command-time";
|
||||
src = pkgs.zsh-command-time;
|
||||
file = "share/zsh-completions/zsh-command-time.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autocomplete";
|
||||
src = pkgs.zsh-autocomplete;
|
||||
file = "share/zsh-autocomplete/zsh-autocomplete.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-fast-syntax-highlighting";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
file = "share/zsh-fast-syntax-highlighting/zsh-fast-syntax-highlighting.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
src = pkgs.zsh-nix-shell;
|
||||
file = "share/zsh-nix-shell/zsh-nix-shell.zsh";
|
||||
}
|
||||
{
|
||||
name = "any-nix-shell";
|
||||
src = pkgs.any-nix-shell;
|
||||
file = "share/any-nix-shell/any-nix-shell.zsh";
|
||||
}
|
||||
{
|
||||
name = "nix-zsh-completions";
|
||||
src = pkgs.nix-zsh-completions;
|
||||
file = "share/nix-zsh-completions/nix-zsh-completions.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
}
|
68
flake/home/programs/eww/README.md
Normal file
68
flake/home/programs/eww/README.md
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Eww configuration
|
||||
|
||||
This configuration aims to provide a fully working shell replacement for
|
||||
compositors/window managers. Features constantly get added and existing ones
|
||||
get improved.
|
||||
|
||||
## 🗃️ Components
|
||||
|
||||
The same daemon runs multiple windows which interact with each other:
|
||||
|
||||
### bar
|
||||
|
||||

|
||||
|
||||
### music window
|
||||
|
||||

|
||||
|
||||
### calendar
|
||||
|
||||

|
||||
|
||||
### system info
|
||||
|
||||

|
||||
|
||||
## ❔ Usage
|
||||
|
||||
### Home Manager
|
||||
|
||||
If you use Home Manager, installing is as simple as adding my flake to your
|
||||
inputs, passing `inputs` to `extraSpecialArgs` and importing the relevant
|
||||
module:
|
||||
```nix
|
||||
{inputs, ...}: {
|
||||
imports = [inputs.fufexan.homeManagerModules.eww-hyprland];
|
||||
|
||||
programs.eww-hyprland = {
|
||||
enable = true;
|
||||
|
||||
# default package
|
||||
package = pkgs.eww-wayland;
|
||||
|
||||
# if you want to change colors
|
||||
colors = builtins.readFile ./macchiato.scss;
|
||||
|
||||
# set to true to reload on change
|
||||
autoReload = false;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Make sure to also add the fonts listed below.
|
||||
|
||||
### Other distros
|
||||
|
||||
To quickly install this config, grab all the files in this directory and put
|
||||
them in `~/.config/eww`. Then run `eww daemon` and `eww open bar`. Enjoy!
|
||||
|
||||
Dependencies:
|
||||
- Icon fonts: `material-symbols-outline` (any variation can be used as long as you change the `font-family` property of `.icon`)
|
||||
- Text font: [Jost](https://fonts.google.com/specimen/Jost)
|
||||
- Script deps: everything in `default.nix`'s `dependencies` list.
|
||||
|
||||
## 🎨 Theme
|
||||
|
||||
The theme colors can be changed in `css/_colors.scss`. Currently the theme used
|
||||
is [Catppuccin Mocha](https://github.com/catppuccin/catppuccin).
|
31
flake/home/programs/eww/css/_calendar.scss
Normal file
31
flake/home/programs/eww/css/_calendar.scss
Normal file
|
@ -0,0 +1,31 @@
|
|||
.calendar-win {
|
||||
@include window;
|
||||
background-color: $bg;
|
||||
color: $fg;
|
||||
padding: .2em;
|
||||
}
|
||||
|
||||
calendar {
|
||||
padding: 5px;
|
||||
|
||||
:selected {
|
||||
color: $magenta;
|
||||
}
|
||||
|
||||
.header {
|
||||
color: $black;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
color: $red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.button {
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
:indeterminate {
|
||||
color: $green;
|
||||
}
|
||||
}
|
35
flake/home/programs/eww/css/_colors.scss
Normal file
35
flake/home/programs/eww/css/_colors.scss
Normal file
|
@ -0,0 +1,35 @@
|
|||
$rosewater: #f5e0dc;
|
||||
$flamingo: #f2cdcd;
|
||||
$pink: #f5c2e7;
|
||||
$mauve: #cba6f7;
|
||||
$red: #f38ba8;
|
||||
$maroon: #eba0ac;
|
||||
$peach: #fab387;
|
||||
$yellow: #f9e2af;
|
||||
$green: #a6e3a1;
|
||||
$teal: #94e2d5;
|
||||
$sky: #89dceb;
|
||||
$sapphire: #74c7ec;
|
||||
$blue: #89b4fa;
|
||||
$lavender: #b4befe;
|
||||
|
||||
$text: #cdd6f4;
|
||||
$subtext1: #bac2de;
|
||||
$subtext0: #a6adc8;
|
||||
$overlay2: #9399b2;
|
||||
$overlay1: #7f849c;
|
||||
$overlay0: #6c7086;
|
||||
|
||||
$surface2: #585b70;
|
||||
$surface1: #45475a;
|
||||
$surface0: #313244;
|
||||
|
||||
$base: #1e1e2e;
|
||||
$mantle: #181825;
|
||||
$crust: #11111b;
|
||||
|
||||
$fg: $text;
|
||||
$bg: rgba(30, 30, 46, 0.6);
|
||||
$bg1: rgba(49, 50, 68, 0.6);
|
||||
$border: #28283d;
|
||||
$shadow: $crust;
|
66
flake/home/programs/eww/css/_music.scss
Normal file
66
flake/home/programs/eww/css/_music.scss
Normal file
|
@ -0,0 +1,66 @@
|
|||
.song-cover-art {
|
||||
@include rounding;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
margin: 4px 5px 4px 0;
|
||||
min-height: 24px;
|
||||
min-width: 24px;
|
||||
}
|
||||
|
||||
.music-window {
|
||||
@include window;
|
||||
background-color: $bg;
|
||||
border: 1px solid $border;
|
||||
color: $fg;
|
||||
}
|
||||
|
||||
.music-cover-art {
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
border-radius: 8px;
|
||||
margin: 1em;
|
||||
min-height: 170px;
|
||||
min-width: 170px;
|
||||
}
|
||||
|
||||
.music-box {
|
||||
margin: 1rem 1rem 1rem 0;
|
||||
}
|
||||
|
||||
.music-title {
|
||||
font-size: 1.1rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.music-artist {
|
||||
color: $white_a;
|
||||
}
|
||||
|
||||
.music-button label {
|
||||
color: $white_a;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.music-time {
|
||||
color: $white_a;
|
||||
margin: 0 1rem;
|
||||
}
|
||||
|
||||
.music-bar scale {
|
||||
highlight {
|
||||
background-image: linear-gradient(to right, $cyan, $blue_a);
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
trough {
|
||||
background-color: $bg1;
|
||||
border-radius: 24px;
|
||||
margin-top: 0;
|
||||
min-height: 10px;
|
||||
min-width: 170px;
|
||||
}
|
||||
}
|
||||
|
||||
.playctl {
|
||||
color: $yellow;
|
||||
}
|
36
flake/home/programs/eww/css/_osd.scss
Normal file
36
flake/home/programs/eww/css/_osd.scss
Normal file
|
@ -0,0 +1,36 @@
|
|||
.osd-part {
|
||||
@include window;
|
||||
background: $bg;
|
||||
margin: 0 .5rem .5rem;
|
||||
|
||||
label {
|
||||
color: $text;
|
||||
font-size: 2rem;
|
||||
margin: 0 .1rem 0 .2rem;
|
||||
}
|
||||
|
||||
scale {
|
||||
margin: -.2rem 0;
|
||||
}
|
||||
|
||||
trough {
|
||||
@include rounding;
|
||||
background-color: $bg1;
|
||||
margin: 1rem 0 .5rem;
|
||||
min-height: 10rem;
|
||||
min-width: .7rem;
|
||||
|
||||
highlight {
|
||||
@include rounding;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.osd-volume highlight {
|
||||
background-image: linear-gradient(to top, $cyan, $blue_a);
|
||||
}
|
||||
|
||||
.osd-brightness highlight {
|
||||
background-image: linear-gradient(to top, $yellow, $yellow_a);
|
||||
}
|
127
flake/home/programs/eww/css/_sidebar.scss
Normal file
127
flake/home/programs/eww/css/_sidebar.scss
Normal file
|
@ -0,0 +1,127 @@
|
|||
.system-menu-box {
|
||||
@include window;
|
||||
background-color: $bg;
|
||||
color: $text;
|
||||
}
|
||||
|
||||
.separator {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
margin: 1rem 1.5rem 0;
|
||||
|
||||
.time { font-size: 2rem; }
|
||||
|
||||
.date-box {
|
||||
margin: 0 1rem;
|
||||
|
||||
label { font-size: 1.1rem; }
|
||||
|
||||
.date {
|
||||
background: unset;
|
||||
margin: 0 .5rem 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.system-row {
|
||||
margin: .5rem .7rem;
|
||||
|
||||
.airplane-box button {
|
||||
padding: 1rem 3rem;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 1rem;
|
||||
margin: 0 .1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.element {
|
||||
@include rounding;
|
||||
background-color: $black;
|
||||
margin: .3rem;
|
||||
|
||||
button {
|
||||
@include rounding;
|
||||
padding: 1rem;
|
||||
|
||||
label {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $cyan_a;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sliders {
|
||||
@include rounding;
|
||||
background-color: $black;
|
||||
margin: .5rem 1rem;
|
||||
padding: .6rem 1rem;
|
||||
|
||||
scale {
|
||||
margin-right: -1rem;
|
||||
min-width: 21.5rem;
|
||||
|
||||
trough { margin-right: 0; }
|
||||
}
|
||||
|
||||
box { margin: .2rem 0; }
|
||||
label { font-size: 1.2rem; }
|
||||
}
|
||||
|
||||
.volume-slider-box,
|
||||
.brightness-slider-box {
|
||||
trough { background-color: $base; }
|
||||
}
|
||||
|
||||
.volume-bar highlight {
|
||||
@include rounding;
|
||||
background-image: linear-gradient(to right, $cyan, $blue_a);
|
||||
}
|
||||
|
||||
.brightness-slider-box scale highlight {
|
||||
@include rounding;
|
||||
background-image: linear-gradient(to right, $yellow, $yellow_a);
|
||||
}
|
||||
|
||||
.bottom-row {
|
||||
margin: .5rem 1rem;
|
||||
|
||||
.battery-icon { font-size: 2rem; }
|
||||
.battery-wattage { color: $magenta; }
|
||||
|
||||
.battery-status {
|
||||
color: $green;
|
||||
margin: 0 .5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: $black;
|
||||
border-radius: 50%;
|
||||
margin-bottom: .1rem;
|
||||
padding: 0 .5rem;
|
||||
|
||||
label { font-size: 1.5rem; }
|
||||
&:hover { background-color: $black_a; }
|
||||
}
|
||||
}
|
||||
|
||||
.bt-connected {
|
||||
background-color: $blue;
|
||||
color: $red;
|
||||
|
||||
button:hover { background-color: rgba(0, 0, 0, .1); }
|
||||
}
|
||||
|
||||
.wifi-connected {
|
||||
background-color: $magenta;
|
||||
color: $red;
|
||||
|
||||
button:hover { background-color: rgba(0, 0, 0, .1); }
|
||||
}
|
80
flake/home/programs/eww/css/_system.scss
Normal file
80
flake/home/programs/eww/css/_system.scss
Normal file
|
@ -0,0 +1,80 @@
|
|||
* {
|
||||
transition: 1s;
|
||||
}
|
||||
|
||||
.membar {
|
||||
color: $yellow;
|
||||
}
|
||||
|
||||
.cpubar {
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
.batbar {
|
||||
color: $green;
|
||||
}
|
||||
|
||||
.membar,
|
||||
.cpubar,
|
||||
.batbar {
|
||||
background-color: $bg1;
|
||||
}
|
||||
|
||||
.iconmem {
|
||||
color: $yellow;
|
||||
}
|
||||
|
||||
.iconcpu {
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
.icon-text {
|
||||
font-size: 3rem;
|
||||
padding: .7rem;
|
||||
}
|
||||
|
||||
.sys-text-sub {
|
||||
color: $text;
|
||||
}
|
||||
|
||||
.sys-text-mem,
|
||||
.sys-text-cpu {
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sys-icon-mem,
|
||||
.sys-icon-cpu {
|
||||
font-size: 1.5rem;
|
||||
margin: 1.5rem;
|
||||
}
|
||||
|
||||
.system-info-box {
|
||||
@include rounding;
|
||||
background-color: $black;
|
||||
margin: .5rem 1rem;
|
||||
padding: .5rem;
|
||||
}
|
||||
|
||||
.sys-mem,
|
||||
.sys-cpu {
|
||||
background-color: $bg;
|
||||
}
|
||||
|
||||
.sys-icon-mem,
|
||||
.sys-text-mem,
|
||||
.sys-mem {
|
||||
color: $yellow;
|
||||
}
|
||||
|
||||
.sys-icon-cpu,
|
||||
.sys-text-cpu,
|
||||
.sys-cpu {
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
.sys-box {
|
||||
margin: .3em;
|
||||
|
||||
box { margin-left: 1rem; }
|
||||
}
|
5
flake/home/programs/eww/css/_volume.scss
Normal file
5
flake/home/programs/eww/css/_volume.scss
Normal file
|
@ -0,0 +1,5 @@
|
|||
.vol-icon { color: $green; }
|
||||
.volbar highlight {
|
||||
background-image: linear-gradient(to right, $cyan, $blue_a);
|
||||
border-radius: 10px;
|
||||
}
|
127
flake/home/programs/eww/default.nix
Normal file
127
flake/home/programs/eww/default.nix
Normal file
|
@ -0,0 +1,127 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
dependencies = with pkgs; [
|
||||
config.wayland.windowManager.hyprland.package
|
||||
cfg.package
|
||||
bash
|
||||
bc
|
||||
blueberry
|
||||
bluez
|
||||
coreutils
|
||||
dbus
|
||||
dunst
|
||||
findutils
|
||||
gawk
|
||||
gnome.gnome-control-center
|
||||
gnused
|
||||
gojq
|
||||
imagemagick
|
||||
jaq
|
||||
light
|
||||
networkmanager
|
||||
pavucontrol
|
||||
playerctl
|
||||
procps
|
||||
pulseaudio
|
||||
ripgrep
|
||||
socat
|
||||
udev
|
||||
upower
|
||||
util-linux
|
||||
wget
|
||||
wireplumber
|
||||
wlogout
|
||||
fuzzel
|
||||
swaynotificationcenter
|
||||
];
|
||||
|
||||
reload_script = pkgs.writeShellScript "reload_eww" ''
|
||||
windows=$(eww windows | rg '\*' | tr -d '*')
|
||||
|
||||
systemctl --user restart eww.service
|
||||
|
||||
echo $windows | while read -r w; do
|
||||
eww open $w
|
||||
done
|
||||
'';
|
||||
|
||||
cfg = config.programs.eww-hyprland;
|
||||
in {
|
||||
options.programs.eww-hyprland = {
|
||||
enable = lib.mkEnableOption "eww Hyprland config";
|
||||
|
||||
package = lib.mkOption {
|
||||
type = with lib.types; nullOr package;
|
||||
default = pkgs.eww-wayland;
|
||||
defaultText = lib.literalExpression "pkgs.eww-wayland";
|
||||
description = "Eww package to use.";
|
||||
};
|
||||
|
||||
autoReload = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
defaultText = lib.literalExpression "false";
|
||||
description = "Whether to restart the eww daemon and windows on change.";
|
||||
};
|
||||
|
||||
colors = lib.mkOption {
|
||||
type = with lib.types; nullOr lines;
|
||||
default = null;
|
||||
defaultText = lib.literalExpression "null";
|
||||
description = ''
|
||||
SCSS file with colors defined in the same way as Catppuccin colors are,
|
||||
to be used by eww.
|
||||
|
||||
Defaults to Catppuccin Mocha.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [cfg.package];
|
||||
|
||||
# remove nix files
|
||||
xdg.configFile."eww" = {
|
||||
source = lib.cleanSourceWith {
|
||||
filter = name: _type: let
|
||||
baseName = baseNameOf (toString name);
|
||||
in
|
||||
!(lib.hasSuffix ".nix" baseName) && !(baseName == "_colors.scss");
|
||||
src = lib.cleanSource ./.;
|
||||
};
|
||||
|
||||
# links each file individually, which lets us insert the colors file separately
|
||||
recursive = true;
|
||||
|
||||
onChange =
|
||||
if cfg.autoReload
|
||||
then reload_script.outPath
|
||||
else "";
|
||||
};
|
||||
|
||||
# colors file
|
||||
xdg.configFile."eww/css/_colors.scss".text =
|
||||
if cfg.colors != null
|
||||
then cfg.colors
|
||||
else (builtins.readFile ./css/_colors.scss);
|
||||
|
||||
systemd.user.services.eww = {
|
||||
Unit = {
|
||||
Description = "Eww Daemon";
|
||||
# not yet implemented
|
||||
# PartOf = ["tray.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath dependencies}";
|
||||
ExecStart = "${cfg.package}/bin/eww daemon --no-daemonize";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
}
|
93
flake/home/programs/eww/eww.scss
Normal file
93
flake/home/programs/eww/eww.scss
Normal file
|
@ -0,0 +1,93 @@
|
|||
@import 'css/colors';
|
||||
|
||||
@mixin rounding {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
@mixin window {
|
||||
border: 1px solid $border;
|
||||
box-shadow: 0 2px 3px $shadow;
|
||||
margin: 5px 5px 0px;
|
||||
@include rounding;
|
||||
}
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
font-family: "Montreux Classic", "Jost *", Roboto, sans-serif;
|
||||
transition: 200ms ease;
|
||||
}
|
||||
|
||||
@import 'css/calendar';
|
||||
@import 'css/music';
|
||||
@import 'css/osd';
|
||||
@import 'css/sidebar';
|
||||
@import 'css/system';
|
||||
@import 'css/volume';
|
||||
|
||||
.bar {
|
||||
color: $fg;
|
||||
label {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.vis {
|
||||
background-color: $bg;
|
||||
border-radius: 24px;
|
||||
padding: 4px 24px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 0px;
|
||||
border: 3px solid $outline;
|
||||
}
|
||||
|
||||
.invis {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: $bg;
|
||||
border: 1px solid $border;
|
||||
border-radius: 8px;
|
||||
|
||||
label {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.icon,
|
||||
.icon label { font-family: Material Symbols Outlined; }
|
||||
|
||||
.module { margin: 0 5px; }
|
||||
|
||||
.hour {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.minute {
|
||||
padding-right: .7rem;
|
||||
}
|
||||
|
||||
.date {
|
||||
background: $bg;
|
||||
color: $yellow;
|
||||
|
||||
label {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.bright-icon { color: $yellow_a; }
|
||||
.module-bt { font-size: 1.2rem; }
|
||||
|
||||
scale trough {
|
||||
background-color: $bg;
|
||||
border-radius: 24px;
|
||||
margin: 0 1rem;
|
||||
min-height: 10px;
|
||||
min-width: 70px;
|
||||
}
|
||||
|
||||
.workspaces {
|
||||
margin-left: 10px;
|
||||
button { transition: color 2s ease; }
|
||||
}
|
56
flake/home/programs/eww/eww.yuck
Normal file
56
flake/home/programs/eww/eww.yuck
Normal file
|
@ -0,0 +1,56 @@
|
|||
(include "./modules/clock.yuck")
|
||||
(include "./modules/music.yuck")
|
||||
(include "./modules/net.yuck")
|
||||
(include "./modules/sys.yuck")
|
||||
(include "./modules/variables.yuck")
|
||||
(include "./modules/volume.yuck")
|
||||
(include "./modules/workspaces.yuck")
|
||||
(include "./modules/current_win.yuck")
|
||||
|
||||
(include "./windows/calendar.yuck")
|
||||
(include "./windows/music.yuck")
|
||||
(include "./windows/osd.yuck")
|
||||
(include "./windows/system-menu.yuck")
|
||||
|
||||
(defwidget left []
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:class "vis"
|
||||
(workspaces)))
|
||||
|
||||
(defwidget right []
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
:class "vis bar"
|
||||
(music-module)
|
||||
(volume-module)
|
||||
(net)
|
||||
(sys)
|
||||
(clock_module)))
|
||||
|
||||
(defwidget center []
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:class "vis bar"
|
||||
(current-win-module)))
|
||||
|
||||
(defwidget bar-box []
|
||||
(centerbox
|
||||
:class "invis bar"
|
||||
(left)
|
||||
(center)
|
||||
(right)))
|
||||
|
||||
(defwindow bar
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0%"
|
||||
:y "0%"
|
||||
:width "98%"
|
||||
:height "24px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
(bar-box))
|
8
flake/home/programs/eww/modules/bluetooth.yuck
Normal file
8
flake/home/programs/eww/modules/bluetooth.yuck
Normal file
|
@ -0,0 +1,8 @@
|
|||
(defwidget bluetooth []
|
||||
(button
|
||||
:class "module-bt module icon"
|
||||
:onclick "blueberry"
|
||||
:onrightclick "scripts/bluetooth toggle"
|
||||
:tooltip "${bluetooth.text} ${bluetooth.battery}"
|
||||
:style "color: ${bluetooth.color};"
|
||||
{bluetooth.icon}))
|
9
flake/home/programs/eww/modules/bright.yuck
Normal file
9
flake/home/programs/eww/modules/bright.yuck
Normal file
|
@ -0,0 +1,9 @@
|
|||
(defwidget bright []
|
||||
(box
|
||||
:class "module"
|
||||
(eventbox
|
||||
:onscroll "echo {} | sed -e 's/up/-U 1/g' -e 's/down/-A 1/g' | xargs light"
|
||||
(label
|
||||
:text {brightness.icon}
|
||||
:class "bright-icon icon"
|
||||
:tooltip "brightness ${round(brightness.percent, 0)}%"))))
|
24
flake/home/programs/eww/modules/clock.yuck
Normal file
24
flake/home/programs/eww/modules/clock.yuck
Normal file
|
@ -0,0 +1,24 @@
|
|||
(defvar date_rev false)
|
||||
|
||||
(defwidget clock_module []
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update date_rev=true"
|
||||
:onhoverlost "${EWW_CMD} update date_rev=false"
|
||||
(overlay
|
||||
:class "module"
|
||||
(box
|
||||
:space-evenly false
|
||||
(label
|
||||
:text {time.hour}
|
||||
:class "hour")
|
||||
(label
|
||||
:text ":")
|
||||
(label
|
||||
:text {time.minute}
|
||||
:class "minute"))
|
||||
(revealer
|
||||
:reveal date_rev
|
||||
(button
|
||||
:class "date"
|
||||
:onclick "${EWW_CMD} open --toggle calendar"
|
||||
{time.date})))))
|
8
flake/home/programs/eww/modules/current_win.yuck
Normal file
8
flake/home/programs/eww/modules/current_win.yuck
Normal file
|
@ -0,0 +1,8 @@
|
|||
(defwidget current-win-module []
|
||||
(box
|
||||
(button
|
||||
:class "module"
|
||||
{current_win.title}
|
||||
)
|
||||
)
|
||||
)
|
28
flake/home/programs/eww/modules/music.yuck
Normal file
28
flake/home/programs/eww/modules/music.yuck
Normal file
|
@ -0,0 +1,28 @@
|
|||
(defwidget music-module []
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update music_reveal=true"
|
||||
:onhoverlost "${EWW_CMD} update music_reveal=false"
|
||||
(box
|
||||
:class "module"
|
||||
:space-evenly false
|
||||
(box
|
||||
:class "song-cover-art"
|
||||
:style "background-image: url(\"${music.cover}\");")
|
||||
(button
|
||||
:class "module"
|
||||
:onclick "${EWW_CMD} open --toggle music"
|
||||
{music.status == "Stopped" || music.status == "" ? "" :
|
||||
"${music.artist} - ${music.title}"})
|
||||
(box
|
||||
:class "icon"
|
||||
{music.static == "Stopped" || music.status == "" ? "" : music.status == "Playing" ? "" : "" })
|
||||
(revealer
|
||||
:class "playctl"
|
||||
:transition "slideright"
|
||||
:reveal music_reveal
|
||||
:duration "350ms"
|
||||
(box
|
||||
:class "icon"
|
||||
(button :class "song-button" :onclick "playerctl previous" "")
|
||||
(button :class "song-button" :onclick "playerctl play-pause" {music.status == "Playing" ? "" : ""})
|
||||
(button :class "song-button" :onclick "playerctl next" ""))))))
|
7
flake/home/programs/eww/modules/net.yuck
Normal file
7
flake/home/programs/eww/modules/net.yuck
Normal file
|
@ -0,0 +1,7 @@
|
|||
(defwidget net []
|
||||
(button
|
||||
:class "module icon"
|
||||
:onclick "gnome-control-center &"
|
||||
:tooltip {net.essid}
|
||||
:style "color: ${net.color};"
|
||||
{net.icon}))
|
32
flake/home/programs/eww/modules/sys.yuck
Normal file
32
flake/home/programs/eww/modules/sys.yuck
Normal file
|
@ -0,0 +1,32 @@
|
|||
(defwidget sys []
|
||||
(box
|
||||
:class "module"
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
(circular-progress
|
||||
:value "${EWW_CPU.avg}"
|
||||
:class "cpubar"
|
||||
:thickness 3
|
||||
(button
|
||||
:tooltip "using ${round(EWW_CPU.avg,0)}% cpu"
|
||||
:onclick "${EWW_CMD} open --toggle system-menu"
|
||||
(label :class "icon-text" :text "")))
|
||||
|
||||
(circular-progress
|
||||
:value {memory.percent}
|
||||
:class "membar"
|
||||
:thickness 3
|
||||
(button
|
||||
:tooltip "using ${round(memory.percent,0)}% ram"
|
||||
:onclick "${EWW_CMD} open --toggle system-menu"
|
||||
(label :class "icon-text" :text "")))
|
||||
|
||||
(circular-progress
|
||||
:value "${EWW_BATTERY["BAT0"].capacity}"
|
||||
:class "batbar"
|
||||
:style "color: ${battery.color};"
|
||||
:thickness 3
|
||||
(button
|
||||
:tooltip "battery on ${EWW_BATTERY["BAT0"].capacity}%"
|
||||
:onclick "${EWW_CMD} open --toggle system-menu"
|
||||
(label :class "icon-text" :text "")))))
|
21
flake/home/programs/eww/modules/variables.yuck
Normal file
21
flake/home/programs/eww/modules/variables.yuck
Normal file
|
@ -0,0 +1,21 @@
|
|||
(defvar bright_reveal false)
|
||||
(defvar bt_rev false)
|
||||
(defvar music_reveal false)
|
||||
(defvar net_rev false)
|
||||
(defvar time_rev false)
|
||||
(defvar vol_reveal false)
|
||||
(defvar osd-brightness false)
|
||||
(defvar osd-volume false)
|
||||
|
||||
(defpoll time :interval "5s" `date +'{"date": "%d/%m", "hour": "%H", "minute": "%M", "day": "%A"}'`)
|
||||
|
||||
(deflisten airplane "scripts/airplane")
|
||||
(deflisten battery "scripts/battery")
|
||||
(deflisten bluetooth "scripts/bluetooth")
|
||||
(deflisten brightness "scripts/brightness")
|
||||
(deflisten memory "scripts/memory")
|
||||
(deflisten music "scripts/music")
|
||||
(deflisten net "scripts/net")
|
||||
(deflisten volume "scripts/volume")
|
||||
(deflisten workspace "scripts/workspaces")
|
||||
(deflisten current_win "scripts/current_win")
|
11
flake/home/programs/eww/modules/volume.yuck
Normal file
11
flake/home/programs/eww/modules/volume.yuck
Normal file
|
@ -0,0 +1,11 @@
|
|||
(defwidget volume-module []
|
||||
(box
|
||||
:class "module icon"
|
||||
(eventbox
|
||||
:onscroll "echo {} | sed -e 's/up/-/g' -e 's/down/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.005%"
|
||||
:onclick "pavucontrol &"
|
||||
:onrightclick "scripts/volume mute SINK"
|
||||
(label
|
||||
:class "vol-icon"
|
||||
:tooltip "volume ${volume.percent}%"
|
||||
:text {volume.icon}))))
|
13
flake/home/programs/eww/modules/workspaces.yuck
Normal file
13
flake/home/programs/eww/modules/workspaces.yuck
Normal file
|
@ -0,0 +1,13 @@
|
|||
(defwidget workspaces []
|
||||
(eventbox
|
||||
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
|
||||
(box
|
||||
:class "module workspaces"
|
||||
:spacing 5
|
||||
(for ws in workspace
|
||||
(button
|
||||
:onclick "hyprctl dispatch workspace ${ws.number}"
|
||||
:class "ws icon"
|
||||
:style "color: ${ws.color};"
|
||||
; :tooltip {ws.tooltip}
|
||||
"●")))))
|
29
flake/home/programs/eww/scripts/airplane
Executable file
29
flake/home/programs/eww/scripts/airplane
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
icon() {
|
||||
if [ "$STATUS" = "no" ]; then
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if [ "$STATUS" = "no" ]; then
|
||||
rfkill block all
|
||||
notify-send --urgency=normal -i airplane-mode-symbolic "Airplane Mode" "Airplane mode has been turned on!"
|
||||
else
|
||||
rfkill unblock all
|
||||
notify-send --urgency=normal -i airplane-mode-disabled-symbolic "Airplane Mode" "Airplane mode has been turned off!"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" = "toggle" ]; then
|
||||
toggle
|
||||
else
|
||||
while true; do
|
||||
STATUS="$(rfkill list | sed -n 2p | awk '{print $3}')"
|
||||
icon
|
||||
sleep 3;
|
||||
done
|
||||
fi
|
65
flake/home/programs/eww/scripts/battery
Executable file
65
flake/home/programs/eww/scripts/battery
Executable file
|
@ -0,0 +1,65 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
icons=("" "" "" "" "" "" "" "")
|
||||
num_icons=$(bc <<< "100 / ${#icons[@]}")
|
||||
|
||||
|
||||
geticon() {
|
||||
level=$(awk -v n="$CAPACITY" -v c="$num_icons" 'BEGIN{print int(n/c-1)}')
|
||||
if [[ "$level" -lt 0 ]]; then
|
||||
level=0
|
||||
fi
|
||||
echo "${icons[$level]}"
|
||||
}
|
||||
|
||||
status() {
|
||||
if [ "$STATE" = "Charging" ]; then
|
||||
echo -n "charging"
|
||||
|
||||
if [ "$RATE" -gt 0 ]; then
|
||||
echo ", $(gettime) left"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
elif [ "$STATE" = "Discharging" ]; then
|
||||
echo "$(gettime)h left"
|
||||
else
|
||||
echo "fully charged"
|
||||
fi
|
||||
}
|
||||
|
||||
color() {
|
||||
if [ "$CAPACITY" -le 20 ]; then
|
||||
echo '#f38ba8'
|
||||
else
|
||||
echo '#a6e3a1'
|
||||
fi
|
||||
}
|
||||
|
||||
wattage() {
|
||||
microwatts=1000000
|
||||
echo "$(bc -l <<< "scale=1; $RATE / $microwatts") W"
|
||||
}
|
||||
|
||||
gettime() {
|
||||
FULL=$(cat /sys/class/power_supply/BAT0/energy_full)
|
||||
NOW=$(cat /sys/class/power_supply/BAT0/energy_now)
|
||||
|
||||
if [ "$RATE" -gt 0 ]; then
|
||||
if [ "$STATE" = "Discharging" ]; then
|
||||
EX="$NOW / $RATE"
|
||||
else
|
||||
EX="($FULL - $NOW) / $RATE"
|
||||
fi
|
||||
date -u -d@"$(bc -l <<< "$EX * 3600")" +%H:%M
|
||||
fi
|
||||
}
|
||||
|
||||
while true; do
|
||||
RATE=$(cat /sys/class/power_supply/BAT0/power_now)
|
||||
CAPACITY=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||
STATE=$(cat /sys/class/power_supply/BAT0/status)
|
||||
|
||||
echo '{ "icon": "'"$(geticon)"'", "percent": '"$CAPACITY"', "wattage": "'"$(wattage)"'", "status": "'"$(status)"'", "color": "'"$(color)"'" }'
|
||||
sleep 3
|
||||
done
|
51
flake/home/programs/eww/scripts/bluetooth
Executable file
51
flake/home/programs/eww/scripts/bluetooth
Executable file
|
@ -0,0 +1,51 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
toggle() {
|
||||
status=$(rfkill -J | jaq -r '.rfkilldevices[] | select(.type == "bluetooth") | .soft' | head -1)
|
||||
|
||||
if [ "$status" = "unblocked" ]; then
|
||||
rfkill block bluetooth
|
||||
else
|
||||
rfkill unblock bluetooth
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" = "toggle" ]; then
|
||||
toggle
|
||||
else
|
||||
while true; do
|
||||
powered=$(bluetoothctl show | rg Powered | cut -f 2- -d ' ')
|
||||
status=$(bluetoothctl info)
|
||||
name=$(echo "$status" | rg Name | cut -f 2- -d ' ')
|
||||
mac=$(echo "$status" | head -1 | awk '{print $2}' | tr ':' '_')
|
||||
|
||||
if [[ "$(echo "$status" | rg Percentage)" != "" ]]; then
|
||||
battery="$(upower -i /org/freedesktop/UPower/devices/headset_dev_"$mac" | rg percentage | awk '{print $2}' | cut -f 1 -d '%')%"
|
||||
else
|
||||
battery=""
|
||||
fi
|
||||
|
||||
if [ "$powered" = "yes" ]; then
|
||||
if [ "$status" != "Missing device address argument" ]; then
|
||||
text="$name"
|
||||
icon=""
|
||||
color="#89b4fa"
|
||||
class="bt-connected"
|
||||
else
|
||||
icon=""
|
||||
text="Disconnected"
|
||||
color="#45475a"
|
||||
class=""
|
||||
fi
|
||||
else
|
||||
icon=""
|
||||
text="Bluetooth off"
|
||||
color="#45475a"
|
||||
class=""
|
||||
fi
|
||||
|
||||
echo '{ "icon": "'"$icon"'", "battery": "'"$battery"'", "text": "'"$text"'", "color": "'"$color"'", "class": "'"$class"'" }'
|
||||
|
||||
sleep 3
|
||||
done
|
||||
fi
|
61
flake/home/programs/eww/scripts/brightness
Executable file
61
flake/home/programs/eww/scripts/brightness
Executable file
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
icons=("" "" "")
|
||||
if [ ! "$XDG_CACHE_HOME" ]; then
|
||||
XDG_CACHE_HOME="/home/mihai/.local/cache"
|
||||
fi
|
||||
date="$XDG_CACHE_HOME/eww/osd_brightness.date"
|
||||
|
||||
osd() {
|
||||
if [ ! -f "$date" ]; then
|
||||
mkdir -p "$XDG_CACHE_HOME/eww"
|
||||
fi
|
||||
date +%s > "$date"
|
||||
}
|
||||
|
||||
osd_handler() {
|
||||
lock=0
|
||||
rundate=0
|
||||
if [ ! -f "$date" ]; then
|
||||
mkdir -p "$XDG_CACHE_HOME/eww"
|
||||
echo 0 > "$date"
|
||||
fi
|
||||
|
||||
while true; do
|
||||
# get dates
|
||||
rundate=$(cat "$date")
|
||||
currentdate=$(date +%s)
|
||||
|
||||
# handle showing
|
||||
if [ "$rundate" = "$currentdate" ] && [ "$lock" -eq 0 ]; then
|
||||
eww open osd
|
||||
eww update osd-brightness=true
|
||||
lock=1
|
||||
elif [ "$((currentdate - rundate))" = "2" ] && [ "$lock" -eq 1 ]; then
|
||||
eww update osd-brightness=false
|
||||
lock=0
|
||||
if [ "$(eww get osd-brightness)" = "false" ] && [ "$(eww get osd-volume)" = "false" ]; then
|
||||
eww close osd
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
eww close osd
|
||||
}
|
||||
|
||||
if [ "$1" = "osd" ]; then
|
||||
osd
|
||||
else
|
||||
osd_handler &
|
||||
# initial
|
||||
icon=${icons[$(awk -v n="$(light)" 'BEGIN{print int(n/34)}')]}
|
||||
echo '{ "percent": '"$(light)"', "icon": "'"$icon"'" }'
|
||||
|
||||
udevadm monitor | rg --line-buffered "backlight" | while read -r _; do
|
||||
icon="${icons[$(awk -v n="$(light)" 'BEGIN{print int(n/34)}')]}"
|
||||
|
||||
echo '{ "percent": '"$(light)"', "icon": "'"$icon"'" }'
|
||||
done
|
||||
fi
|
10
flake/home/programs/eww/scripts/current_win
Executable file
10
flake/home/programs/eww/scripts/current_win
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
socat -u UNIX-CLIENT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock STDOUT |
|
||||
while read line; do
|
||||
if [[ "$line" == activewindow\>\>* ]]; then
|
||||
windowtitle="$(echo $line | cut -d',' -f 2)"
|
||||
echo '{"title": "'$windowtitle'"}'
|
||||
fi
|
||||
done
|
||||
|
20
flake/home/programs/eww/scripts/memory
Executable file
20
flake/home/programs/eww/scripts/memory
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
while true; do
|
||||
# human-readable
|
||||
freeH=$(free -h --si | rg "Mem:")
|
||||
# non-human-readable
|
||||
freeN=$(free --mega | rg "Mem:")
|
||||
|
||||
total="$(echo "$freeH" | awk '{ print $2 }')"
|
||||
used="$(echo "$freeH" | awk '{ print $3 }')"
|
||||
t="$(echo "$freeN" | awk '{ print $2 }')"
|
||||
u="$(echo "$freeN" | awk '{ print $3 }')"
|
||||
|
||||
free=$(printf '%.1fG' "$(bc -l <<< "($t - $u) / 1000")")
|
||||
perc=$(printf '%.1f' "$(free -m | rg Mem | awk '{print ($3/$2)*100}')")
|
||||
|
||||
echo '{ "total": "'"$total"'", "used": "'"$used"'", "free": "'"$free"'", "percent": '"$perc"' }'
|
||||
|
||||
sleep 3
|
||||
done
|
111
flake/home/programs/eww/scripts/music
Executable file
111
flake/home/programs/eww/scripts/music
Executable file
|
@ -0,0 +1,111 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
get_status() {
|
||||
s=$1
|
||||
if [ "$s" = "Playing" ]; then
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
get_length_sec() {
|
||||
len=$1
|
||||
if [ -z "$len" ]; then
|
||||
echo 0
|
||||
else
|
||||
bc <<<"$len / 1000000"
|
||||
fi
|
||||
}
|
||||
|
||||
get_length_time() {
|
||||
len=$1
|
||||
if [ -n "$len" ]; then
|
||||
len=$(bc <<<"$len / 1000000 + 1")
|
||||
date -d@"$len" +%M:%S
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
get_position() {
|
||||
pos=$1
|
||||
len=$2
|
||||
if [ -n "$pos" ]; then
|
||||
bc -l <<<"$pos / $len * 100"
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
||||
get_position_time() {
|
||||
pos=$1
|
||||
len=$2
|
||||
if [ -n "$pos" ]; then
|
||||
date -d@"$(bc <<<"$pos / 1000000")" +%M:%S
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
get_cover() {
|
||||
mkdir -p "$XDG_CACHE_HOME/eww_covers"
|
||||
cd "$XDG_CACHE_HOME/eww_covers" || exit
|
||||
|
||||
IMGPATH="$XDG_CACHE_HOME/eww_covers/cover_art.png"
|
||||
|
||||
COVER_URL="$1"
|
||||
|
||||
if [[ "$COVER_URL" = https* ]]; then
|
||||
if [ ! -e "$XDG_CACHE_HOME/eww_covers/$(basename "$COVER_URL")" ]; then
|
||||
wget -N "$COVER_URL" -o /dev/null
|
||||
fi
|
||||
|
||||
rm "$IMGPATH"
|
||||
ln -s "$(basename "$COVER_URL")" "$IMGPATH"
|
||||
|
||||
IMG="${IMGPATH}"
|
||||
elif [ "$COVER_URL" = "" ]; then
|
||||
IMG=""
|
||||
else
|
||||
IMG="$COVER_URL"
|
||||
fi
|
||||
|
||||
echo "$IMG"
|
||||
}
|
||||
|
||||
sanitize() {
|
||||
echo "$1" | sed 's/"/\"/g'
|
||||
}
|
||||
|
||||
prevCover=''
|
||||
|
||||
playerctl -F metadata -f '{{title}}\{{artist}}\{{status}}\{{position}}\{{mpris:length}}\{{mpris:artUrl}}' 2>/dev/null | while IFS="$(printf '\')" read -r title artist status position len cover; do
|
||||
if [[ "$cover" != "$prevCover" ]]; then
|
||||
COVER=$(get_cover "$cover")
|
||||
|
||||
if [ "$COVER" != "" ]; then
|
||||
cols=$(convert "$COVER" -colors 2 -format "%c" histogram:info: | awk '{print $3}')
|
||||
color1=$(echo "$cols" | head -1)
|
||||
color1=$(printf "rgba(%d, %d, %d, 0.6)" ${color1:1:2} ${color1:3:2} ${color1:5:2})
|
||||
color2=$(echo "$cols" | tail -1)
|
||||
else
|
||||
color1="#1e1e2e"
|
||||
color2="#28283d"
|
||||
fi
|
||||
fi
|
||||
|
||||
jaq --null-input -r -c \
|
||||
--arg artist "$(sanitize "$artist")" \
|
||||
--arg title "$(sanitize "$title")" \
|
||||
--arg status "$status" \
|
||||
--arg pos "$(get_position "$position" "$len")" \
|
||||
--arg pos_time "$(get_position_time "$position" "$len")" \
|
||||
--arg length "$(get_length_time "$len")" \
|
||||
--arg cover "$COVER" \
|
||||
--arg color1 "$color1" \
|
||||
--arg color2 "$color2" \
|
||||
'{"artist": $artist, "title": $title, "status": $status, "position": $pos, "position_time": $pos_time, "length": $length, "cover": $cover, "color1": $color1, "color2": $color2}'
|
||||
|
||||
prevCover=$cover
|
||||
done
|
43
flake/home/programs/eww/scripts/net
Executable file
43
flake/home/programs/eww/scripts/net
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
toggle() {
|
||||
status=$(rfkill -J | jaq -r '.rfkilldevices[] | select(.type == "wlan") | .soft' | head -1)
|
||||
|
||||
if [ "$status" = "unblocked" ]; then
|
||||
rfkill block wlan
|
||||
else
|
||||
rfkill unblock wlan
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" = "toggle" ]; then
|
||||
toggle
|
||||
else
|
||||
while true; do
|
||||
status=$(nmcli -f state g| tail -1)
|
||||
wifistatus=$(nmcli -t -f in-use,ssid,signal dev wifi | rg '\*' | sed 's/\"/\\"/g')
|
||||
signal=$(echo "$wifistatus" | awk -F: '{print $3}')
|
||||
essid=$(echo "$wifistatus" | awk -F: '{print $2}')
|
||||
|
||||
icons=("" "" "" "" "")
|
||||
|
||||
if [ "$status" = "disconnected" ] ; then
|
||||
icon=""
|
||||
color="#988ba2"
|
||||
class=""
|
||||
else
|
||||
level=$(awk -v n="$signal" 'BEGIN{print int((n-1)/20)}')
|
||||
if [ "$level" -gt 4 ]; then
|
||||
level=4
|
||||
fi
|
||||
|
||||
icon=${icons[$level]}
|
||||
color="#cba6f7"
|
||||
class="wifi-connected"
|
||||
fi
|
||||
|
||||
echo '{ "essid": "'"$essid"'", "icon": "'"$icon"'", "color": "'"$color"'", "class": "'"$class"'" }'
|
||||
|
||||
sleep 3
|
||||
done
|
||||
fi
|
102
flake/home/programs/eww/scripts/volume
Executable file
102
flake/home/programs/eww/scripts/volume
Executable file
|
@ -0,0 +1,102 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
volicons=("" "" "")
|
||||
if [ ! "$XDG_CACHE_HOME" ]; then
|
||||
XDG_CACHE_HOME="/home/mihai/.local/cache"
|
||||
fi
|
||||
date="$XDG_CACHE_HOME/eww/osd_vol.date"
|
||||
|
||||
vol() {
|
||||
wpctl get-volume @DEFAULT_AUDIO_"$1"@ | awk '{print int($2*100)}'
|
||||
}
|
||||
ismuted() {
|
||||
wpctl get-volume @DEFAULT_AUDIO_"$1"@ | rg -i muted
|
||||
echo $?
|
||||
}
|
||||
setvol() {
|
||||
wpctl set-volume @DEFAULT_AUDIO_"$1"@ "$(awk -v n="$2" 'BEGIN{print (n / 100)}')"
|
||||
}
|
||||
setmute() {
|
||||
wpctl set-mute @DEFAULT_AUDIO_"$1"@ toggle
|
||||
}
|
||||
|
||||
osd() {
|
||||
if [ ! -f "$date" ]; then
|
||||
mkdir -p "$XDG_CACHE_HOME/eww"
|
||||
fi
|
||||
date +%s > "$date"
|
||||
}
|
||||
|
||||
osd_handler() {
|
||||
lock=0
|
||||
rundate=0
|
||||
if [ ! -f "$date" ]; then
|
||||
mkdir -p "$XDG_CACHE_HOME/eww"
|
||||
echo 0 > "$date"
|
||||
fi
|
||||
|
||||
while true; do
|
||||
# get dates
|
||||
rundate=$(cat "$date")
|
||||
currentdate=$(date +%s)
|
||||
|
||||
# handle showing
|
||||
if [ "$rundate" = "$currentdate" ] && [ "$lock" -eq 0 ]; then
|
||||
eww open osd
|
||||
eww update osd-volume=true
|
||||
lock=1
|
||||
elif [ "$((currentdate - rundate))" = "2" ] && [ "$lock" -eq 1 ]; then
|
||||
eww update osd-volume=false
|
||||
lock=0
|
||||
if [ "$(eww get osd-volume)" = "false" ] && [ "$(eww get osd-brightness)" = "false" ]; then
|
||||
eww close osd
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
eww close osd
|
||||
}
|
||||
|
||||
if [ "$1" = "mute" ]; then
|
||||
if [ "$2" != "SOURCE" ] && [ "$2" != "SINK" ]; then
|
||||
echo "Can only mute SINK or SOURCE"; exit 1
|
||||
fi
|
||||
setmute "$2"
|
||||
elif [ "$1" = "setvol" ]; then
|
||||
if [ "$2" != "SOURCE" ] && [ "$2" != "SINK" ]; then
|
||||
echo "Can only set volume for SINK or SOURCE"; exit 1
|
||||
elif [ "$3" -lt 1 ] || [ "$3" -gt 100 ]; then
|
||||
echo "Volume must be between 1 and 100"; exit 1
|
||||
fi
|
||||
setvol "$2" "$3"
|
||||
elif [ "$1" = "osd" ]; then
|
||||
osd
|
||||
else
|
||||
# initial values
|
||||
lvl=$(awk -v n="$(vol "SINK")" 'BEGIN{print int(n/34)}')
|
||||
ismuted=$(ismuted "SINK")
|
||||
|
||||
if [ "$ismuted" = 1 ]; then
|
||||
icon="${volicons[$lvl]}"
|
||||
else
|
||||
icon=""
|
||||
fi
|
||||
echo '{ "icon": "'"$icon"'", "percent": "'"$(vol "SINK")"'", "microphone": "'"$(vol "SOURCE")"'" }'
|
||||
|
||||
osd_handler &
|
||||
|
||||
# event loop
|
||||
pactl subscribe | rg --line-buffered "change" | while read -r _; do
|
||||
lvl=$(awk -v n="$(vol "SINK")" 'BEGIN{print int(n/34)}')
|
||||
ismuted=$(ismuted "SINK")
|
||||
|
||||
if [ "$ismuted" = 1 ]; then
|
||||
icon="${volicons[$lvl]}"
|
||||
else
|
||||
icon=""
|
||||
fi
|
||||
echo '{ "icon": "'"$icon"'", "percent": "'"$(vol "SINK")"'", "microphone": "'"$(vol "SOURCE")"'" }'
|
||||
done
|
||||
fi
|
99
flake/home/programs/eww/scripts/workspaces
Executable file
99
flake/home/programs/eww/scripts/workspaces
Executable file
|
@ -0,0 +1,99 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# define colors
|
||||
# red peach green blue
|
||||
colors=("#f38ba8" "#fab387" "#a6e3a1" "#89b4fa")
|
||||
# pink yellow teal lavender
|
||||
dimmed=("#f5c2e7" "#f9e2af" "#94e2d5" "#b4befe")
|
||||
empty="#313244"
|
||||
|
||||
# get initial focused workspace
|
||||
focusedws=$(hyprctl -j monitors | jaq -r '.[] | select(.focused == true) | .activeWorkspace.id')
|
||||
|
||||
declare -A o=([1]=0 [2]=0 [3]=0 [4]=0)
|
||||
declare -A monitormap
|
||||
declare -A workspaces
|
||||
|
||||
# set color for each workspace
|
||||
status() {
|
||||
if [ "${o[$1]}" -eq 1 ]; then
|
||||
mon=${monitormap[${workspaces[$1]}]}
|
||||
|
||||
if [ "$focusedws" -eq "$1" ]; then
|
||||
echo -n "#27ae60"
|
||||
# echo -n "${colors[$mon]}"
|
||||
else
|
||||
# echo -n "${dimmed[$mon]}"
|
||||
echo -n "#fdbc4b"
|
||||
fi
|
||||
else
|
||||
# echo -n "$empty"
|
||||
echo -n "#2f343f"
|
||||
fi
|
||||
}
|
||||
|
||||
# handle workspace create/destroy
|
||||
workspace_event() {
|
||||
o[$1]=$2
|
||||
while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')
|
||||
}
|
||||
# handle monitor (dis)connects
|
||||
monitor_event() {
|
||||
while read -r k v; do monitormap["$k"]=$v; done < <(hyprctl -j monitors | gojq -r '.[]|"\(.name) \(.id) "')
|
||||
}
|
||||
|
||||
# get all apps titles in a workspace
|
||||
applist() {
|
||||
ws="$1"
|
||||
|
||||
apps=$(hyprctl -j clients | jaq -jr '.[] | select(.workspace.id == '"$ws"') | .title + "\\n"')
|
||||
echo -En "${apps%"\n"}"
|
||||
}
|
||||
|
||||
# generate the json for eww
|
||||
generate() {
|
||||
echo -n '['
|
||||
|
||||
for i in {1..4}; do
|
||||
echo -n ''"$([ "$i" -eq 1 ] || echo ,)" '{ "number": "'"$i"'", "color": "'"$(status "$i")"'" }' #, "tooltip": "'$(applist "$i")'" }'
|
||||
done
|
||||
|
||||
echo ']'
|
||||
}
|
||||
|
||||
# setup
|
||||
|
||||
# add monitors
|
||||
monitor_event
|
||||
|
||||
# add workspaces
|
||||
while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')
|
||||
|
||||
# check occupied workspaces
|
||||
for num in "${!workspaces[@]}"; do
|
||||
o[$num]=1
|
||||
done
|
||||
# generate initial widget
|
||||
generate
|
||||
|
||||
# main loop
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "workspace|mon(itor)?" | while read -r line; do
|
||||
case ${line%>>*} in
|
||||
"workspace")
|
||||
focusedws=${line#*>>}
|
||||
;;
|
||||
"focusedmon")
|
||||
focusedws=${line#*,}
|
||||
;;
|
||||
"createworkspace")
|
||||
workspace_event "${line#*>>}" 1
|
||||
;;
|
||||
"destroyworkspace")
|
||||
workspace_event "${line#*>>}" 0
|
||||
;;
|
||||
"monitor"*)
|
||||
monitor_event
|
||||
;;
|
||||
esac
|
||||
generate
|
||||
done
|
14
flake/home/programs/eww/windows/calendar.yuck
Normal file
14
flake/home/programs/eww/windows/calendar.yuck
Normal file
|
@ -0,0 +1,14 @@
|
|||
(defwidget calendar-win []
|
||||
(box
|
||||
:class "calendar-win"
|
||||
(calendar)))
|
||||
|
||||
(defwindow calendar
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
:anchor "top right"
|
||||
:width "0px"
|
||||
:height "0px")
|
||||
(calendar-win))
|
55
flake/home/programs/eww/windows/music.yuck
Normal file
55
flake/home/programs/eww/windows/music.yuck
Normal file
|
@ -0,0 +1,55 @@
|
|||
(defwidget music []
|
||||
(box
|
||||
:class "music-window"
|
||||
:space-evenly false
|
||||
:style "background-color: ${music.color1}; border: 1px solid ${music.color2};"
|
||||
(box
|
||||
:class "music-cover-art"
|
||||
:style "background-image: url(\"${music.cover}\");")
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "music-box"
|
||||
(label
|
||||
:class "music-title"
|
||||
:wrap true
|
||||
:text {music.title})
|
||||
(label
|
||||
:class "music-artist"
|
||||
:wrap true
|
||||
:text {music.artist})
|
||||
(centerbox
|
||||
:halign "center"
|
||||
:class "music-button-box icon"
|
||||
(button :class "music-button" :onclick "playerctl previous" "")
|
||||
(button :class "music-button" :onclick "playerctl play-pause" {music.status})
|
||||
(button :class "music-button" :onclick "playerctl next" ""))
|
||||
(box
|
||||
:orientation "v"
|
||||
(box
|
||||
(label
|
||||
:xalign 0
|
||||
:class "music-time"
|
||||
:text {music.position_time})
|
||||
(label
|
||||
:xalign 1
|
||||
:class "music-time"
|
||||
:text {music.length}))
|
||||
(box
|
||||
:class "music-bar"
|
||||
(scale
|
||||
; doesn't work, looking for other ways
|
||||
; :style "background: linear-gradient(to right, ${music.color1}, ${music.color2});"
|
||||
:onchange "playerctl position `bc <<< \"{} * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
|
||||
:value {music.position}))))))
|
||||
|
||||
(defwindow music
|
||||
:stacking "fg"
|
||||
:focusable false
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
:width "0%"
|
||||
:height "0%"
|
||||
:anchor "top center")
|
||||
(music))
|
43
flake/home/programs/eww/windows/osd.yuck
Normal file
43
flake/home/programs/eww/windows/osd.yuck
Normal file
|
@ -0,0 +1,43 @@
|
|||
(defwidget osd-part [icon value class]
|
||||
(box
|
||||
:class "osd-part osd-${class}"
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
(scale
|
||||
:flipped true
|
||||
:orientation "v"
|
||||
:value value)
|
||||
(label
|
||||
:text icon)))
|
||||
|
||||
(defwidget osd []
|
||||
(box
|
||||
:class "osd-container"
|
||||
:space-evenly false
|
||||
(revealer
|
||||
:reveal {osd-brightness}
|
||||
:transition "slideright"
|
||||
(osd-part
|
||||
:class "brightness"
|
||||
:icon {brightness.icon}
|
||||
:value {brightness.percent}))
|
||||
(revealer
|
||||
:reveal {osd-volume}
|
||||
:transition "slideright"
|
||||
(osd-part
|
||||
:class "volume"
|
||||
:icon {volume.icon}
|
||||
:value {volume.percent})))
|
||||
)
|
||||
|
||||
(defwindow osd
|
||||
:stacking "fg"
|
||||
:focusable false
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "1%"
|
||||
:y "0%"
|
||||
:width "0%"
|
||||
:height "0%"
|
||||
:anchor "center left")
|
||||
(osd))
|
204
flake/home/programs/eww/windows/system-menu.yuck
Normal file
204
flake/home/programs/eww/windows/system-menu.yuck
Normal file
|
@ -0,0 +1,204 @@
|
|||
(defwidget system-menu []
|
||||
(box
|
||||
:class "system-menu-box"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "top-row"
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "time"
|
||||
:text "${time.hour}:${time.minute}")
|
||||
(box
|
||||
:class "date-box"
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "date"
|
||||
:text {time.date})
|
||||
(label
|
||||
:class "day"
|
||||
:text {time.day})))
|
||||
|
||||
(centerbox
|
||||
:class "system-row"
|
||||
(box
|
||||
:class "wifi-box"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "element icon ${net.class}"
|
||||
:space-evenly false
|
||||
(button
|
||||
:class "wifi-button"
|
||||
:onclick "scripts/net toggle"
|
||||
{net.icon})
|
||||
(label
|
||||
:class "separator"
|
||||
:text "│")
|
||||
(button
|
||||
:class "wifi-arrow-btn"
|
||||
:onclick "eww close system-menu && gnome-control-center &"
|
||||
""))
|
||||
(label
|
||||
:text {net.essid}
|
||||
:xalign 0.5
|
||||
:limit-width 15))
|
||||
|
||||
(box
|
||||
:class "bluetooth-box"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "element icon ${bluetooth.class}"
|
||||
:space-evenly false
|
||||
(button
|
||||
:class "bluetooth-button"
|
||||
:onclick "scripts/bluetooth toggle"
|
||||
{bluetooth.icon})
|
||||
(label
|
||||
:class "separator"
|
||||
:text "│")
|
||||
(button
|
||||
:class "bluetooth-arrow-btn"
|
||||
:onclick "eww close system-menu && blueberry"
|
||||
""))
|
||||
(label
|
||||
:text {bluetooth.text}
|
||||
:xalign 0.5
|
||||
:tooltip "${bluetooth.text} ${bluetooth.battery}"
|
||||
:limit-width 15))
|
||||
|
||||
(box
|
||||
:class "airplane-box"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "element"
|
||||
(button
|
||||
:class "airplane-button"
|
||||
:onclick "scripts/airplane toggle"
|
||||
airplane))
|
||||
(label
|
||||
:text "Airplane Mode"
|
||||
:xalign 0.5
|
||||
:limit-width 16)))
|
||||
|
||||
(box
|
||||
:class "sliders"
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "volume-slider-box"
|
||||
:space-evenly false
|
||||
(button
|
||||
:class "volume-icon icon"
|
||||
:onclick "scripts/volume mute SINK"
|
||||
{volume.icon})
|
||||
(scale
|
||||
:class "volume-bar"
|
||||
:value {volume.percent}
|
||||
:tooltip "volume on ${volume.percent}%"
|
||||
:onchange "scripts/volume setvol SINK {}"))
|
||||
(box
|
||||
:class "brightness-slider-box"
|
||||
:space-evenly false
|
||||
(button
|
||||
:class "brightness-slider-icon icon"
|
||||
{brightness.icon})
|
||||
(scale
|
||||
:class "brightness-slider"
|
||||
:value {brightness.percent}
|
||||
:marks true
|
||||
:onchange "light -S {}")))
|
||||
|
||||
(box
|
||||
:class "system-info-box"
|
||||
|
||||
; cpu
|
||||
(box
|
||||
:class "sys-box"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
(circular-progress
|
||||
:value "${EWW_CPU.avg}"
|
||||
:class "sys-cpu"
|
||||
:thickness 3
|
||||
(label
|
||||
:text ""
|
||||
:class "sys-icon-cpu icon"))
|
||||
(box
|
||||
:orientation "v"
|
||||
:vexpand false
|
||||
(label
|
||||
:text "cpu"
|
||||
:halign "start"
|
||||
:class "sys-text-cpu")
|
||||
(label
|
||||
:text "${round(EWW_CPU.avg,2)}%"
|
||||
:halign "start"
|
||||
:class "sys-text-sub")
|
||||
(label
|
||||
:text "${EWW_CPU.cores[0].freq} MHz"
|
||||
:halign "start"
|
||||
:class "sys-text-sub")))
|
||||
|
||||
; memory
|
||||
(box
|
||||
:class "sys-box"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
(circular-progress
|
||||
:value {memory.percent}
|
||||
:class "sys-mem"
|
||||
:thickness 3
|
||||
(label
|
||||
:text ""
|
||||
:class "sys-icon-mem icon"))
|
||||
(box
|
||||
:orientation "v"
|
||||
(label
|
||||
:text "memory"
|
||||
:halign "start"
|
||||
:class "sys-text-mem")
|
||||
(label
|
||||
:text "${memory.used} | ${memory.total}"
|
||||
:halign "start"
|
||||
:class "sys-text-sub"))))
|
||||
|
||||
(centerbox
|
||||
:class "bottom-row"
|
||||
(box
|
||||
:class "battery-box"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
(label
|
||||
:class "battery-icon icon"
|
||||
:style "color: ${battery.color}"
|
||||
:text {battery.icon})
|
||||
(label
|
||||
:text {EWW_BATTERY["BAT0"].capacity})
|
||||
(label
|
||||
:class "battery-status"
|
||||
:text {battery.status})
|
||||
(label
|
||||
:class "battery-wattage"
|
||||
:text {battery.wattage}))
|
||||
(label)
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
(button
|
||||
:halign "end"
|
||||
:class "power-button icon"
|
||||
:onclick "wlogout -p layer-shell &"
|
||||
"")))))
|
||||
|
||||
(defwindow system-menu
|
||||
:stacking "fg"
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "0"
|
||||
:y "0"
|
||||
:width "0%"
|
||||
:height "0%"
|
||||
:anchor "right top")
|
||||
(system-menu))
|
Loading…
Add table
Add a link
Reference in a new issue