add hyprland and eww config
This commit is contained in:
parent
30abda4469
commit
0b6fb9ddca
9 changed files with 341 additions and 7 deletions
61
user/eww/eww.scss
Normal file
61
user/eww/eww.scss
Normal file
|
@ -0,0 +1,61 @@
|
|||
|
||||
* {
|
||||
all: unset; //Unsets everything so you can style everything from scratch
|
||||
}
|
||||
|
||||
//Global Styles
|
||||
.bar {
|
||||
background-color: #202020;
|
||||
color: #b0b4bc;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
// Styles on classes (see eww.yuck for more information)
|
||||
|
||||
.sidestuff slider {
|
||||
all: unset;
|
||||
color: #cc5757;
|
||||
}
|
||||
|
||||
.metric scale trough highlight {
|
||||
all: unset;
|
||||
background-color: #D35D6E;
|
||||
color: #000000;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.metric scale trough {
|
||||
all: unset;
|
||||
background-color: #4e4e4e;
|
||||
border-radius: 50px;
|
||||
min-height: 3px;
|
||||
min-width: 50px;
|
||||
margin-left: 10px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.metric scale trough highlight {
|
||||
all: unset;
|
||||
background-color: #D35D6E;
|
||||
color: #000000;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.metric scale trough {
|
||||
all: unset;
|
||||
background-color: #4e4e4e;
|
||||
border-radius: 50px;
|
||||
min-height: 3px;
|
||||
min-width: 50px;
|
||||
margin-left: 10px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.label-ram {
|
||||
font-size: large;
|
||||
}
|
||||
.workspaces button:hover {
|
||||
color: #D35D6E;
|
||||
}
|
||||
|
||||
.workspaces button.active {
|
||||
color: #D35D6E;
|
||||
}
|
||||
|
||||
|
80
user/eww/eww.yuck
Normal file
80
user/eww/eww.yuck
Normal file
|
@ -0,0 +1,80 @@
|
|||
(defwidget bar []
|
||||
(centerbox :orientation "h"
|
||||
(workspaces)
|
||||
(music)
|
||||
(sidestuff)))
|
||||
|
||||
(defwidget sidestuff []
|
||||
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
||||
; (metric :label "🔊"
|
||||
; :value volume
|
||||
; :onchange "amixer -D pulse sset Master {}%")
|
||||
(metric :label ""
|
||||
:value {EWW_RAM.used_mem_perc}
|
||||
:onchange "")
|
||||
(metric :label "💾"
|
||||
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
|
||||
:onchange "")
|
||||
time))
|
||||
|
||||
(defwidget workspaces []
|
||||
(box :class "workspaces"
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
:halign "start"
|
||||
:spacing 10
|
||||
(button :class "${active_workspace == 1 ? 'active' : '' }" :onclick "wmctrl -s 0" 1)
|
||||
(button :class "${active_workspace == 2 ? 'active' : '' }" :onclick "wmctrl -s 1" 2)
|
||||
(button :class "${active_workspace == 3 ? 'active' : '' }" :onclick "wmctrl -s 2" 3)
|
||||
(button :class "${active_workspace == 4 ? 'active' : '' }" :onclick "wmctrl -s 3" 4)
|
||||
(button :class "${active_workspace == 5 ? 'active' : '' }" :onclick "wmctrl -s 4" 5)
|
||||
(button :class "${active_workspace == 6 ? 'active' : '' }" :onclick "wmctrl -s 5" 6)
|
||||
(button :class "${active_workspace == 7 ? 'active' : '' }" :onclick "wmctrl -s 6" 7)
|
||||
(button :class "${active_workspace == 8 ? 'active' : '' }" :onclick "wmctrl -s 7" 8)
|
||||
(button :class "${active_workspace == 9 ? 'active' : '' }" :onclick "wmctrl -s 8" 9)))
|
||||
|
||||
(defwidget music []
|
||||
(box :class "music"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
{music != "" ? "🎵${music}" : ""}))
|
||||
|
||||
|
||||
(defwidget metric [label value onchange]
|
||||
(box :orientation "h"
|
||||
:class "metric"
|
||||
:space-evenly false
|
||||
(box :class "label" label)
|
||||
(scale :min 0
|
||||
:max 101
|
||||
:active {onchange != ""}
|
||||
:value value
|
||||
:onchange onchange)))
|
||||
|
||||
|
||||
|
||||
(deflisten music :initial ""
|
||||
"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")
|
||||
|
||||
; (defpoll volume :interval "1s"
|
||||
; "scripts/getvol")
|
||||
|
||||
(defpoll time :interval "10s"
|
||||
"date '+%H:%M %b %d, %Y'")
|
||||
|
||||
(defpoll active_workspace :interval "10ms"
|
||||
"hyprctl monitors -j | jq '.[]|.activeWorkspace.id'")
|
||||
|
||||
(defwindow bar
|
||||
:monitor 0
|
||||
:windowtype "dock"
|
||||
:geometry (geometry :x "0%"
|
||||
:y "0%"
|
||||
:width "100%"
|
||||
:height "10px"
|
||||
:anchor "top center")
|
||||
:reserve (struts :side "top" :distance "4%")
|
||||
:exclusive true
|
||||
(bar))
|
||||
|
2
user/eww/scripts/getram
Executable file
2
user/eww/scripts/getram
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')
|
2
user/eww/scripts/getvol
Executable file
2
user/eww/scripts/getvol
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, inputs,... }:
|
||||
let
|
||||
inherit (import ./variables.nix) key theme color accent font;
|
||||
|
||||
|
@ -15,11 +15,13 @@ in {
|
|||
./helix.nix
|
||||
./kakoune.nix
|
||||
./sway.nix
|
||||
./hyprland.nix
|
||||
./git.nix
|
||||
./qutebrowser
|
||||
./gpg.nix
|
||||
./rofi.nix
|
||||
./rnnoise.nix
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
];
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
|
@ -39,6 +41,7 @@ in {
|
|||
home.packages = with pkgs; [
|
||||
alacritty
|
||||
terminal # see flake.nix
|
||||
waybar
|
||||
exa
|
||||
fd
|
||||
_diffr
|
||||
|
|
130
user/hyprland.nix
Normal file
130
user/hyprland.nix
Normal file
|
@ -0,0 +1,130 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
config = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = false;
|
||||
extraConfig = ''
|
||||
monitor=,preferred,auto,1
|
||||
|
||||
input {
|
||||
kb_file=
|
||||
kb_layout=us(colemak)
|
||||
kb_variant=
|
||||
kb_model=
|
||||
kb_options=
|
||||
kb_rules=
|
||||
|
||||
follow_mouse=1
|
||||
|
||||
touchpad {
|
||||
natural_scroll=no
|
||||
}
|
||||
}
|
||||
|
||||
general {
|
||||
sensitivity=1.0 # for mouse cursor
|
||||
main_mod=SUPER
|
||||
|
||||
gaps_in=5
|
||||
gaps_out=10
|
||||
border_size=2
|
||||
col.active_border=0xffF44336
|
||||
col.inactive_border=0x66333333
|
||||
|
||||
apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
|
||||
|
||||
damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer
|
||||
}
|
||||
|
||||
decoration {
|
||||
rounding=5
|
||||
blur=1
|
||||
blur_size=3 # minimum 1
|
||||
blur_passes=1 # minimum 1, more passes = more resource intensive.
|
||||
# Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts.
|
||||
# if you want heavy blur, you need to up the blur_passes.
|
||||
# the more passes, the more you can up the blur_size without noticing artifacts.
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled=1
|
||||
animation=windows,1,7,default
|
||||
animation=border,1,10,default
|
||||
animation=fade,1,10,default
|
||||
animation=workspaces,1,6,default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
pseudotile=0 # enable pseudotiling on dwindle
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe=no
|
||||
}
|
||||
|
||||
# example window rules
|
||||
# for windows named/classed as abc and xyz
|
||||
#windowrule=move 69 420,abc
|
||||
#windowrule=size 420 69,abc
|
||||
#windowrule=tile,xyz
|
||||
#windowrule=float,abc
|
||||
#windowrule=pseudo,abc
|
||||
#windowrule=monitor 0,xyz
|
||||
|
||||
# example binds
|
||||
bind=SUPER,Q,exec,kitty
|
||||
bind=SUPER,RETURN,exec,alacritty
|
||||
bind=SUPER,x,killactive,
|
||||
bind=SUPER,M,exit,
|
||||
# bind=SUPER,E,exec,dolphin
|
||||
bind=SUPER,V,togglefloating,
|
||||
bind=SUPER,s,exec,wlauncher
|
||||
bind=SUPER,P,pseudo,
|
||||
|
||||
bind=SUPER,f,fullscreen
|
||||
|
||||
bind=SUPER,n,movefocus,l
|
||||
bind=SUPER,o,movefocus,r
|
||||
bind=SUPER,i,movefocus,u
|
||||
bind=SUPER,e,movefocus,d
|
||||
|
||||
bind=SUPER,left,movefocus,l
|
||||
bind=SUPER,right,movefocus,r
|
||||
bind=SUPER,up,movefocus,u
|
||||
bind=SUPER,down,movefocus,d
|
||||
|
||||
bind=SUPER,1,workspace,1
|
||||
bind=SUPER,2,workspace,2
|
||||
bind=SUPER,3,workspace,3
|
||||
bind=SUPER,4,workspace,4
|
||||
bind=SUPER,5,workspace,5
|
||||
bind=SUPER,6,workspace,6
|
||||
bind=SUPER,7,workspace,7
|
||||
bind=SUPER,8,workspace,8
|
||||
bind=SUPER,9,workspace,9
|
||||
bind=SUPER,0,workspace,10
|
||||
|
||||
bind=ALT,1,movetoworkspace,1
|
||||
bind=ALT,2,movetoworkspace,2
|
||||
bind=ALT,3,movetoworkspace,3
|
||||
bind=ALT,4,movetoworkspace,4
|
||||
bind=ALT,5,movetoworkspace,5
|
||||
bind=ALT,6,movetoworkspace,6
|
||||
bind=ALT,7,movetoworkspace,7
|
||||
bind=ALT,8,movetoworkspace,8
|
||||
bind=ALT,9,movetoworkspace,9
|
||||
bind=ALT,0,movetoworkspace,10
|
||||
|
||||
bind=SUPER,u,workspace,e-1
|
||||
bind=SUPER,y,workspace,e+1
|
||||
|
||||
bind=SUPER,mouse_down,workspace,e-1
|
||||
bind=SUPER,mouse_up,workspace,e+1
|
||||
'';
|
||||
};
|
||||
home.file.".config/eww".source = ./eww;
|
||||
home.packages = with pkgs; [
|
||||
eww-wayland
|
||||
jq
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue