This commit is contained in:
2025-05-03 01:16:02 +02:00
parent 4364cc2d16
commit 0f9f16c8b6
31 changed files with 529 additions and 296 deletions

View File

@@ -181,6 +181,10 @@
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
security.pam.services.lightdm.enableGnomeKeyring = true; security.pam.services.lightdm.enableGnomeKeyring = true;
# Disable powerbutton => for use with eww
services.logind.extraConfig = ''HandlePowerKey=ignore'';
services.acpid.enable = true;
# Set stateVersion. Leave it as set. # Set stateVersion. Leave it as set.
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

183
flake.lock generated
View File

@@ -40,19 +40,11 @@
] ]
}, },
"locked": { "locked": {
<<<<<<< HEAD
"lastModified": 1741352980,
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
=======
"lastModified": 1743550720, "lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5", "rev": "c621e8422220273271f52058f618c94e405bb0f5",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -70,19 +62,11 @@
] ]
}, },
"locked": { "locked": {
<<<<<<< HEAD
"lastModified": 1738453229,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
=======
"lastModified": 1743550720, "lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5", "rev": "c621e8422220273271f52058f618c94e405bb0f5",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -157,19 +141,11 @@
] ]
}, },
"locked": { "locked": {
<<<<<<< HEAD
"lastModified": 1741379162,
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
=======
"lastModified": 1742649964, "lastModified": 1742649964,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -247,19 +223,11 @@
] ]
}, },
"locked": { "locked": {
<<<<<<< HEAD
"lastModified": 1739595404,
"narHash": "sha256-0CjCfbq0yHWexOrpO06e2WU1r5JAqR6ffy1zgM3NksI=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "06519cec8fb32d219006da6eacd255504a9996af",
=======
"lastModified": 1744693102, "lastModified": 1744693102,
"narHash": "sha256-1Z4WPGVky4w3lrhrgs89OKsLzPdtkbi1bPLNFWsoLfY=", "narHash": "sha256-1Z4WPGVky4w3lrhrgs89OKsLzPdtkbi1bPLNFWsoLfY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "hercules-ci-effects", "repo": "hercules-ci-effects",
"rev": "5b6cec51c9ec095a0d3fd4c8eeb53eb5c59ae33e", "rev": "5b6cec51c9ec095a0d3fd4c8eeb53eb5c59ae33e",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -275,19 +243,11 @@
] ]
}, },
"locked": { "locked": {
<<<<<<< HEAD "lastModified": 1746177088,
"lastModified": 1741635347, "narHash": "sha256-hmHKl4meWr6ryzqQAwRD3+3Ihfb/Y/0CbK+WnE+oa6Q=",
"narHash": "sha256-2aYfV44h18alHXopyfL4D9GsnpE5XlSVkp4MGe586VU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7fb8678716c158642ac42f9ff7a18c0800fea551", "rev": "f045bd46b73c3b0ed4e46cdb6036b3d5823d7dee",
=======
"lastModified": 1744987093,
"narHash": "sha256-IVioWVz5qVtHiqosesW7CJW//m/yADr7cVdgF1P4N8s=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "5e6a8203cee7cc33b2e0d9a0adb7268f46447292",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -309,19 +269,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
<<<<<<< HEAD "lastModified": 1746168726,
"lastModified": 1741676952, "narHash": "sha256-ZkgW3U37lTwzqUo2rfko+utld5ChnYWDunJ2hAcJOQo=",
"narHash": "sha256-14tBgnGZLu3sH23O61PA1oG4op4TvZRUj3Aof8m4bEQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "adee34d9e71f021dd8b635e8dd8e7329dea6ef79", "rev": "d4e6959d82e9e9dc609dcbf7a29fd293fad9c912",
=======
"lastModified": 1744960122,
"narHash": "sha256-9bIzs90K5+baT7C9Jy2/Q6WMfgeZ+tX5MyIwC+VHl60=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "e3bc827059b3e1606d48c8b0d492e0101b7b32ff",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -333,19 +285,11 @@
"neovim-src": { "neovim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
<<<<<<< HEAD "lastModified": 1746141998,
"lastModified": 1741647257, "narHash": "sha256-CYxer9cRvlMySr76epuh5Ub3ryyDV94yVwDC1M/MPvw=",
"narHash": "sha256-1fKiWpHhE0WcrPMJgxHiYK9sBews+KXFDALGiWnYSPk=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "7e2b75760f1723c44bf69951dad2cb8da92aa213", "rev": "ce8b755a86c10496a81675c49b3bc9a42c79d80f",
=======
"lastModified": 1744932170,
"narHash": "sha256-XG8mE3iggeRRi5MdYYJtmXiDxuA2c4w57UgZfLLqxKQ=",
"owner": "neovim",
"repo": "neovim",
"rev": "b4c759716a9e945b41439ae6d686c81107115516",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -356,19 +300,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
<<<<<<< HEAD "lastModified": 1746141548,
"lastModified": 1741513245, "narHash": "sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds+hc=",
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", "rev": "f02fddb8acef29a8b32f10a335d44828d7825b78",
=======
"lastModified": 1744932701,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -380,19 +316,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
<<<<<<< HEAD "lastModified": 1746141548,
"lastModified": 1741513245, "narHash": "sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds+hc=",
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", "rev": "f02fddb8acef29a8b32f10a335d44828d7825b78",
=======
"lastModified": 1744463964,
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -433,13 +361,8 @@
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 0, "lastModified": 0,
<<<<<<< HEAD "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=",
"narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", "path": "/nix/store/s8b6phy15mzjvx56vjdd1rdd8hr07qw5-source",
"path": "/nix/store/pqgpwakx0m4r75zg34954w5mwi5shg89-source",
=======
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
"path": "/nix/store/frfyxcpzsdasdin76x83krbhpgkis8b0-source",
>>>>>>> test
"type": "path" "type": "path"
}, },
"original": { "original": {
@@ -454,19 +377,11 @@
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
<<<<<<< HEAD "lastModified": 1746175988,
"lastModified": 1741690149, "narHash": "sha256-Zcq3UcnsZis/3bAevz2yBWP5hp6LBGIsoO+dIAPqy+o=",
"narHash": "sha256-+0EpQJDaYhZDF6SIc/v0PSbpK3yd14MniMl+HWVgd8A=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "f1b3ba0c23233b402b4df174d9e7cc5933e2a53b", "rev": "68db141101c20602e175a53b290bc6064e83bf30",
=======
"lastModified": 1744987300,
"narHash": "sha256-C3GtrgAVItvuKzUbzRWGw8QWpKVBard5OX6JZMAVnFI=",
"owner": "nix-community",
"repo": "NUR",
"rev": "3df1ac0aef0f9f7664acb60ea36edced26b7a161",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -559,19 +474,11 @@
] ]
}, },
"locked": { "locked": {
<<<<<<< HEAD "lastModified": 1745929750,
"lastModified": 1739829690, "narHash": "sha256-k5ELLpTwRP/OElcLpNaFWLNf8GRDq4/eHBmFy06gGko=",
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "3d0579f5cc93436052d94b73925b48973a104204", "rev": "82bf32e541b30080d94e46af13d46da0708609ea",
=======
"lastModified": 1744707583,
"narHash": "sha256-IPFcShGro/UUp8BmwMBkq+6KscPlWQevZi9qqIwVUWg=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49d05555ccdd2592300099d6a657cc33571f4fe0",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -603,19 +510,11 @@
}, },
"unstable": { "unstable": {
"locked": { "locked": {
<<<<<<< HEAD "lastModified": 1746141548,
"lastModified": 1741513245, "narHash": "sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds+hc=",
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", "rev": "f02fddb8acef29a8b32f10a335d44828d7825b78",
=======
"lastModified": 1744932701,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -634,19 +533,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
<<<<<<< HEAD "lastModified": 1746003389,
"lastModified": 1740150837, "narHash": "sha256-UZzEVcFPFlSp/2ppzoTEn5n+iDgUGY2ACtk/2Crxyu0=",
"narHash": "sha256-fDNPiftVD/npKTMEBFzFBFcf1Tj7389sIRHVGPRes28=",
"owner": "danyspin97", "owner": "danyspin97",
"repo": "wpaperd", "repo": "wpaperd",
"rev": "8095cc91dc8122ee6d6580ed3f73220bd3945374", "rev": "f891ed0d36d3b7a51897da59c3d6e213935afc93",
=======
"lastModified": 1744728945,
"narHash": "sha256-zTeJdaAaXf4aeGHY8P4EbSob9Hu/0eZ7mEaygxHX1nU=",
"owner": "danyspin97",
"repo": "wpaperd",
"rev": "32377e8061578f36e4785ea15eeda2ab94f17ab6",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -663,19 +554,11 @@
"unstable": "unstable" "unstable": "unstable"
}, },
"locked": { "locked": {
<<<<<<< HEAD
"lastModified": 1740222736,
"narHash": "sha256-7RhlA0HKqauUK8ap8Qsp/xBVHd+4CotLqWL7+sLWyzg=",
"owner": "xmonad",
"repo": "xmonad",
"rev": "07d95ad8fc395866200b4587aca8b4db50aa20bd",
=======
"lastModified": 1744559834, "lastModified": 1744559834,
"narHash": "sha256-4AeqylaTW3B+iIab7/JobZruTOU1AgDZ8s+wYaZKQos=", "narHash": "sha256-4AeqylaTW3B+iIab7/JobZruTOU1AgDZ8s+wYaZKQos=",
"owner": "xmonad", "owner": "xmonad",
"repo": "xmonad", "repo": "xmonad",
"rev": "ebf265a84c6295d4fe15c4a5cf88cb08746f2145", "rev": "ebf265a84c6295d4fe15c4a5cf88cb08746f2145",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -694,19 +577,11 @@
"xmonad": "xmonad" "xmonad": "xmonad"
}, },
"locked": { "locked": {
<<<<<<< HEAD
"lastModified": 1741673055,
"narHash": "sha256-o0DD+4E0x5+qRalpMb77x+pX+gOc0P/1baJTxiE1brA=",
"owner": "xmonad",
"repo": "xmonad-contrib",
"rev": "b470de0d7580b98adfd6d33378622ce347a090c2",
=======
"lastModified": 1744559846, "lastModified": 1744559846,
"narHash": "sha256-Cq2N2Gokz+TLz+D1TFNtc34z5OxBAuY9qmz2m6hhKpg=", "narHash": "sha256-Cq2N2Gokz+TLz+D1TFNtc34z5OxBAuY9qmz2m6hhKpg=",
"owner": "xmonad", "owner": "xmonad",
"repo": "xmonad-contrib", "repo": "xmonad-contrib",
"rev": "4b866210512b90bc532b4cd46dc5171542d0fac8", "rev": "4b866210512b90bc532b4cd46dc5171542d0fac8",
>>>>>>> test
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -40,10 +40,7 @@
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager = { home-manager = {
<<<<<<< HEAD backupFileExtension = "backup";
#useGlobalPkgs = true;
=======
>>>>>>> test
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
users.elias = import ./home/default-laptop.nix; users.elias = import ./home/default-laptop.nix;
@@ -71,10 +68,7 @@
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager = { home-manager = {
<<<<<<< HEAD backupFileExtension = "backup";
#useGlobalPkgs = true;
=======
>>>>>>> test
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
users.elias = import ./home/default-desktop.nix; users.elias = import ./home/default-desktop.nix;

View File

@@ -0,0 +1,8 @@
{}:
{
xdg.configFile."acpi" = {
recursive = true;
source = ./src;
};
}

View File

@@ -0,0 +1 @@
eww open powerpopup

View File

@@ -0,0 +1,2 @@
event=button/power.*
action=$HOME/.config/acpi/actions/power-button.sh

View File

@@ -0,0 +1,230 @@
;; /-- Variables -->
(defpoll windows
:interval "1s"
:initial "-"
`sh ~/.config/eww/scripts/xmonad_logs.sh`)
(defpoll micClass
:interval "1s"
:initial "micOff"
`sh ~/.config/eww/scripts/mic_class.sh`)
(defpoll micIcon
:interval "1s"
:initial "󰍭"
`sh ~/.config/eww/scripts/mic_icon.sh`)
(defpoll speakerClass
:interval "1s"
:initial "speakerOff"
`sh ~/.config/eww/scripts/speaker_class.sh`)
(defpoll speakerIcon
:interval "1s"
:initial ""
`sh ~/.config/eww/scripts/speaker_icon.sh`)
(defpoll speakerVolume
:interval "1s"
:initial "0"
`sh ~/.config/eww/scripts/speaker_volume.sh`)
(defpoll backlight
:interval "1s"
:initial "0"
`xbacklight -get`)
(defpoll cpu
:interval "1s"
:initial "0"
`sh ~/.config/eww/scripts/cpu.sh`)
(defpoll memory
:interval "1s"
:initial "0"
`sh ~/.config/eww/scripts/memory.sh`)
(defpoll batteryClass
:interval "1s"
:initial "speakerOff"
`sh ~/.config/eww/scripts/battery_class.sh`)
(defpoll batteryIcon
:interval "1s"
:initial ""
`sh ~/.config/eww/scripts/battery_icon.sh`)
(defpoll batteryVolume
:interval "1s"
:initial "0"
`sh ~/.config/eww/scripts/battery_volume.sh`)
(defpoll networkDown
:interval "1s"
:initial "0"
`sh ~/.config/eww/scripts/network_down.sh`)
(defpoll networkUp
:interval "1s"
:initial "0"
`sh ~/.config/eww/scripts/network_up.sh`)
(defpoll date
:interval "1s"
:initial "-"
`date '+ %a %d.%m.%y  %H:%M'`)
(defvar ws1 "ws-empty")
(defvar ws2 "ws-empty")
(defvar ws3 "ws-empty")
(defvar ws4 "ws-empty")
(defvar ws5 "ws-empty")
(defvar ws6 "ws-empty")
(defvar ws7 "ws-empty")
(defvar ws8 "ws-empty")
(defvar ws9 "ws-empty")
;; /-- Blocks -->
(defwidget widgetWorkspaces []
(box
:orientation "horizontal"
:class "workspace-buttons"
(button
:onclick "wmctrl -s 0"
:class "workspace-button ${ws1}"
(label
:text "1"))
(label
:text " ")
(button
:onclick "wmctrl -s 1"
:class "workspace-button ${ws2}"
(label
:text "2"))
(label
:text " ")
(button
:onclick "wmctrl -s 2"
:class "workspace-button ${ws3}"
(label
:text "3"))
(label
:text " ")
(button
:onclick "wmctrl -s 3"
:class "workspace-button ${ws4}"
(label
:text "4"))
(label
:text " ")
(button
:onclick "wmctrl -s 4"
:class "workspace-button ${ws5}"
(label
:text "5"))
(label
:text " ")
(button
:onclick "wmctrl -s 5"
:class "workspace-button ${ws6}"
(label
:text "6"))
(label
:text " ")
(button
:onclick "wmctrl -s 6"
:class "workspace-button ${ws7}"
(label
:text "7"))
(label
:text " ")
(button
:onclick "wmctrl -s 7"
:class "workspace-button ${ws8}"
(label
:text "8"))
(label
:text " ")
(button
:onclick "wmctrl -s 8"
:class "workspace-button ${ws9}"
(label
:text "9"))
(label
:text " ")))
(defwidget widgetWindows []
(label
:text "| ${windows}"))
(defwidget widgetMic []
(label
:class micClass
:text "${micIcon} "))
(defwidget widgetSpeaker []
(label
:class speakerClass
:text "${speakerIcon} ${speakerVolume}% "))
(defwidget widgetBacklight []
(label
:class "backlight"
:text " ${backlight}% "))
(defwidget widgetCpu []
(label
:class "cpu"
:text " ${cpu}% "))
(defwidget widgetMemory []
(label
:class "memory"
:text " ${memory}% "))
(defwidget widgetBattery []
(label
:class batteryClass
:text "${batteryIcon} ${batteryVolume}% "))
(defwidget widgetNetworkDown []
(label
:class "networkDown"
:text " ${networkDown}KiB "))
(defwidget widgetNetworkUp []
(label
:class "networkUp"
:text " ${networkUp}KiB "))
;; /-- Bar -->
(defwindow bar []
:geometry (geometry
:x "0px"
:y "0px"
:width "100%"
:height "25px"
:anchor "top center"
)
:reserve (struts
:distance "25px"
:side "top")
:windowtype "dock"
(box
:orientation "horizontal"
:space-evenly false
:class "bar"
(widgetWorkspaces)
(widgetWindows)
(box :hexpand true)
(widgetMic)
(widgetSpeaker)
(widgetBacklight)
(widgetCpu)
(widgetMemory)
(widgetBattery)
(widgetNetworkDown)
(widgetNetworkUp)
(label :text date)
)
)

View File

@@ -0,0 +1,76 @@
// <-- Preamble -->
// <-- Colors -->
$white-text: #f5e0dc;
$grey-text: #6c7086;
$grey-background: #1e1e2e;
$green: #a6e3a1;
$red: #f38ba8;
$yellow: #f9e2af;
$violet: #cba6f7;
$blue: #89b4fa;
$gold: #fab387;
// <-- Prepare all -->
* { all: unset; }
// <-- Bar -->
// <-- Widgets -->
// <-- Audio -->
.micOn {color: $green;}
.micOff {color: $red;}
.speakerOn {color: $green;}
.speakerOff {color: $red;}
// <-- Backlight -->
.backlight {color: $yellow;}
// <-- CPU & Memory -->
.cpu {color: $violet;}
.memory {color: $blue;}
// <-- Battery -->
.batteryFull {color: $gold;}
.batteryHalf {color: $green;}
.batteryEmpty {color: $red;}
.batteryCharging {color: $violet;}
.networkDown {color: $red;}
// <-- Network -->
.networkUp {color: $blue;}
// <-- Workspaces -->
.workspace-button {
background: $grey-background;
}
.ws-current {
color: $green;
}
.ws-visible {
color: $red;
}
.ws-hidden {
color: $white-text;
}
.ws-empty {
color: $grey-text;
}
// <-- Window -->
.bar {
padding: 0.2em 1em;
background: $grey-background;
color: $white-text;
font-family: "Fira Code";
font-size: 12px;
}
// <-- Powermenu -->
.powermenu-button {
background-color: #313244;
color: $white-text;
padding: 15px;
border: none;
border-radius: 6px;
font-size: 14px;
}
// <-- Window -->
.powermenu {
background-color: $grey-background;
padding: 20px;
}
.powermenuWindow {
background-color: transparent;
border: none;
box-shadow: none;
}

View File

@@ -1,50 +1,2 @@
<<<<<<< HEAD (include "./bar.yuck")
(defwindow bar-primary (include "./powerpopup.yuck")
:monitor 0
:geometry (geometry :x "0px"
:y "0px"
:width "100%"
:height "25px"
:anchor "top center")
:stacking "fg"
:reserve (struts :distance 25px" :side "top")
:windowtype "dock"
:wm-ignore false
(box
:orientation "horizontal"
:halign "right"
(eventbox :onclick "notify-send Left"
:onrightclick "notify-send Right"
"Click Me!")
(rightSideBar)))
=======
(defwidget workspaces-and-windows []
(let content (split " " (file "/tmp/xmonad-eww-log"))
(let ws-list (take 9 content)
(let win-list (drop 9 content)
(box :orientation "vertical" :class "bar"
>>>>>>> test
;; Workspaces
(box :orientation "horizontal"
(for ws in ws-list
(let class (if (starts-with ws "[[")
"ws-current"
(if (starts-with ws "(")
"ws-visible"
"ws-hidden")))
(let name (string-trim ws "[]()")
(button :onclick (format "wmctrl -s %s" name)
:class class
(label :text name))))))
;; Open windows
(box :orientation "horizontal" :class "window-list"
(for win in win-list
(let class (if (starts-with win "*") "win-focused" "win")
(label :class class :text (string-trim win "*")))))
)
)
)
)
)

View File

@@ -1,50 +0,0 @@
<<<<<<< HEAD
(defwindow bar-primary
:monitor 0
:geometry (geometry :x "0px"
:y "0px"
:width "100%"
:height "25px"
:anchor "top center")
:stacking "fg"
:reserve (struts :distance 25px" :side "top")
:windowtype "dock"
:wm-ignore false
(box
:orientation "horizontal"
:halign "right"
(eventbox :onclick "notify-send Left"
:onrightclick "notify-send Right"
"Click Me!")
(rightSideBar)))
=======
(defwidget workspaces-and-windows []
(let content (split " " (file "/tmp/xmonad-eww-log"))
(let ws-list (take 9 content)
(let win-list (drop 9 content)
(box :orientation "vertical" :class "bar"
>>>>>>> test
;; Workspaces
(box :orientation "horizontal"
(for ws in ws-list
(let class (if (starts-with ws "[[")
"ws-current"
(if (starts-with ws "(")
"ws-visible"
"ws-hidden")))
(let name (string-trim ws "[]()")
(button :onclick (format "wmctrl -s %s" name)
:class class
(label :text name))))))
;; Open windows
(box :orientation "horizontal" :class "window-list"
(for win in win-list
(let class (if (starts-with win "*") "win-focused" "win")
(label :class class :text (string-trim win "*")))))
)
)
)
)
)

View File

@@ -0,0 +1,49 @@
(defwidget powerpopup []
(box
:class "powermenu"
(button
:onclick "systemctl poweroff"
:class "powermenu-button"
(label
:text "⏻ "))
(label
:text " ")
(button
:onclick "loginctl lock-session"
:class "powermenu-button"
(label
:text ""))
(label
:text " ")
(button
:onclick "systemctl reboot"
:class "powermenu-button"
(label
:text ""))
(label
:text "")
(button
:onclick "loginctl terminate-user $USER"
:class "powermenu-button"
(label
:text ""))))
(defwidget powermenu [shutdown shutdown_icon reboot
reboot_icon logout logout_icon]
(box :class "powermenu" :spacing 5
:vexpand true :hexpand true
:valign "end" :halign "end"
:space-evenly false
(button :onclick shutdown shutdown_icon)
(button :onclick reboot reboot_icon)
(button :onclick logout logout_icon)))
(defwindow power []
:class "powermenuWindow"
:geometry (geometry
:width "200px"
:height "50px"
:anchor "center center"
:x "0%"
:y "0%")
(powerpopup)
)

View File

@@ -0,0 +1,14 @@
bat=$(cat /sys/class/power_supply/BAT0/capacity)
stat=$(cat /sys/class/power_supply/BAT0/status)
class="batteryFull"
if [[ $stat == "Charging" ]]; then
class="batteryCharging"
elif [[ $bat -le 10 ]]; then
class="batteryEmpty"
elif [[ $bat -le 80 ]]; then
class="batteryHalf"
fi
echo "$class"

View File

@@ -0,0 +1,16 @@
bat=$(cat /sys/class/power_supply/BAT0/capacity)
stat=$(cat /sys/class/power_supply/BAT0/status)
icon=""
if [[ $stat == "Charging" ]]; then
icon=""
elif [[ $bat -le 10 ]]; then
icon=""
elif [[ $bat -le 50 ]]; then
icon=""
elif [[ $bat -le 80 ]]; then
icon=""
fi
echo "$icon"

View File

@@ -0,0 +1,2 @@
bat=$(cat /sys/class/power_supply/BAT0/capacity)
echo "$bat"

View File

@@ -0,0 +1,5 @@
cpu_idle=$(top -bn1 | awk '/Cpu\(s\)/ {print $8}')
cpu_used=$(awk "BEGIN {print 100 - $cpu_idle}")
# Print only the numeric result
printf "%.0f\n" "$cpu_used"

View File

@@ -0,0 +1,6 @@
mem_info=$(free | grep Mem)
used=$(echo "$mem_info" | awk '{print $3}')
total=$(echo "$mem_info" | awk '{print $2}')
mem_used=$(awk "BEGIN {print int($used/$total * 100)}")
echo "$mem_used"

View File

@@ -0,0 +1,5 @@
if pactl get-source-mute @DEFAULT_SOURCE@ | grep -q "yes"; then
echo "micOff"
else
echo "micOn"
fi

View File

@@ -0,0 +1,5 @@
if pactl get-source-mute @DEFAULT_SOURCE@ | grep -q "yes"; then
echo "󰍭" # muted
else
echo "󰍬" # unmuted
fi

View File

@@ -0,0 +1,11 @@
# You can change this if your interface is named differently (e.g., eth0, enp3s0)
INTERFACE=$(ip route get 1.1.1.1 | awk '{print $5; exit}')
RX_PREV=$(cat /sys/class/net/$INTERFACE/statistics/rx_bytes)
sleep 1
RX_CUR=$(cat /sys/class/net/$INTERFACE/statistics/rx_bytes)
# Calculate download/upload in KiB/s
RX_RATE=$(((RX_CUR - RX_PREV) / 1024))
# Output formatted for Eww
echo "${RX_RATE}"

View File

@@ -0,0 +1,8 @@
# You can change this if your interface is named differently (e.g., eth0, enp3s0)
INTERFACE=$(ip route get 1.1.1.1 | awk '{print $5; exit}')
TX_PREV=$(cat /sys/class/net/$INTERFACE/statistics/tx_bytes)
sleep 1
TX_CUR=$(cat /sys/class/net/$INTERFACE/statistics/tx_bytes)
TX_RATE=$(((TX_CUR - TX_PREV) / 1024))
echo "${TX_RATE}"

View File

@@ -0,0 +1,8 @@
mute=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | tr -d '%')
if [[ "$mute" == "yes" ]]; then
echo "speakerOff" # muted icon
else
echo "speakerOn" # high volume
fi

View File

@@ -0,0 +1,10 @@
mute=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | tr -d '%')
if [[ "$mute" == "yes" ]]; then
echo "" # muted icon
elif [[ "$volume" -le 100 ]]; then
echo "" # low volume
else
echo "" # high volume
fi

View File

@@ -0,0 +1,4 @@
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | tr -d '%')
half_volume=$((volume / 2))
echo "$half_volume"

View File

@@ -1,4 +0,0 @@
tail -F /tmp/xmonad-eww-log | while read -r line; do
clean_line=$(echo "$line" | sed -E 's/<[^>]+>//g')
eww update xmonad_log="$clean_line"
done

View File

@@ -0,0 +1,19 @@
line=$(cat /tmp/xmonad-eww-log)
IFS='|' read -r workspaces windows <<<"$line"
# Workspaces
workspaceArray=($workspaces)
i=0
for ws in "${workspaceArray[@]}"; do
i=$((i + 1))
if [[ "$ws" == [\[]* ]]; then
eww update ws$i="ws-current"
elif [[ "$ws" == [\(]* ]]; then
eww update ws$i="ws-visible"
elif [[ "$ws" == [\{]* ]]; then
eww update ws$i="ws-hidden"
else
eww update ws$i="ws-empty"
fi
done
# Windows
echo "${windows}"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 MiB

View File

@@ -10,10 +10,6 @@ in {
nerd-fonts.jetbrains-mono nerd-fonts.jetbrains-mono
texliveFull texliveFull
clang-tools clang-tools
<<<<<<< HEAD
=======
vimPlugins.catppuccin-nvim
>>>>>>> test
]; ];
programs.neovim = { programs.neovim = {
@@ -34,6 +30,7 @@ in {
cmp_luasnip cmp_luasnip
conform-nvim conform-nvim
conjure conjure
comment-nvim
dropbar-nvim dropbar-nvim
friendly-snippets friendly-snippets
lazy-nvim lazy-nvim
@@ -95,11 +92,7 @@ in {
neovim-remote neovim-remote
# Nix # Nix
nixd nixd
<<<<<<< HEAD
nixfmt-classic
=======
nixfmt-rfc-style nixfmt-rfc-style
>>>>>>> test
# Rust # Rust
rust-analyzer rust-analyzer
# Bash # Bash

View File

@@ -29,11 +29,7 @@ return {
markdown = { "prettierd" }, markdown = { "prettierd" },
json = { "prettierd" }, json = { "prettierd" },
yaml = { "prettierd" }, yaml = { "prettierd" },
<<<<<<< HEAD
nix = { "nixfmt-classic" },
=======
nix = { "nixfmt-rfc-style" }, nix = { "nixfmt-rfc-style" },
>>>>>>> test
tex = { "latexindent" }, tex = { "latexindent" },
c = { "clang_format" }, c = { "clang_format" },
cpp = { "clang_format" }, cpp = { "clang_format" },
@@ -55,7 +51,6 @@ return {
}, },
clang_format = { clang_format = {
prepend_args = { prepend_args = {
"--style=file:./.clang-format",
"--fallback-style=LLVM", "--fallback-style=LLVM",
}, },
}, },

View File

@@ -19,7 +19,7 @@ import XMonad.Util.SpawnOnce (spawnOnce)
import XMonad.Hooks.ManageHelpers import XMonad.Hooks.ManageHelpers
main = do main = do
xmonad . ewmhFullscreen . ewmh $ myConfig xmonad . docks . ewmhFullscreen . ewmh $ myConfig
myConfig = myConfig =
def def
@@ -50,16 +50,15 @@ myKeys =
, ("M-c", spawn "firefox") , ("M-c", spawn "firefox")
, ("M-y", spawn "signal-desktop") , ("M-y", spawn "signal-desktop")
, ("M-x", spawn "telegram-desktop") , ("M-x", spawn "telegram-desktop")
, ("M-c", spawn "firefox")
, ("M-v", spawn "thunderbird") , ("M-v", spawn "thunderbird")
, -- Brightness , -- Brightness
("<XF86MonBrightnessUp>", spawn "xbacklight -inc 10") ("<XF86MonBrightnessUp>", spawn "xbacklight -inc 10")
, ("<XF86MonBrightnessDown>", spawn "xbacklight -dec 10") , ("<XF86MonBrightnessDown>", spawn "xbacklight -dec 10")
, -- Audio , -- Audio
("<XF86AudioMute>", spawn "pulseaudio-ctl mute") ("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle")
, ("<XF86AudioRaiseVolume>", spawn "pulseaudio-ctl up 5") , ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +10%")
, ("<XF86AudioLowerVolume>", spawn "pulseaudio-ctl down 5") , ("<XF86AudioLowerVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ -10%")
, ("<XF86AudioMicMute>", spawn "pulseaudio-ctl mute-input") , ("<XF86AudioMicMute>", spawn "pactl set-source-mute @DEFAULT_SOURCE@ toggle")
] ]
-- `removeKeysP` [ "M-S-q" ] -- `removeKeysP` [ "M-S-q" ]
@@ -69,18 +68,18 @@ myXmobarPP =
def def
{ ppOutput = \str -> do { ppOutput = \str -> do
writeFile "/tmp/xmonad-eww-log" str writeFile "/tmp/xmonad-eww-log" str
, ppCurrent = wrap "[[" "]]" , ppCurrent = wrap "[" "]"
, ppVisible = wrap "(" ")" , ppVisible = wrap "(" ")"
, ppHidden = wrap " " " " , ppHidden = wrap "{" "}"
, ppHiddenNoWindows = id , ppHiddenNoWindows = id
, ppUrgent = wrap "!" "!" , ppUrgent = wrap "!" "!"
, ppSep = " " , ppSep = "|"
, ppOrder = \(ws : _ : _ : wins : _) -> [ws, wins] , ppOrder = \(ws : _ : _ : wins : _) -> [ws, wins]
, ppExtras = [logTitles formatFocused formatUnfocused] , ppExtras = [logTitles formatFocused formatUnfocused]
} }
where where
formatFocused = wrap "*" "*" . ppWindow formatFocused = wrap "(" ")" . ppWindow
formatUnfocused = id . ppWindow formatUnfocused = wrap "[" "]" . ppWindow
ppWindow :: String -> String ppWindow :: String -> String
ppWindow w = if null w then "???" else take 30 w ppWindow w = if null w then "???" else take 30 w
@@ -97,5 +96,5 @@ myManageHooks =
myStartupHook :: X () myStartupHook :: X ()
myStartupHook = do myStartupHook = do
spawnOnce "nextcloud --background" spawnOnce "nextcloud --background"
spawnOnce "trayer --edge top --align left --widthtype request --height 25 --transparent true --alpha 0 --expand false --SetDockType true --SetPartialStrut true --monitor primary &" spawnOnce "trayer --edge top --align left --widthtype request --height 25 --transparent true --alpha 0 --expand true --SetDockType true --SetPartialStrut true"
spawnOnce "eww open bar" spawnOnce "eww open bar"

View File

@@ -28,7 +28,7 @@
path = "${config.xdg.dataHome}/zsh/zsh_history"; path = "${config.xdg.dataHome}/zsh/zsh_history";
}; };
syntaxHighlighting = { enable = true; }; syntaxHighlighting = { enable = true; };
initExtra = '' initContent = ''
export LD_LIBRARY_PATH="/nix/store/yjm4j9n85bcp42v5nkz2xifrp4a9s63k-sqlite-3.46.1/lib"o export LD_LIBRARY_PATH="/nix/store/yjm4j9n85bcp42v5nkz2xifrp4a9s63k-sqlite-3.46.1/lib"o
export CHROME_EXECUTABLE="/run/current-system/sw/bin/google-chrome-stable" export CHROME_EXECUTABLE="/run/current-system/sw/bin/google-chrome-stable"
neofetch neofetch

View File

@@ -3,11 +3,7 @@ final: prev: {
src = prev.fetchurl { src = prev.fetchurl {
url = old.src.url; url = old.src.url;
<<<<<<< HEAD
hash = "sha256-bvmvzVyHrjh1Yj3JxEfry521CMX3E2GENmXddEeLwiE=";
=======
hash = "sha256-XVq0nQiyT2HvKQpzJIvhghsGgg4ye7uqZcyA1nH4O/o="; hash = "sha256-XVq0nQiyT2HvKQpzJIvhghsGgg4ye7uqZcyA1nH4O/o=";
>>>>>>> test
}; };
}); });
} }