From f485531e09dc91f75dbf7f548b83ad88614ff874 Mon Sep 17 00:00:00 2001 From: Varris Date: Sat, 30 Dec 2023 00:19:10 +0100 Subject: [PATCH] update --- flake.nix | 3 + overlay.nix | 10 +- pkgs/gruvbox-gtk-theme/silence-warnings.patch | 99 +++++ system/configuration.nix | 8 +- system/services/default.nix | 1 + user/configs/fish/default.nix | 4 +- user/configs/kitty/default.nix | 2 + user/configs/lf/default.nix | 37 ++ user/configs/lf/icons | 357 ++++++++++++++++++ .../neovim/config/lua/plugins/lspconfig.lua | 2 +- user/configs/neovim/config/lua/settings.lua | 2 +- user/configs/wayland/ags/ags-config/config.js | 1 - user/configs/wayland/hyprland/default.nix | 2 +- .../wayland/hyprland/eww/config/eww-bar.png | Bin 0 -> 6286 bytes .../wayland/hyprland/eww/config/eww.scss | 81 ++++ .../wayland/hyprland/eww/config/eww.yuck | 157 ++++++++ .../hyprland/eww/config/scripts/get_volume.sh | 16 + .../eww/config/scripts/mpd_current_song.sh | 19 + .../hyprland/eww/config/scripts/workspaces.sh | 47 +++ user/configs/wayland/hyprland/eww/default.nix | 11 + user/configs/wayland/hyprland/settings.nix | 29 +- user/home.nix | 6 +- 22 files changed, 861 insertions(+), 33 deletions(-) create mode 100644 pkgs/gruvbox-gtk-theme/silence-warnings.patch create mode 100755 user/configs/lf/default.nix create mode 100644 user/configs/lf/icons create mode 100644 user/configs/wayland/hyprland/eww/config/eww-bar.png create mode 100644 user/configs/wayland/hyprland/eww/config/eww.scss create mode 100644 user/configs/wayland/hyprland/eww/config/eww.yuck create mode 100755 user/configs/wayland/hyprland/eww/config/scripts/get_volume.sh create mode 100755 user/configs/wayland/hyprland/eww/config/scripts/mpd_current_song.sh create mode 100755 user/configs/wayland/hyprland/eww/config/scripts/workspaces.sh create mode 100644 user/configs/wayland/hyprland/eww/default.nix diff --git a/flake.nix b/flake.nix index e355b19..29f96ee 100755 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,9 @@ ags.url = "github:Aylur/ags"; + eww-systray.url = "github:ralismark/eww/tray-3"; + eww-systray.inputs.nixpkgs.follows = "nixpkgs"; + gruvbox-kvantum.url = "github:thefallnn/Gruvbox-Kvantum"; gruvbox-kvantum.flake = false; diff --git a/overlay.nix b/overlay.nix index 0c4d127..623c8bc 100755 --- a/overlay.nix +++ b/overlay.nix @@ -10,6 +10,10 @@ fonts = ["JetBrainsMono"]; }; + gruvbox-gtk-theme = prev.gruvbox-gtk-theme.overrideAttrs { + patches = [./pkgs/gruvbox-gtk-theme/silence-warnings.patch]; + }; + mygui-openmw = prev.mygui.overrideAttrs (old: { version = "3.4.3"; src = inputs.mygui-git; @@ -40,11 +44,5 @@ prev.mpg123 ]; }; - - nvim-hmts = prev.vimUtils.buildVimPlugin { - pname = "nvim-hmts"; - version = "1"; - src = inputs.nvim-hmts; - }; }; } diff --git a/pkgs/gruvbox-gtk-theme/silence-warnings.patch b/pkgs/gruvbox-gtk-theme/silence-warnings.patch new file mode 100644 index 0000000..657be5d --- /dev/null +++ b/pkgs/gruvbox-gtk-theme/silence-warnings.patch @@ -0,0 +1,99 @@ +From 562a48ed02a252dbbbaad582baf8bd22658e62e2 Mon Sep 17 00:00:00 2001 +From: Daniele Massaro +Date: Fri, 22 Dec 2023 12:50:56 +0100 +Subject: [PATCH] Fix #43 putting :run argument on same line for gtk-3 + +The warning comes from :run pseudo-class having its argument placed in +a newline. +--- + themes/Gruvbox-Dark-B-LB/gtk-3.0/gtk.css | 8 ++------ + themes/Gruvbox-Dark-B/gtk-3.0/gtk.css | 8 ++------ + themes/Gruvbox-Dark-BL-LB/gtk-3.0/gtk.css | 8 ++------ + themes/Gruvbox-Dark-BL/gtk-3.0/gtk.css | 8 ++------ + 4 files changed, 8 insertions(+), 24 deletions(-) + +diff --git a/themes/Gruvbox-Dark-B-LB/gtk-3.0/gtk.css b/themes/Gruvbox-Dark-B-LB/gtk-3.0/gtk.css +index d8cb8872..09fcd78a 100644 +--- a/themes/Gruvbox-Dark-B-LB/gtk-3.0/gtk.css ++++ b/themes/Gruvbox-Dark-B-LB/gtk-3.0/gtk.css +@@ -6625,14 +6625,10 @@ popover.emoji-completion .emoji:hover { + + .path-bar-box + .linked.nautilus-path-bar +- button:not(.suggested-action):not(.destructive-action):last-child:dir( +- ltr +- ):disabled, ++ button:not(.suggested-action):not(.destructive-action):last-child:dir(ltr):disabled, + .path-bar-box + .linked.nautilus-path-bar +- button:not(.suggested-action):not(.destructive-action):first-child:dir( +- rtl +- ):disabled { ++ button:not(.suggested-action):not(.destructive-action):first-child:dir(rtl):disabled { + color: #89b482; + background-color: #282828; + } +diff --git a/themes/Gruvbox-Dark-B/gtk-3.0/gtk.css b/themes/Gruvbox-Dark-B/gtk-3.0/gtk.css +index e8a9d787..11cd058f 100644 +--- a/themes/Gruvbox-Dark-B/gtk-3.0/gtk.css ++++ b/themes/Gruvbox-Dark-B/gtk-3.0/gtk.css +@@ -6700,14 +6700,10 @@ popover.emoji-completion .emoji:hover { + + .path-bar-box + .linked.nautilus-path-bar +- button:not(.suggested-action):not(.destructive-action):last-child:dir( +- ltr +- ):disabled, ++ button:not(.suggested-action):not(.destructive-action):last-child:dir(ltr):disabled, + .path-bar-box + .linked.nautilus-path-bar +- button:not(.suggested-action):not(.destructive-action):first-child:dir( +- rtl +- ):disabled { ++ button:not(.suggested-action):not(.destructive-action):first-child:dir(rtl):disabled { + color: #89b482; + background-color: #282828; + } +diff --git a/themes/Gruvbox-Dark-BL-LB/gtk-3.0/gtk.css b/themes/Gruvbox-Dark-BL-LB/gtk-3.0/gtk.css +index 28d74941..18601e37 100644 +--- a/themes/Gruvbox-Dark-BL-LB/gtk-3.0/gtk.css ++++ b/themes/Gruvbox-Dark-BL-LB/gtk-3.0/gtk.css +@@ -6613,14 +6613,10 @@ popover.emoji-completion .emoji:hover { + + .path-bar-box + .linked.nautilus-path-bar +- button:not(.suggested-action):not(.destructive-action):last-child:dir( +- ltr +- ):disabled, ++ button:not(.suggested-action):not(.destructive-action):last-child:dir(ltr):disabled, + .path-bar-box + .linked.nautilus-path-bar +- button:not(.suggested-action):not(.destructive-action):first-child:dir( +- rtl +- ):disabled { ++ button:not(.suggested-action):not(.destructive-action):first-child:dir(rtl):disabled { + color: #89b482; + background-color: #282828; + } +diff --git a/themes/Gruvbox-Dark-BL/gtk-3.0/gtk.css b/themes/Gruvbox-Dark-BL/gtk-3.0/gtk.css +index f7251514..ebc91ea9 100644 +--- a/themes/Gruvbox-Dark-BL/gtk-3.0/gtk.css ++++ b/themes/Gruvbox-Dark-BL/gtk-3.0/gtk.css +@@ -6688,14 +6688,10 @@ popover.emoji-completion .emoji:hover { + + .path-bar-box + .linked.nautilus-path-bar +- button:not(.suggested-action):not(.destructive-action):last-child:dir( +- ltr +- ):disabled, ++ button:not(.suggested-action):not(.destructive-action):last-child:dir(ltr):disabled, + .path-bar-box + .linked.nautilus-path-bar +- button:not(.suggested-action):not(.destructive-action):first-child:dir( +- rtl +- ):disabled { ++ button:not(.suggested-action):not(.destructive-action):first-child:dir(rtl):disabled { + color: #89b482; + background-color: #282828; + } + diff --git a/system/configuration.nix b/system/configuration.nix index 77d8208..29abf75 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -23,8 +23,6 @@ "amdgpu.ppfeaturemask=0xffffffff" "amd_pstate.shared_mem=1" "amd_pstate=active" - # "video=DP-1:2560x1440@144" - # "video=DP-2:2560x1440@144" ]; loader = { @@ -92,11 +90,6 @@ } ]; }; - - pam.services.kwallet = { - name = "kwallet"; - enableKwallet = true; - }; }; users.users.manuel = { @@ -126,6 +119,7 @@ p7zip pciutils sassc + socat ripgrep unrar unzip diff --git a/system/services/default.nix b/system/services/default.nix index 16dd6ea..7297479 100644 --- a/system/services/default.nix +++ b/system/services/default.nix @@ -12,6 +12,7 @@ avahi.enable = true; blueman.enable = true; flatpak.enable = true; + gnome.gnome-keyring.enable = true; gvfs.enable = true; openssh.enable = true; udisks2.enable = true; diff --git a/user/configs/fish/default.nix b/user/configs/fish/default.nix index a53504c..cf25947 100755 --- a/user/configs/fish/default.nix +++ b/user/configs/fish/default.nix @@ -54,11 +54,11 @@ ''; }; shellAliases = { - nf = "${pkgs.neofetch}/bin/neofetch"; + nf = "${pkgs.fastfetch}/bin/fastfetch"; e = "nvim"; ls = "${pkgs.eza}/bin/eza --icons"; ll = "${pkgs.eza}/bin/eza --icons -l"; - r = "${pkgs.ranger}/bin/ranger"; + r = "${pkgs.lf}/bin/lf"; }; }; } diff --git a/user/configs/kitty/default.nix b/user/configs/kitty/default.nix index 2789958..c58ce18 100755 --- a/user/configs/kitty/default.nix +++ b/user/configs/kitty/default.nix @@ -15,6 +15,8 @@ theme = "Gruvbox Dark"; settings = { + focus_follows_mouse = true; + confirm_os_window_close = "2"; background_opacity = "0.9"; modify_font = "cell_height 2px"; shell_integration = "no-cursor"; diff --git a/user/configs/lf/default.nix b/user/configs/lf/default.nix new file mode 100755 index 0000000..8810030 --- /dev/null +++ b/user/configs/lf/default.nix @@ -0,0 +1,37 @@ +{pkgs, ...}: let + previewer = pkgs.writeShellScriptBin "pv.sh" '' + file=$1 + w=$2 + h=$3 + x=$4 + y=$5 + + if [[ "$( ${pkgs.file}/bin/file -Lb --mime-type "$file")" =~ ^image ]]; then + ${pkgs.kitty}/bin/kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty + exit 1 + fi + + ${pkgs.pistol}/bin/pistol "$file" + ''; + + cleaner = pkgs.writeShellScriptBin "clean.sh" '' + ${pkgs.kitty}/bin/kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty + ''; +in { + xdg.configFile."lf/icons".source = ./icons; + + programs.lf = { + enable = true; + + settings = { + drawbox = true; + icons = true; + ignorecase = true; + preview = true; + + #image previewer + cleaner = "${cleaner}/bin/clean.sh"; + previewer = "${previewer}/bin/pv.sh"; + }; + }; +} diff --git a/user/configs/lf/icons b/user/configs/lf/icons new file mode 100644 index 0000000..404f9e5 --- /dev/null +++ b/user/configs/lf/icons @@ -0,0 +1,357 @@ +# vim:ft=conf + +# These examples require Nerd Fonts or a compatible font to be used. +# See https://www.nerdfonts.com for more information. + +# default values from lf (with matching order) +# ln l # LINK +# or l # ORPHAN +# tw t # STICKY_OTHER_WRITABLE +# ow d # OTHER_WRITABLE +# st t # STICKY +# di d # DIR +# pi p # FIFO +# so s # SOCK +# bd b # BLK +# cd c # CHR +# su u # SETUID +# sg g # SETGID +# ex x # EXEC +# fi - # FILE + +# file types (with matching order) +ln  # LINK +or  # ORPHAN +tw t # STICKY_OTHER_WRITABLE +ow  # OTHER_WRITABLE +st t # STICKY +di  # DIR +pi p # FIFO +so s # SOCK +bd b # BLK +cd c # CHR +su u # SETUID +sg g # SETGID +ex  # EXEC +fi  # FILE + +# file extensions (vim-devicons) +*.styl  +*.sass  +*.scss  +*.htm  +*.html  +*.slim  +*.haml  +*.ejs  +*.css  +*.less  +*.md  +*.mdx  +*.markdown  +*.rmd  +*.json  +*.webmanifest  +*.js  +*.mjs  +*.jsx  +*.rb  +*.gemspec  +*.rake  +*.php  +*.py  +*.pyc  +*.pyo  +*.pyd  +*.coffee  +*.mustache  +*.hbs  +*.conf  +*.ini  +*.yml  +*.yaml  +*.toml  +*.bat  +*.mk  +*.jpg  +*.jpeg  +*.bmp  +*.png  +*.webp  +*.gif  +*.ico  +*.twig  +*.cpp  +*.c++  +*.cxx  +*.cc  +*.cp  +*.c  +*.cs 󰌛 +*.h  +*.hh  +*.hpp  +*.hxx  +*.hs  +*.lhs  +*.nix  +*.lua  +*.java  +*.sh  +*.fish  +*.bash  +*.zsh  +*.ksh  +*.csh  +*.awk  +*.ps1  +*.ml λ +*.mli λ +*.diff  +*.db  +*.sql  +*.dump  +*.clj  +*.cljc  +*.cljs  +*.edn  +*.scala  +*.go  +*.dart  +*.xul  +*.sln  +*.suo  +*.pl  +*.pm  +*.t  +*.rss  +'*.f#'  +*.fsscript  +*.fsx  +*.fs  +*.fsi  +*.rs  +*.rlib  +*.d  +*.erl  +*.hrl  +*.ex  +*.exs  +*.eex  +*.leex  +*.heex  +*.vim  +*.ai  +*.psd  +*.psb  +*.ts  +*.tsx  +*.jl  +*.pp  +*.vue  +*.elm  +*.swift  +*.xcplayground  +*.tex 󰙩 +*.r 󰟔 +*.rproj 󰗆 +*.sol 󰡪 +*.pem  + +# file names (vim-devicons) (case-insensitive not supported in lf) +*gruntfile.coffee  +*gruntfile.js  +*gruntfile.ls  +*gulpfile.coffee  +*gulpfile.js  +*gulpfile.ls  +*mix.lock  +*dropbox  +*.ds_store  +*.gitconfig  +*.gitignore  +*.gitattributes  +*.gitlab-ci.yml  +*.bashrc  +*.zshrc  +*.zshenv  +*.zprofile  +*.vimrc  +*.gvimrc  +*_vimrc  +*_gvimrc  +*.bashprofile  +*favicon.ico  +*license  +*node_modules  +*react.jsx  +*procfile  +*dockerfile  +*docker-compose.yml  +*rakefile  +*config.ru  +*gemfile  +*makefile  +*cmakelists.txt  +*robots.txt 󰚩 + +# file names (case-sensitive adaptations) +*Gruntfile.coffee  +*Gruntfile.js  +*Gruntfile.ls  +*Gulpfile.coffee  +*Gulpfile.js  +*Gulpfile.ls  +*Dropbox  +*.DS_Store  +*LICENSE  +*React.jsx  +*Procfile  +*Dockerfile  +*Docker-compose.yml  +*Rakefile  +*Gemfile  +*Makefile  +*CMakeLists.txt  + +# file patterns (vim-devicons) (patterns not supported in lf) +# .*jquery.*\.js$  +# .*angular.*\.js$  +# .*backbone.*\.js$  +# .*require.*\.js$  +# .*materialize.*\.js$  +# .*materialize.*\.css$  +# .*mootools.*\.js$  +# .*vimrc.*  +# Vagrantfile$  + +# file patterns (file name adaptations) +*jquery.min.js  +*angular.min.js  +*backbone.min.js  +*require.min.js  +*materialize.min.js  +*materialize.min.css  +*mootools.min.js  +*vimrc  +Vagrantfile  + +# archives or compressed (extensions from dircolors defaults) +*.tar  +*.tgz  +*.arc  +*.arj  +*.taz  +*.lha  +*.lz4  +*.lzh  +*.lzma  +*.tlz  +*.txz  +*.tzo  +*.t7z  +*.zip  +*.z  +*.dz  +*.gz  +*.lrz  +*.lz  +*.lzo  +*.xz  +*.zst  +*.tzst  +*.bz2  +*.bz  +*.tbz  +*.tbz2  +*.tz  +*.deb  +*.rpm  +*.jar  +*.war  +*.ear  +*.sar  +*.rar  +*.alz  +*.ace  +*.zoo  +*.cpio  +*.7z  +*.rz  +*.cab  +*.wim  +*.swm  +*.dwm  +*.esd  + +# image formats (extensions from dircolors defaults) +*.jpg  +*.jpeg  +*.mjpg  +*.mjpeg  +*.gif  +*.bmp  +*.pbm  +*.pgm  +*.ppm  +*.tga  +*.xbm  +*.xpm  +*.tif  +*.tiff  +*.png  +*.svg  +*.svgz  +*.mng  +*.pcx  +*.mov  +*.mpg  +*.mpeg  +*.m2v  +*.mkv  +*.webm  +*.ogm  +*.mp4  +*.m4v  +*.mp4v  +*.vob  +*.qt  +*.nuv  +*.wmv  +*.asf  +*.rm  +*.rmvb  +*.flc  +*.avi  +*.fli  +*.flv  +*.gl  +*.dl  +*.xcf  +*.xwd  +*.yuv  +*.cgm  +*.emf  +*.ogv  +*.ogx  + +# audio formats (extensions from dircolors defaults) +*.aac  +*.au  +*.flac  +*.m4a  +*.mid  +*.midi  +*.mka  +*.mp3  +*.mpc  +*.ogg  +*.ra  +*.wav  +*.oga  +*.opus  +*.spx  +*.xspf  + +# other formats +*.pdf  diff --git a/user/configs/neovim/config/lua/plugins/lspconfig.lua b/user/configs/neovim/config/lua/plugins/lspconfig.lua index 6fdc7ce..6080974 100755 --- a/user/configs/neovim/config/lua/plugins/lspconfig.lua +++ b/user/configs/neovim/config/lua/plugins/lspconfig.lua @@ -45,6 +45,6 @@ lspconfig.cssls.setup({ capabilities = capabilities, cmd = { "css-languageserver", "--stdio" }, settings = { - css = { validate = false }, + css = { validate = true }, }, }) diff --git a/user/configs/neovim/config/lua/settings.lua b/user/configs/neovim/config/lua/settings.lua index 046aec3..7962c2b 100755 --- a/user/configs/neovim/config/lua/settings.lua +++ b/user/configs/neovim/config/lua/settings.lua @@ -25,7 +25,7 @@ vim.wo.number = true vim.wo.relativenumber = true vim.api.nvim_create_autocmd("FileType", { - pattern = "nix", + pattern = "nix,yuck", callback = function() vim.opt_local.shiftwidth = 2 vim.opt_local.tabstop = 2 diff --git a/user/configs/wayland/ags/ags-config/config.js b/user/configs/wayland/ags/ags-config/config.js index 945be62..cd52d82 100644 --- a/user/configs/wayland/ags/ags-config/config.js +++ b/user/configs/wayland/ags/ags-config/config.js @@ -8,7 +8,6 @@ import { } from './js/utils.js'; - const styleScss = App.configDir + '/style.scss'; const styleCss = '/tmp/style-ags.css'; exec(`sassc ${styleScss} ${styleCss}`); diff --git a/user/configs/wayland/hyprland/default.nix b/user/configs/wayland/hyprland/default.nix index 0115068..cc851cb 100755 --- a/user/configs/wayland/hyprland/default.nix +++ b/user/configs/wayland/hyprland/default.nix @@ -6,8 +6,8 @@ ... }: { imports = [ - ./settings.nix ../ags + ./settings.nix ]; wayland.windowManager.hyprland = { diff --git a/user/configs/wayland/hyprland/eww/config/eww-bar.png b/user/configs/wayland/hyprland/eww/config/eww-bar.png new file mode 100644 index 0000000000000000000000000000000000000000..e6de6a881bfe2907276306821e127cc785e046d6 GIT binary patch literal 6286 zcmc(Dg;N~Cx9&n9xH|-g5Q38|5}aM!bqOwk1lPqS!CeyE-DPnLt_kiCG`O?4!`r-D zzgzG90k>{f%}h&8&-CeYzVGW3rm8H1gGq@A00400WWnkH0ID{k{u=!y;?Bj`=>hHc<#1Z?JQPO;cI^3-piJ=_NjvF$M$l= zt4Lo8F8wUINO}pbs*V*y5n$wE3+W!SIOo!K%r6J*X$)*$6yN6ewHQGj%3S>0v$R2w@5|qEmV?gJS*{wW4$%t8vMqkPC^d5 z!(Kf#h|*T~{RAGewYK5mZVH-sMm7GS;QZ{$K!OXff~89}2LMt| z1LMjWNNkWDQI?Z8T!v~+tzUUycq^6)%;&%FR0sCPSknckhLxmfIb$hU7s$_8)oWL= zbOFgA{8h&^nJbc#J-NX$U}=T^kF#~4C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n*0dfvGth{-IdO zTQ)vlFizmIm9;OD_0`hRk9_c#jE|2WtSV!#Es;M~n^}=9u7>cvgjSOWdwRmS`TJ%9 zd#z@M{M5dl`bH4!ULq_i??`|3p`Syi9PXn@{V%7m0s0mi8oImeYV3plq27x1`MS@V ze{GW|fd~W!1N-&g_N}Q{|ov2Y(s+@*~+9Gt)2V z2n`H7>9zDWwg^v*qB0pfB}ykRy>zLo!@s}Re)xQWvNYs=F&Z7v_4eQ4-zz&hjF!q<_u#@hc zkO=Pom)ua_AjU_`{a=MO^S literal 0 HcmV?d00001 diff --git a/user/configs/wayland/hyprland/eww/config/eww.scss b/user/configs/wayland/hyprland/eww/config/eww.scss new file mode 100644 index 0000000..a274d2a --- /dev/null +++ b/user/configs/wayland/hyprland/eww/config/eww.scss @@ -0,0 +1,81 @@ +$bg: rgba(40,40,40,0.8); +$fg: rgb(235,219,178); + +$wsfg: rgb(235,219,178); +$wsbg: rgb(60,56,54); +$activewsbg: rgb(102,92,84); + + +$box-bg: rgb(80,73,69); + +* { + all: unset; //Unsets everything so you can style everything from scratch +} + +//Global Styles +.bar { + background-color: $bg; + color: $fg; + font-family: "JetBrainsMono Nerd Font"; + font-size: 12px; +} + +.window { + background-color: $box-bg; + border-radius: 10px; + padding: 0px 10px 0px 10px; + margin: 5px 0px 5px 10px; +} + +.volume { + background-color: $box-bg; + border-radius: 10px 0px 0px 10px; + margin: 5px 0px 5px 0px; + padding: 0px 10px 0px 10px; +} + +.mpd { + background-color: $box-bg; + border-radius: 0px 10px 10px 0px; + padding: 0px 10px 0px 10px; + margin: 5px 10px 5px 0px; +} + +.date { + background-color: $box-bg; + border-radius: 10px; + padding: 0px 10px 0px 10px; + margin: 5px 10px 5px 0px; +} + +.wswidget { + background-color: $box-bg; + border-radius: 10px; + margin: 5px 0px 5px 10px; +} + +.w0, .w01, .w02, .w03, .w04, .w05, .w06, .w07, .w08, .w09, .w011, .w022, .w033, .w044, .w055, .w066, .w077, .w088, .w099 { + background-color: $wsbg; + padding: 3px 10px; +} + +.w01, .w011, .w04, .w044 { + background-color: $wsbg; + border-radius: 10px 0px 0px 10px; +} + +.w03, .w033, .w06, .w066 { + background-color: $wsbg; + border-radius: 0px 10px 10px 0px; +} + +/* Occupied */ +.w01, .w02, .w03, .w04, .w05, .w06, .w07, .w08, .w09 { + background-color: $wsbg; +} + +/* Focused */ +.w011, .w022, .w033, .w044, .w055, .w066, .w077, .w088, .w099 { + background-color: $activewsbg; +} + diff --git a/user/configs/wayland/hyprland/eww/config/eww.yuck b/user/configs/wayland/hyprland/eww/config/eww.yuck new file mode 100644 index 0000000..036a2b8 --- /dev/null +++ b/user/configs/wayland/hyprland/eww/config/eww.yuck @@ -0,0 +1,157 @@ +;; ----------------------------- right monitor +(defwidget bar0 [] + (centerbox + :class "bar" + :orientation "h" + (left_side0) + (center) + (right_side) + ) +) + +(defwidget left_side0 [] + (box + :space-evenly false + :orientation "h" + :spacing 5 + + (box + :class "wswidget" + :spacing 0 + (workspaces0) + ) + + (box + :class "window" + window0) + ) +) + +;; ----------------------------- left monitor + +(defwidget bar1 [] + (centerbox + :class "bar" + :orientation "h" + (left_side1) + (center) + (right_side) + ) +) + +(defwidget left_side1 [] + (box + :space-evenly false + :orientation "h" + :spacing 5 + + (box + :class "wswidget" + :spacing 0 + (workspaces1) + ) + + (box + :class "window" + window1) + ) +) + +;; ----------------------------- + +(defwidget center [] + (box + :space-evenly false + :spacing 5 + + (eventbox + :onscroll "pamixer `echo {} | sed 's/up/\-i/\' | sed 's/down/\-d/'` 10" + (box + :space-evenly false + :class "volume" + volume)) + + (box + :space-evenly false + :class "mpd" + mpd) + ) +) + +(defwidget right_side [] + (box + :space-evenly false + :spacing 5 + :halign "end" + + (box + :space-evenly false + :orientation "h" + :class "date" + date) + ) +) + +;; ---------------------------- workspace widget + +(deflisten workspace0 + "scripts/workspaces.sh 0") + +(defwidget workspaces0 [] + (literal :content workspace0)) + +(deflisten workspace1 + "scripts/workspaces.sh 1") + +(defwidget workspaces1 [] + (literal :content workspace1)) + +;; ---------------------------- window widget + +(deflisten window0 "hyprland-activewindow `hyprctl monitors -j | jq -r \".[0].name\"`") +(deflisten window1 "hyprland-activewindow `hyprctl monitors -j | jq -r \".[1].name\"`") + +(defwidget title0 [] + (label :text "${window0}")) + +(defwidget title1 [] + (label :text "${window1}")) + +;; ----------------------------- + +(defpoll volume + :initial "" + :interval "0.1s" + "scripts/get_volume.sh") + +(deflisten mpd + :initial "" + "scripts/mpd_current_song.sh") + +(defpoll date + :interval "1s" + "date '+%a %d, %B %H:%M'") + +(defwindow bar0 + :monitor 0 + :windowtype "dock" + :geometry + (geometry :x "0%" + :y "0%" + :width "100%" + :height "32px" + :anchor "top center") + :exclusive true + (bar0)) + +(defwindow bar1 + :monitor 1 + :windowtype "dock" + :geometry + (geometry :x "0%" + :y "0%" + :width "100%" + :height "32px" + :anchor "top center") + :exclusive true + (bar1)) diff --git a/user/configs/wayland/hyprland/eww/config/scripts/get_volume.sh b/user/configs/wayland/hyprland/eww/config/scripts/get_volume.sh new file mode 100755 index 0000000..e5b5810 --- /dev/null +++ b/user/configs/wayland/hyprland/eww/config/scripts/get_volume.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env cached-nix-shell +#!nix-shell -i bash -p pamixer + +volume=$(pamixer --get-volume) + +if [[ $volume -eq 0 ]]; then + echo " $volume%" +elif [[ $volume -lt 25 ]]; then + echo " $volume%" +elif [[ $volume -lt 50 ]]; then + echo " $volume%" +elif [[ $volume -lt 75 ]]; then + echo "󰕾 $volume%" +else + echo " $volume%" +fi diff --git a/user/configs/wayland/hyprland/eww/config/scripts/mpd_current_song.sh b/user/configs/wayland/hyprland/eww/config/scripts/mpd_current_song.sh new file mode 100755 index 0000000..c01defb --- /dev/null +++ b/user/configs/wayland/hyprland/eww/config/scripts/mpd_current_song.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env cached-nix-shell +#!nix-shell -i bash -p mpc-cli + +currentsong="" +state="" + +while true; do + state=$(mpc status %state%) + current_song=$(mpc current) + + if [[ $state == "playing" ]]; then + echo " $current_song" + elif [[ $state == "paused" && $current_song ]]; then + echo "󰏤 $current_song" + else + echo " stopped" + fi + mpc idle player &> /dev/null +done diff --git a/user/configs/wayland/hyprland/eww/config/scripts/workspaces.sh b/user/configs/wayland/hyprland/eww/config/scripts/workspaces.sh new file mode 100755 index 0000000..ee70734 --- /dev/null +++ b/user/configs/wayland/hyprland/eww/config/scripts/workspaces.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env cached-nix-shell +#!nix-shell -i bash -p hyprland socat jq + +workspaces() { + +unset -v \ +o1 o2 o3 o4 o5 o6 \ +f1 f2 f3 f4 f5 f6 + +# Get occupied workspaces and remove workspace -99 aka scratchpad if it exists +# a="$(hyprctl workspaces | grep ID | awk '{print $3}')" +# a="$(echo "${a//-99/}" | sed '/^[[:space:]]*$/d')" +ows="$(hyprctl workspaces -j | jq '.[] | del(select(.id == -99)) | .id')" + +for num in $ows; do + export o"$num"="$num" +done + +# Get Focused workspace for current monitor ID +arg="$1" +num="$(hyprctl monitors -j | jq --argjson arg "$arg" '.[] | select(.id == $arg).activeWorkspace.id')" +export f"$num"="$num" + +if [[ $arg -eq 0 ]]; then + echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \ + (box :class \"workspace\" :orientation \"h\" :space-evenly \"false\" \ + (button :onclick \"hyprctl dispatch workspace 1\" :class \"w0$o1$f1\" \"1\") \ + (button :onclick \"hyprctl dispatch workspace 2\" :class \"w0$o2$f2\" \"2\") \ + (button :onclick \"hyprctl dispatch workspace 3\" :class \"w0$o3$f3\" \"3\") \ + )\ + )" + elif [[ $arg -eq 1 ]]; then + echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \ + (box :class \"workspace\" :orientation \"h\" :space-evenly \"false\" \ + (button :onclick \"hyprctl dispatch workspace 4\" :class \"w0$o4$f4\" \"4\") \ + (button :onclick \"hyprctl dispatch workspace 5\" :class \"w0$o5$f5\" \"5\") \ + (button :onclick \"hyprctl dispatch workspace 6\" :class \"w0$o6$f6\" \"6\") \ + )\ + )" +fi +} + +workspaces $1 +socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r; do +workspaces $1 +done + diff --git a/user/configs/wayland/hyprland/eww/default.nix b/user/configs/wayland/hyprland/eww/default.nix new file mode 100644 index 0000000..bfebc78 --- /dev/null +++ b/user/configs/wayland/hyprland/eww/default.nix @@ -0,0 +1,11 @@ +{ + pkgs, + inputs, + ... +}: { + programs.eww = { + enable = false; + package = inputs.eww-systray.packages.${pkgs.system}.eww-wayland; + configDir = ./config; + }; +} diff --git a/user/configs/wayland/hyprland/settings.nix b/user/configs/wayland/hyprland/settings.nix index 632fa44..3896a3f 100644 --- a/user/configs/wayland/hyprland/settings.nix +++ b/user/configs/wayland/hyprland/settings.nix @@ -80,12 +80,20 @@ in { animations = { enabled = true; + bezier = [ + "wind, 0.05, 0.9, 0.1, 1.05" + "winIn, 0.1, 1.1, 0.1, 1.1" + "winOut, 0.3, -0.3, 0, 1" + "liner, 1, 1, 1, 1" + ]; animation = [ - "windowsIn, 1, 8, default, slide" - "windowsOut, 1, 8, default, slide" - "border, 1, 8, default" - "fade, 1, 5, default" - "workspaces, 1, 4, default" + "windows, 1, 6, wind, slide" + "windowsIn, 1, 6, winIn, slide" + "windowsOut, 1, 5, winOut, slide" + "border, 1, 1, liner" + "borderangle, 1, 30, liner, loop" + "fade, 1, 10, default" + "workspaces, 1, 5, wind" ]; }; @@ -93,12 +101,11 @@ in { "${pkgs.openrgb}/bin/openrgb --startminimized --profile autorun.orp" "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" "${pkgs.ydotool}/bin/ydotoold" - "${pkgs.libsForQt5.kwallet}/bin/kwalletd5" ]; exec = [ "${pkgs.xorg.xrandr}/bin/xrandr --output ${rightMonitor.display} --primary" - "ags -q; ags" + "ags -q; sleep 1; ags" "sleep 2; pkill swww-daemon; swww init" #Set cursor @@ -142,10 +149,10 @@ in { "CTRL, grave, exec, ags toggle-window notification-center" - "MOD5, F9, exec, ${pkgs.mpc-cli}/bin/mpc stop" - "MOD5, F10, exec, ${pkgs.mpc-cli}/bin/mpc prev" - "MOD5, F11, exec, ${pkgs.mpc-cli}/bin/mpc toggle" - "MOD5, F12, exec, ${pkgs.mpc-cli}/bin/mpc next" + "MOD5, F9, exec, ${pkgs.playerctl}/bin/playerctl stop" + "MOD5, F10, exec, ${pkgs.playerctl}/bin/playerctl previous" + "MOD5, F11, exec, ${pkgs.playerctl}/bin/playerctl play-pause" + "MOD5, F12, exec, ${pkgs.playerctl}/bin/playerctl next" ", Print, exec, ${pkgs.grimblast}/bin/grimblast -c --notify copy screen" "${modKey}, Print, exec, ${pkgs.grimblast}/bin/grimblast -c --notify copy active" "${modKey} SHIFT, Print, exec, ${pkgs.grimblast}/bin/grimblast -c --notify copy area" diff --git a/user/home.nix b/user/home.nix index af69f4f..a3fe0d5 100755 --- a/user/home.nix +++ b/user/home.nix @@ -14,6 +14,7 @@ ./configs/fish ./configs/kitty ./configs/kvantum + ./configs/lf ./configs/mpd ./configs/mpv ./configs/neovim @@ -43,11 +44,11 @@ gnome.seahorse gnome.simple-scan imv + inputs.eww-systray.packages.${system}.eww-wayland jq libsForQt5.ark libsForQt5.dolphin libsForQt5.dolphin-plugins - libsForQt5.kwallet lutris mangohud mesa-demos @@ -63,7 +64,6 @@ pulsemixer qbittorrent qt5ct - ranger samba signal-desktop sshfs @@ -168,7 +168,7 @@ }; }; - # services.gnome-keyring.enable = true; + services.gnome-keyring.enable = true; services.easyeffects = { enable = true;