make eww more reusable, tinker with doom emacs and agda
This commit is contained in:
parent
bffcdeca73
commit
71718f1981
16 changed files with 80 additions and 60 deletions
|
@ -21,9 +21,6 @@
|
|||
# Docker
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
services.emacs.package = pkgs.emacs29-pgtk;
|
||||
services.emacs.enable = true;
|
||||
|
||||
# optimize power usage
|
||||
powerManagement.enable = true;
|
||||
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
;;
|
||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||
;; they are implemented.
|
||||
(envrc-global-mode)
|
||||
(setq +latex-viewers '(pdf-tools))
|
||||
(eval-after-load "tex"
|
||||
'(add-to-list 'TeX-command-list
|
||||
|
@ -87,7 +86,6 @@
|
|||
(pdf-tools-install)
|
||||
(evil-global-set-key 'normal (kbd "SPC t t") #'treemacs)
|
||||
;; The following is a hack to use the right agda version for my thesis...
|
||||
;; (load-file "/nix/store/38cw6va0dhln7gknwsz7ghazlcldjgdc-Agda-2.6.3-data/share/ghc-9.2.8/x86_64-linux-ghc-9.2.8/Agda-2.6.3/emacs-mode/agda2.el")
|
||||
;;(load-file (let ((coding-system-for-read 'utf-8))
|
||||
;; (shell-command-to-string "agda-mode locate")))
|
||||
(load-file "/nix/store/p2b07qnkw664ni99is80ja4hvynllhw8-Agda-2.7.0.1-data/share/ghc-9.6.6/x86_64-linux-ghc-9.6.6/Agda-2.7.0.1/emacs-mode/agda2.el")
|
||||
(add-to-list 'auto-mode-alist '("\\.lagda.md\\'" . agda2-mode))
|
||||
(envrc-global-mode)
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
;;tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
(agda +local) ; types of types of types of types...
|
||||
;;(agda +local) ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
;;(cc +lsp) ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./../common
|
||||
# ./hypr/hyprland.nix
|
||||
./../modules/hyprland
|
||||
./eww
|
||||
];
|
||||
/* The home.stateVersion option does not have a default and must be set */
|
||||
home.stateVersion = "24.11";
|
||||
|
@ -30,14 +28,6 @@
|
|||
|
||||
home.packages = with pkgs; [
|
||||
prismlauncher
|
||||
# theme for gtk applications
|
||||
orchis-theme
|
||||
(catppuccin-gtk.override {
|
||||
accents = [ "flamingo" ];
|
||||
size = "compact";
|
||||
tweaks = [ "rimless" "black" ];
|
||||
variant = "macchiato";
|
||||
})
|
||||
|
||||
# smt solver for liquid haskell
|
||||
z3
|
||||
|
@ -91,24 +81,6 @@
|
|||
anki
|
||||
pandoc
|
||||
|
||||
# hyprland
|
||||
kitty
|
||||
networkmanagerapplet
|
||||
mako
|
||||
libnotify
|
||||
pavucontrol
|
||||
hyprpaper
|
||||
qimgv
|
||||
playerctl
|
||||
hyprpicker
|
||||
wev
|
||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
|
||||
bluez
|
||||
htop
|
||||
file-roller
|
||||
zip
|
||||
unzip
|
||||
|
||||
# yubikey
|
||||
yubico-pam
|
||||
yubikey-manager
|
||||
|
@ -124,6 +96,7 @@
|
|||
# for emacs
|
||||
texlab
|
||||
shellcheck
|
||||
emacs
|
||||
];
|
||||
|
||||
xdg.configHome = /home/leonv/.config;
|
||||
|
|
|
@ -1,13 +1,23 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
with lib;
|
||||
with types;
|
||||
let
|
||||
cfg = config.modules.hyprland;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./eww
|
||||
];
|
||||
options.modules.hyprland = {
|
||||
enable = mkEnableOption "Hyprland Wrapper";
|
||||
|
||||
# eww
|
||||
oled = mkOption {
|
||||
type = bool;
|
||||
description = ''Special theming for OLED monitors.'';
|
||||
default = false;
|
||||
};
|
||||
|
||||
# monitor setup
|
||||
monitor = mkOption {
|
||||
type = listOf str;
|
||||
|
@ -33,7 +43,7 @@ in
|
|||
hyprpaper = {
|
||||
enable = mkEnableOption "Hyprpaper wrapper";
|
||||
wallpaper = mkOption {
|
||||
type = types.path;
|
||||
type = path;
|
||||
default = [];
|
||||
description = ''
|
||||
Wallpaper to be set on every monitor
|
||||
|
@ -50,6 +60,35 @@ in
|
|||
# TODO start script
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
# hyprland
|
||||
kitty
|
||||
networkmanagerapplet
|
||||
mako
|
||||
libnotify
|
||||
pavucontrol
|
||||
hyprpaper
|
||||
qimgv
|
||||
playerctl
|
||||
hyprpicker
|
||||
wev
|
||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
|
||||
bluez
|
||||
htop
|
||||
file-roller
|
||||
zip
|
||||
unzip
|
||||
# theme for gtk applications
|
||||
orchis-theme
|
||||
(catppuccin-gtk.override {
|
||||
accents = [ "flamingo" ];
|
||||
size = "compact";
|
||||
tweaks = [ "rimless" "black" ];
|
||||
variant = "macchiato";
|
||||
})
|
||||
];
|
||||
|
||||
|
||||
services.hyprpaper = mkIf cfg.hyprpaper.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -162,7 +201,7 @@ in
|
|||
"$mod, C, togglespecialworkspace, scratchpad"
|
||||
|
||||
# status bar
|
||||
"$mod, T, exec, eww open --toggle top-bar"
|
||||
"$mod, T, exec, eww open --toggle top-bar --arg oled=${if cfg.oled then "true" else "false"}"
|
||||
];
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
|
@ -175,6 +214,7 @@ in
|
|||
exec-once = [
|
||||
"bash ~/Git/nixos/modules/hyprland/start.sh"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
"${if cfg.oled then "" else "eww open --toggle top-bar --arg oled=false"}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
53
gunther/eww/config/eww.yuck → modules/hyprland/eww/config/eww.yuck
Executable file → Normal file
53
gunther/eww/config/eww.yuck → modules/hyprland/eww/config/eww.yuck
Executable file → Normal file
|
@ -1,25 +1,7 @@
|
|||
; inspired by https://github.com/saimoomedits/eww-widgets/tree/main
|
||||
|
||||
(include "./widgets/workspaces/eww.yuck")
|
||||
(include "./widgets/window-title/eww.yuck")
|
||||
(include "./widgets/resources/eww.yuck")
|
||||
|
||||
(defwindow top-bar
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0%"
|
||||
:y "10px"
|
||||
:width "98.8%"
|
||||
:height "30px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
(centerbox
|
||||
:class "bar"
|
||||
(left)
|
||||
(center)
|
||||
(right)
|
||||
)
|
||||
)
|
||||
(include "widgets/workspaces/eww.yuck")
|
||||
(include "widgets/window-title/eww.yuck")
|
||||
(include "widgets/resources/eww.yuck")
|
||||
|
||||
(defwidget left []
|
||||
(box
|
||||
|
@ -52,3 +34,32 @@
|
|||
(bluetooth)
|
||||
(datetime)
|
||||
))
|
||||
|
||||
(defwidget top-bar-oled []
|
||||
(centerbox
|
||||
:class "oled"
|
||||
(left)
|
||||
(right)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget top-bar-non-oled []
|
||||
(centerbox
|
||||
:class "non-oled"
|
||||
(left)
|
||||
(center)
|
||||
(right)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow top-bar [oled]
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0%"
|
||||
:y "10px"
|
||||
:width "98.8%"
|
||||
:height "30px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
(literal :content {oled ? "(top-bar-oled)" : "(top-bar-non-oled)"})
|
||||
)
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# TODO choose oled or non-oled depending on some set variable
|
||||
programs.eww = {
|
||||
enable = true;
|
||||
configDir = ./config;
|
Loading…
Reference in a new issue