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 0000000..e6de6a8 Binary files /dev/null and b/user/configs/wayland/hyprland/eww/config/eww-bar.png differ 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;