mirror of
https://git.sr.ht/~coasteen/dotfiles
synced 2025-11-04 14:47:38 +01:00
Compare commits
5 commits
faa09ea0c7
...
17aa75afde
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17aa75afde | ||
|
|
4edcbfe72b | ||
|
|
584132a2d5 | ||
|
|
c727bdb8ff | ||
|
|
bffc03201b |
13 changed files with 572 additions and 425 deletions
|
|
@ -4,7 +4,11 @@ pad=8x8
|
||||||
[colors]
|
[colors]
|
||||||
#foreground=ebdbb2 # light foreground (text)
|
#foreground=ebdbb2 # light foreground (text)
|
||||||
alpha=0.9
|
alpha=0.9
|
||||||
|
<<<<<<< HEAD
|
||||||
background=000000 # dark background
|
background=000000 # dark background
|
||||||
|
=======
|
||||||
|
background=111111 # dark background
|
||||||
|
>>>>>>> bd52954 (repush)
|
||||||
#
|
#
|
||||||
### Normal/regular colors (color palette 0-7)
|
### Normal/regular colors (color palette 0-7)
|
||||||
#regular0=1d2021 # black
|
#regular0=1d2021 # black
|
||||||
|
|
|
||||||
|
|
@ -1,89 +1,98 @@
|
||||||
// -*- mode: jsonc -*-
|
|
||||||
{
|
{
|
||||||
"layer": "bottom",
|
"layer": "top",
|
||||||
"position": "bottom",
|
|
||||||
"height": 30,
|
|
||||||
"spacing": 4,
|
|
||||||
|
|
||||||
// Choose the order of the modules
|
|
||||||
"modules-left": [
|
"modules-left": [
|
||||||
"hyprland/workspaces",
|
"sway/workspaces",
|
||||||
"custom/sep",
|
"sway/window"
|
||||||
"hyprland/window",
|
],
|
||||||
|
"modules-center": [
|
||||||
],
|
],
|
||||||
|
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"battery",
|
"pulseaudio",
|
||||||
"cpu",
|
|
||||||
"memory",
|
|
||||||
// "disk",
|
|
||||||
"clock",
|
"clock",
|
||||||
"tray"
|
"network"
|
||||||
|
//"bluetooth"
|
||||||
],
|
],
|
||||||
|
"pulseaudio": {
|
||||||
// Modules configuration
|
"tooltip": false,
|
||||||
"hyprland/workspaces": {
|
"scroll-step": 5,
|
||||||
"disable-scroll": true,
|
"format": "VOL {volume}%",
|
||||||
"all-outputs": true,
|
"format-muted": "muted",
|
||||||
"warp-on-scroll": false,
|
"on-click": "~/.config/dunst/volume.sh mute",
|
||||||
"format": "{name}",
|
"format-icons": {
|
||||||
"persistent-workspaces": {
|
"default": [
|
||||||
"1": "1",
|
"",
|
||||||
"2": "2",
|
"",
|
||||||
"3": "3",
|
""
|
||||||
"4": "4",
|
]
|
||||||
"5": "5",
|
}
|
||||||
"6": "6",
|
},
|
||||||
"7": "7",
|
"privacy": {
|
||||||
"8": "8",
|
"icon-spacing": 10,
|
||||||
"9": "9",
|
"icon-size": 18,
|
||||||
|
"transition-duration": 250,
|
||||||
|
"tooltip": false,
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"type": "screenshare",
|
||||||
|
"tooltip": true,
|
||||||
|
"tooltip-icon-size": 24
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "audio-out",
|
||||||
|
"tooltip": true,
|
||||||
|
"tooltip-icon-size": 24
|
||||||
},
|
},
|
||||||
"hyprland/window" : {
|
{
|
||||||
"max-length": 40,
|
"type": "audio-in",
|
||||||
"seperate-outputs": false
|
"tooltip": true,
|
||||||
|
"tooltip-icon-size": 24
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"tray": {
|
"bluetooth": {
|
||||||
// "icon-size": 21,
|
"format": " {status}",
|
||||||
"spacing": 10
|
"format-connected": " conn",
|
||||||
// "icons": {
|
"tooltip": true,
|
||||||
// "blueman": "bluetooth",
|
"tooltip-format-connected": "{device_alias}"
|
||||||
// "TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png"
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
"clock": {
|
"clock": {
|
||||||
"format": "{:%I:%M %p}",
|
"format": "TIME {:%H:%M}",
|
||||||
"format-alt": "{:%Y-%m-%d %I:%M %p}"
|
"tooltip": true,
|
||||||
|
"tooltip-format": "{:%a, %b %d}"
|
||||||
},
|
},
|
||||||
"cpu": {
|
"sway/workspaces": {
|
||||||
"format": "CPU: {usage}%",
|
"format": "●"
|
||||||
"tooltip": false
|
|
||||||
},
|
},
|
||||||
"memory": {
|
"sway/window": {
|
||||||
"format": "MEM: {used}GiB"
|
"icon": false,
|
||||||
|
"icon-size": 20
|
||||||
},
|
},
|
||||||
"disk": {
|
"network": {
|
||||||
"interval": 60,
|
"interface": "eno1",
|
||||||
"path": "/",
|
"format-wifi": "WLAN {essid}",
|
||||||
"format": "DISK: {free} (free)"
|
"format-ethernet": "ETH {ipaddr}/{cidr}",
|
||||||
|
"format-disconnected": "disconnected",
|
||||||
|
"tooltip": false,
|
||||||
|
"max-length": 50
|
||||||
},
|
},
|
||||||
"battery": {
|
"battery": {
|
||||||
|
"format": "{icon}: {capacity}%",
|
||||||
|
"interval": 10,
|
||||||
"states": {
|
"states": {
|
||||||
"good": 95,
|
"warning": 20,
|
||||||
"warning": 30,
|
"critical": 10
|
||||||
"critical": 15
|
|
||||||
},
|
|
||||||
"format": "BAT: {capacity}%{time}",
|
|
||||||
"format-plugged": "",
|
|
||||||
"format-alt": "Bat {capacity}%",
|
|
||||||
"format-time": "{H}:{M}",
|
|
||||||
},
|
},
|
||||||
"network": {
|
"format-time": "{H}:{m}",
|
||||||
"format": "Online",
|
"format-icons": [
|
||||||
"format-disconnected": "Disconnected ⚠"
|
"",
|
||||||
},
|
"",
|
||||||
"custom/sep": {
|
"",
|
||||||
"format" : " ",
|
"",
|
||||||
"interval" : 0
|
""
|
||||||
|
],
|
||||||
|
"format-charging": "{icon} +: {capacity}%",
|
||||||
|
"format-discharging": "{icon} -: {capacity}%",
|
||||||
|
"tooltip-format": "{power}W, {cycles} cycles"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,117 +1,85 @@
|
||||||
@define-color bg #1c1c1c;
|
@define-color border #6f3913;
|
||||||
@define-color fg #B0B0B0;
|
|
||||||
@define-color blk #000000;
|
|
||||||
@define-color white #ffffff;
|
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font-family: "UbuntuMono", monospace;
|
border: none;
|
||||||
font-size: 18px;
|
font-family: "MapleMono";
|
||||||
font-weight: bold;
|
font-size: 15px;
|
||||||
}
|
min-height: 10px;
|
||||||
|
|
||||||
button,
|
|
||||||
#workspaces button,
|
|
||||||
#clock,
|
|
||||||
#battery,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#disk,
|
|
||||||
#network,
|
|
||||||
#tray {
|
|
||||||
transition-property: none;
|
|
||||||
animation: none;
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background-color: @bg;
|
|
||||||
color: @fg;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
padding: 0 6px;
|
|
||||||
color: @fg;
|
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-bottom: 3px solid @bg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#disk,
|
||||||
color: @fg;
|
#pulseaudio,
|
||||||
border-bottom: 3px solid @fg;
|
#window,
|
||||||
}
|
#clock,
|
||||||
|
#network,
|
||||||
#workspaces button.empty {
|
#battery,
|
||||||
color: @fg;
|
#privacy,
|
||||||
|
#memory,
|
||||||
|
#cpu,
|
||||||
|
#workspaces,
|
||||||
|
#tray,
|
||||||
|
#bluetooth,
|
||||||
|
#tray menu {
|
||||||
|
padding: 8px 10px 8px 10px;
|
||||||
|
margin: 5px 0 0 10px;
|
||||||
|
background: #111111;
|
||||||
|
color: #cccccc;
|
||||||
|
transition: 0.3s;
|
||||||
|
border: 2px solid @border;
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.empty.active {
|
#window {
|
||||||
color: @fg;
|
transition: none;
|
||||||
border-bottom: 3px solid @fg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
window#waybar.empty #window {
|
||||||
background-color: @blk;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Disable hover effects completely */
|
|
||||||
button:hover,
|
|
||||||
#workspaces button:hover {
|
|
||||||
background: transparent;
|
background: transparent;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
color: inherit;
|
border: none;
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
|
||||||
#custom-sep,
|
|
||||||
#battery,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#disk,
|
|
||||||
#network,
|
|
||||||
#tray {
|
|
||||||
padding: 0 8px;
|
|
||||||
color: @white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-sep {
|
|
||||||
color: @fg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
color: @fg;
|
margin: 5px 0 0 15px;
|
||||||
border-bottom: 4px solid @fg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#battery {
|
#network {
|
||||||
color: @fg;
|
margin: 5px 15px 0 10px;
|
||||||
border-bottom: 4px solid @fg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#disk {
|
#workspaces {
|
||||||
color: @fg;
|
padding-top: 0;
|
||||||
border-bottom: 4px solid @fg;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#memory {
|
#workspaces button {
|
||||||
color: @fg;
|
margin: 0;
|
||||||
border-bottom: 4px solid @fg;
|
padding: 2px;
|
||||||
|
color: #cccccc;
|
||||||
|
transition: color 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu {
|
#workspaces button.empty {
|
||||||
color: @fg;
|
color: #2e2e2e;
|
||||||
border-bottom: 4px solid @fg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#network {
|
#workspaces button.active {
|
||||||
color: @fg;
|
color: #ffffff;
|
||||||
border-bottom: 4px solid @fg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#network.disconnected {
|
#workspaces button.urgent {
|
||||||
background-color: @blk;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray {
|
#workspaces button:hover {
|
||||||
background-color: @bg;
|
background: transparent;
|
||||||
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
{ pkgs, pkgsUnstable, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
unstable = pkgsUnstable;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ ./hardware-configuration.nix ];
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
readOnlyNixStore = true;
|
|
||||||
initrd.compressor = "zstd";
|
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
loader.systemd-boot.editor = false;
|
|
||||||
loader.systemd-boot.configurationLimit = 25;
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
kernelParams = [ "nvidia_drm" "nvidia_modeset" "nvidia_uvm" "nvidia-drm.fbdev=1" "nvidia" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "core";
|
|
||||||
networking.enableIPv6 = false;
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
time.timeZone = "Asia/Tehran";
|
|
||||||
|
|
||||||
hardware = {
|
|
||||||
graphics.enable = true;
|
|
||||||
nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = true;
|
|
||||||
open = false;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
package = pkgs.linuxPackages.nvidiaPackages.beta;
|
|
||||||
prime.offload = {
|
|
||||||
enable = true;
|
|
||||||
enableOffloadCmd = true;
|
|
||||||
};
|
|
||||||
prime = {
|
|
||||||
intelBusId = "PCI:0:2:0";
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
bluetooth.enable = true;
|
|
||||||
bluetooth.powerOnBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
security = {
|
|
||||||
sudo.enable = false;
|
|
||||||
sudo-rs.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
(lib.hiPrio unstable.uutils-coreutils-noprefix)
|
|
||||||
(lib.hiPrio unstable.uutils-findutils)
|
|
||||||
(lib.hiPrio unstable.uutils-diffutils)
|
|
||||||
(pkgs.runCommand "vim-wrapper" { } ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
ln -s ${pkgs.neovim}/bin/nvim $out/bin/vim
|
|
||||||
'')
|
|
||||||
unstable.firefox
|
|
||||||
unstable.git
|
|
||||||
unstable.adwaita-icon-theme
|
|
||||||
unstable.nil
|
|
||||||
jmtpfs
|
|
||||||
simple-mtpfs
|
|
||||||
android-tools
|
|
||||||
unstable.qbittorrent
|
|
||||||
unstable.zathura
|
|
||||||
unstable.kew
|
|
||||||
];
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
}
|
|
||||||
126
etc/nixos/configuration/configuration.nix
Normal file
126
etc/nixos/configuration/configuration.nix
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
pkgsUnstable,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
unstable = pkgsUnstable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
videoDrivers = ["modesetting" "nvidia"];
|
||||||
|
};
|
||||||
|
|
||||||
|
displayManager.ly.enable = true;
|
||||||
|
blueman.enable = false;
|
||||||
|
printing.enable = false;
|
||||||
|
pipewire = {
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
readOnlyNixStore = true;
|
||||||
|
initrd.compressor = "zstd";
|
||||||
|
loader = {
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
editor = false;
|
||||||
|
configurationLimit = 25;
|
||||||
|
};
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
kernelParams = [
|
||||||
|
"nvidia_drm"
|
||||||
|
"nvidia_modeset"
|
||||||
|
"nvidia_uvm"
|
||||||
|
"nvidia-drm.fbdev=1"
|
||||||
|
"nvidia"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostName = "gloria";
|
||||||
|
networking.enableIPv6 = false;
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
time.timeZone = "Asia/Tehran";
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
graphics.enable = true;
|
||||||
|
nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = pkgs.linuxPackages.nvidiaPackages.beta;
|
||||||
|
prime.offload = {
|
||||||
|
enable = true;
|
||||||
|
enableOffloadCmd = true;
|
||||||
|
};
|
||||||
|
prime = {
|
||||||
|
intelBusId = "PCI:0:2:0";
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
bluetooth.enable = true;
|
||||||
|
bluetooth.powerOnBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.sudo.enable = false;
|
||||||
|
security.sudo-rs.enable = true;
|
||||||
|
|
||||||
|
virtualisation.waydroid.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# (lib.hiPrio unstable.uutils-coreutils-noprefix)
|
||||||
|
# (lib.hiPrio unstable.uutils-findutils)
|
||||||
|
# (lib.hiPrio unstable.uutils-diffutils)
|
||||||
|
(pkgs.runCommand "vim-wrapper" { } ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s ${pkgs.neovim}/bin/nvim $out/bin/vim
|
||||||
|
'')
|
||||||
|
unstable.firefox
|
||||||
|
unstable.git
|
||||||
|
unstable.adwaita-icon-theme
|
||||||
|
unstable.nil
|
||||||
|
jmtpfs
|
||||||
|
android-tools
|
||||||
|
unstable.qbittorrent
|
||||||
|
unstable.zathura
|
||||||
|
unstable.rofi
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
users.users.coast = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
zsh.enable = true;
|
||||||
|
zsh.syntaxHighlighting.enable = true;
|
||||||
|
foot.enable = true;
|
||||||
|
nano.enable = false;
|
||||||
|
nekoray.enable = true;
|
||||||
|
nekoray.tunMode.enable = true;
|
||||||
|
sway.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
ubuntu-sans
|
||||||
|
ubuntu_font_family
|
||||||
|
nerd-fonts._0xproto
|
||||||
|
nerd-fonts.droid-sans-mono
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
vazir-fonts
|
||||||
|
];
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
services.openssh.enable = true;
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
48
etc/nixos/configuration/sys/coreutils-configuration.nix
Normal file
48
etc/nixos/configuration/sys/coreutils-configuration.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
coreutils-full-name = "coreuutils-full" + builtins.concatStringsSep ""
|
||||||
|
(builtins.genList (_: "_") (builtins.stringLength pkgs.coreutils-full.version));
|
||||||
|
|
||||||
|
coreutils-name = "coreuutils" + builtins.concatStringsSep ""
|
||||||
|
(builtins.genList (_: "_") (builtins.stringLength pkgs.coreutils.version));
|
||||||
|
|
||||||
|
findutils-name = "finduutils" + builtins.concatStringsSep ""
|
||||||
|
(builtins.genList (_: "_") (builtins.stringLength pkgs.findutils.version));
|
||||||
|
|
||||||
|
diffutils-name = "diffuutils" + builtins.concatStringsSep ""
|
||||||
|
(builtins.genList (_: "_") (builtins.stringLength pkgs.diffutils.version));
|
||||||
|
in
|
||||||
|
{
|
||||||
|
system.replaceDependencies.replacements = [
|
||||||
|
{
|
||||||
|
oldDependency = pkgs.coreutils-full;
|
||||||
|
newDependency = pkgs.symlinkJoin {
|
||||||
|
name = coreutils-full-name;
|
||||||
|
paths = [pkgs.uutils-coreutils-noprefix];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
oldDependency = pkgs.coreutils;
|
||||||
|
newDependency = pkgs.symlinkJoin {
|
||||||
|
name = coreutils-name;
|
||||||
|
paths = [pkgs.uutils-coreutils-noprefix];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
oldDependency = pkgs.findutils;
|
||||||
|
newDependency = pkgs.symlinkJoin {
|
||||||
|
name = findutils-name;
|
||||||
|
paths = [pkgs.uutils-findutils];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
oldDependency = pkgs.diffutils;
|
||||||
|
newDependency = pkgs.symlinkJoin {
|
||||||
|
name = diffutils-name;
|
||||||
|
paths = [pkgs.uutils-diffutils];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
|
|
||||||
services = {
|
|
||||||
xserver = {
|
|
||||||
enable = true;
|
|
||||||
videoDrivers = ["modesetting" "nvidia"];
|
|
||||||
windowManager.qtile.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
displayManager.ly.enable = true;
|
|
||||||
blueman.enable = false;
|
|
||||||
printing.enable = false;
|
|
||||||
#pipewire
|
|
||||||
pipewire = {
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
users.users.coast = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
zsh.enable = true;
|
|
||||||
zsh.syntaxHighlighting.enable = true;
|
|
||||||
foot.enable = true;
|
|
||||||
nano.enable = false;
|
|
||||||
nekoray.enable = true;
|
|
||||||
nekoray.tunMode.enable = true;
|
|
||||||
sway.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
ubuntu-sans
|
|
||||||
ubuntu_font_family
|
|
||||||
nerd-fonts._0xproto
|
|
||||||
nerd-fonts.droid-sans-mono
|
|
||||||
nerd-fonts.jetbrains-mono
|
|
||||||
vazir-fonts
|
|
||||||
];
|
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
system.stateVersion = "25.05";
|
|
||||||
}
|
|
||||||
12
etc/nixos/flake.lock
generated
12
etc/nixos/flake.lock
generated
|
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759439645,
|
"lastModified": 1761597516,
|
||||||
"narHash": "sha256-oiAyQaRilPk525Z5aTtTNWNzSrcdJ7IXM0/PL3CGlbI=",
|
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "879bd460b3d3e8571354ce172128fbcbac1ed633",
|
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -39,11 +39,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759381078,
|
"lastModified": 1761672384,
|
||||||
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
|
"narHash": "sha256-o9KF3DJL7g7iYMZq9SWgfS1BFlNbsm6xplRjVlOCkXI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
|
"rev": "08dacfca559e1d7da38f3cf05f1f45ee9bfd213c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "Flakes once again";
|
description = "Flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||||
|
|
@ -8,8 +8,7 @@
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }:
|
outputs = { nixpkgs, nixpkgs-unstable, home-manager, ... }: let
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
@ -18,16 +17,24 @@
|
||||||
pkgsUnstable = import nixpkgs-unstable { inherit system; };
|
pkgsUnstable = import nixpkgs-unstable { inherit system; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations.core = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.gloria = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
./create.nix
|
(import ./configuration/configuration.nix { inherit pkgs pkgsUnstable; })
|
||||||
(import ./compose.nix { inherit pkgs pkgsUnstable; })
|
./configuration/sys/coreutils-configuration.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager = {
|
||||||
home-manager.useUserPackages = true;
|
useGlobalPkgs = true;
|
||||||
home-manager.users.coast = import ./home.nix;
|
useUserPackages = true;
|
||||||
home-manager.backupFileExtension = "home-backup";
|
backupFileExtension = "home-backup";
|
||||||
|
users.coast = { ... }: {
|
||||||
|
imports = [
|
||||||
|
./home-configuration/configuration.nix
|
||||||
|
./home-configuration/apps/sway.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
92
etc/nixos/home-configuration/apps/sway.nix
Normal file
92
etc/nixos/home-configuration/apps/sway.nix
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
left = "h";
|
||||||
|
down = "j";
|
||||||
|
up = "k";
|
||||||
|
right = "l";
|
||||||
|
|
||||||
|
modifier = "Mod4";
|
||||||
|
terminal = "${pkgs.foot}/bin/footclient";
|
||||||
|
menu = "${pkgs.wmenu}/bin/wmenu-run";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
extraConfig = ''
|
||||||
|
exec swaymsg workspace 1
|
||||||
|
default_border pixel 2
|
||||||
|
default_floating_border pixel 2
|
||||||
|
for_window [class=".*"] border pixel 2
|
||||||
|
|
||||||
|
client.focused #6f3913 #6f3913 #cccccc #6f3913 #6f3913
|
||||||
|
client.focused_inactive #1c1c1c #111111 #cccccc #1c1c1c #111111
|
||||||
|
client.unfocused #1c1c1c #111111 #888888 #1c1c1c #111111
|
||||||
|
client.urgent #6f3913 #111111 #ffffff #6f3913 #111111
|
||||||
|
'';
|
||||||
|
config = {
|
||||||
|
modifier = "Mod4";
|
||||||
|
gaps = {
|
||||||
|
inner = 5;
|
||||||
|
outer = 5;
|
||||||
|
};
|
||||||
|
bars = [];
|
||||||
|
output.eDP-1.disable = "";
|
||||||
|
keybindings = {
|
||||||
|
"${modifier}+Return" = "exec ${terminal}";
|
||||||
|
"${modifier}+Shift+Return" = "exec rofi -show drun";
|
||||||
|
"${modifier}+r" = "exec ${menu} -l 10";
|
||||||
|
"${modifier}+s" = "kill";
|
||||||
|
"${modifier}+Print" = "exec /home/coast/.local/src/local/bin/screenie-wlr";
|
||||||
|
"${modifier}+1" = "workspace 1";
|
||||||
|
"${modifier}+2" = "workspace 2";
|
||||||
|
"${modifier}+3" = "workspace 3";
|
||||||
|
"${modifier}+4" = "workspace 4";
|
||||||
|
"${modifier}+5" = "workspace 5";
|
||||||
|
"${modifier}+6" = "workspace 6";
|
||||||
|
"${modifier}+7" = "workspace 7";
|
||||||
|
"${modifier}+8" = "workspace 8";
|
||||||
|
"${modifier}+9" = "workspace 9";
|
||||||
|
"${modifier}+Shift+1" = "move container to workspace 1";
|
||||||
|
"${modifier}+Shift+2" = "move container to workspace 2";
|
||||||
|
"${modifier}+Shift+3" = "move container to workspace 3";
|
||||||
|
"${modifier}+Shift+4" = "move container to workspace 4";
|
||||||
|
"${modifier}+Shift+5" = "move container to workspace 5";
|
||||||
|
"${modifier}+Shift+6" = "move container to workspace 6";
|
||||||
|
"${modifier}+Shift+7" = "move container to workspace 7";
|
||||||
|
"${modifier}+Shift+8" = "move container to workspace 8";
|
||||||
|
"${modifier}+Shift+9" = "move container to workspace 9";
|
||||||
|
"${modifier}+h" = "focus left";
|
||||||
|
"${modifier}+j" = "focus down";
|
||||||
|
"${modifier}+k" = "focus up";
|
||||||
|
"${modifier}+l" = "focus right";
|
||||||
|
"${modifier}+Shift+i" = "exec caja";
|
||||||
|
"${modifier}+Shift+r" = "reload";
|
||||||
|
"${modifier}+Shift+q" = "exit";
|
||||||
|
"${modifier}+Shift+v" = "exec vesktop --ozone-platform=wayland";
|
||||||
|
"${modifier}+Shift+p" = "exec /home/coast/.local/src/local/bin/setwall.py";
|
||||||
|
"${modifier}+Shift+d" = "mode 'resize'";
|
||||||
|
"${modifier}+space" = "floating toggle";
|
||||||
|
};
|
||||||
|
modes = {
|
||||||
|
resize = {
|
||||||
|
${left} = "resize shrink width 10 px";
|
||||||
|
${down} = "resize grow height 10 px";
|
||||||
|
${up} = "resize shrink height 10 px";
|
||||||
|
${right} = "resize grow width 10 px";
|
||||||
|
|
||||||
|
"Escape" = "mode default";
|
||||||
|
"Return" = "mode default";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
startup = [
|
||||||
|
{ command = "autotiling"; }
|
||||||
|
{ command = "/home/coast/.local/src/local/bin/setwall.py/"; always = true; }
|
||||||
|
{ command = "waybar"; }
|
||||||
|
{ command = "foot -s"; always = true; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
127
etc/nixos/home-configuration/configuration.nix
Normal file
127
etc/nixos/home-configuration/configuration.nix
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
dotDir = "${config.home.homeDirectory}/.local/src/config/";
|
||||||
|
mkSl = path: config.lib.file.mkOutOfStoreSymlink path;
|
||||||
|
configs = {
|
||||||
|
kitty = "kitty";
|
||||||
|
foot = "foot";
|
||||||
|
qtile = "qtile";
|
||||||
|
mako = "mako";
|
||||||
|
nvim = "nvim";
|
||||||
|
eww = "eww";
|
||||||
|
waybar = "waybar";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
xdg.configFile = builtins.mapAttrs (name: subpath: {
|
||||||
|
source = mkSl "${dotDir}/${subpath}";
|
||||||
|
recursive = true;
|
||||||
|
}) configs;
|
||||||
|
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "coast";
|
||||||
|
homeDirectory = "/home/coast";
|
||||||
|
stateVersion = "25.05";
|
||||||
|
packages = with pkgs; [
|
||||||
|
alsa-utils
|
||||||
|
nix-search-cli
|
||||||
|
neofetch
|
||||||
|
dysk
|
||||||
|
tree
|
||||||
|
wl-clipboard
|
||||||
|
appimage-run
|
||||||
|
libnotify
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
yazi
|
||||||
|
mate.caja
|
||||||
|
htop
|
||||||
|
nixpkgs-fmt
|
||||||
|
swaybg
|
||||||
|
wmenu
|
||||||
|
mako
|
||||||
|
nwg-look
|
||||||
|
xorg.xkill
|
||||||
|
mpv
|
||||||
|
vesktop
|
||||||
|
wlr-randr
|
||||||
|
autotiling
|
||||||
|
nodejs
|
||||||
|
gcc_multi
|
||||||
|
gnumake
|
||||||
|
clang-tools
|
||||||
|
ruby_3_4
|
||||||
|
pkg-config
|
||||||
|
dmd
|
||||||
|
dtools
|
||||||
|
rustup
|
||||||
|
python3
|
||||||
|
python313Packages.pip
|
||||||
|
unzip
|
||||||
|
zip
|
||||||
|
go
|
||||||
|
tauon
|
||||||
|
gimp
|
||||||
|
waybar
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userEmail = "coasteen@proton.me";
|
||||||
|
userName = "coast";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
history = {
|
||||||
|
path = "/home/coast/.cache/zsh/history";
|
||||||
|
size = 100000000;
|
||||||
|
save = 100000000;
|
||||||
|
append = true;
|
||||||
|
};
|
||||||
|
enableCompletion = true;
|
||||||
|
shellAliases = {
|
||||||
|
nf = "neofetch";
|
||||||
|
nrs = "sudo nixos-rebuild switch";
|
||||||
|
emoji = "cat ~/.local/src/local/share/emoji | grep";
|
||||||
|
ls = "ls --color=auto";
|
||||||
|
smi = "nvidia-smi";
|
||||||
|
battery = "sb-battery";
|
||||||
|
weather = "curl wttr.in/masjedsoleyman";
|
||||||
|
las = "ls";
|
||||||
|
c = "clear";
|
||||||
|
cear = "clear";
|
||||||
|
".." = "cd ..";
|
||||||
|
hotp = "htop";
|
||||||
|
main = "man";
|
||||||
|
mian = "man";
|
||||||
|
mna = "man";
|
||||||
|
delgen = "sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system";
|
||||||
|
alsamixer = "alsamixer -c 0 --no-color";
|
||||||
|
la = "ls --color=auto -la";
|
||||||
|
sidp = "sudo";
|
||||||
|
suod = "sudo";
|
||||||
|
sduo = "sudo";
|
||||||
|
sd = "sudo";
|
||||||
|
};
|
||||||
|
initContent = ''
|
||||||
|
autoload -U compinit
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
zmodload zsh/complist
|
||||||
|
compinit
|
||||||
|
comp_options+=(globdots)
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
||||||
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=12"
|
||||||
|
autoload -U colors && colors && setopt prompt_subst
|
||||||
|
source ~/.local/src/zsh.d/zsh-autosuggestions.zsh
|
||||||
|
export PATH="/usr/bin:$PATH"
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
EDITOR=vim
|
||||||
|
PS1="[%n in %m %~] "
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,132 +0,0 @@
|
||||||
{ config, pkgs, ... }: let
|
|
||||||
dotDir = "${config.home.homeDirectory}/.local/src/config/";
|
|
||||||
mkSl = path: config.lib.file.mkOutOfStoreSymlink path;
|
|
||||||
configs = {
|
|
||||||
kitty = "kitty";
|
|
||||||
foot = "foot";
|
|
||||||
qtile = "qtile";
|
|
||||||
mako = "mako";
|
|
||||||
nvim = "nvim";
|
|
||||||
eww = "eww";
|
|
||||||
};
|
|
||||||
modifier = "Mod4";
|
|
||||||
terminal = "${pkgs.wezterm}/bin/wezterm";
|
|
||||||
menu = "${pkgs.wmenu}/bin/wmenu-run";
|
|
||||||
in {
|
|
||||||
home.username = "coast";
|
|
||||||
home.homeDirectory = "/home/coast";
|
|
||||||
home.stateVersion = "25.05";
|
|
||||||
|
|
||||||
xdg.configFile = builtins.mapAttrs (name: subpath: { source = mkSl "${dotDir}/${subpath}"; recursive = true; }) configs;
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
alsa-utils nix-search-cli neofetch dysk nsxiv tree wl-clipboard appimage-run libnotify grim slurp yazi mate.caja htop nixpkgs-fmt
|
|
||||||
swaybg wmenu mako nwg-look xorg.xkill
|
|
||||||
mpv vesktop wlr-randr autotiling wezterm
|
|
||||||
nodejs gcc_multi gnumake clang-tools ruby_3_4 pkg-config dmd dtools rustup python3 python313Packages.pip texliveMedium unzip zip
|
|
||||||
];
|
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
|
||||||
enable = true;
|
|
||||||
wrapperFeatures.gtk = true;
|
|
||||||
config = {
|
|
||||||
modifier = "Mod4";
|
|
||||||
gaps = {
|
|
||||||
inner = 5;
|
|
||||||
outer = 10;
|
|
||||||
};
|
|
||||||
output.eDP-1.disable = "";
|
|
||||||
keybindings = {
|
|
||||||
"${modifier}+Return" = "exec ${terminal}";
|
|
||||||
"${modifier}+r" = "exec ${menu} -l 10";
|
|
||||||
"${modifier}+s" = "kill";
|
|
||||||
"${modifier}+Print" = "exec /home/coast/.local/src/local/bin/screenie-wlr";
|
|
||||||
"${modifier}+1" = "workspace 1";
|
|
||||||
"${modifier}+2" = "workspace 2";
|
|
||||||
"${modifier}+3" = "workspace 3";
|
|
||||||
"${modifier}+4" = "workspace 4";
|
|
||||||
"${modifier}+5" = "workspace 5";
|
|
||||||
"${modifier}+6" = "workspace 6";
|
|
||||||
"${modifier}+7" = "workspace 7";
|
|
||||||
"${modifier}+8" = "workspace 8";
|
|
||||||
"${modifier}+9" = "workspace 9";
|
|
||||||
"${modifier}+0" = "workspace 10";
|
|
||||||
"${modifier}+Shift+1" = "move container to workspace 1";
|
|
||||||
"${modifier}+Shift+2" = "move container to workspace 2";
|
|
||||||
"${modifier}+Shift+3" = "move container to workspace 3";
|
|
||||||
"${modifier}+Shift+4" = "move container to workspace 4";
|
|
||||||
"${modifier}+Shift+5" = "move container to workspace 5";
|
|
||||||
"${modifier}+Shift+6" = "move container to workspace 6";
|
|
||||||
"${modifier}+Shift+7" = "move container to workspace 7";
|
|
||||||
"${modifier}+Shift+8" = "move container to workspace 8";
|
|
||||||
"${modifier}+Shift+9" = "move container to workspace 9";
|
|
||||||
|
|
||||||
"${modifier}+h" = "focus left";
|
|
||||||
"${modifier}+j" = "focus down";
|
|
||||||
"${modifier}+k" = "focus up";
|
|
||||||
"${modifier}+l" = "focus right";
|
|
||||||
|
|
||||||
"${modifier}+Shift+i" = "exec caja";
|
|
||||||
|
|
||||||
"${modifier}+Shift+r" = "reload";
|
|
||||||
|
|
||||||
"${modifier}+Shift+q" = "exit";
|
|
||||||
|
|
||||||
"${modifier}+Shift+v" = "exec vesktop --ozone-platform=wayland";
|
|
||||||
|
|
||||||
"${modifier}+Shift+p" = "exec /home/coast/.local/src/local/bin/setwall.sh";
|
|
||||||
};
|
|
||||||
startup = [
|
|
||||||
{ command = "autotiling"; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
history = {
|
|
||||||
path = "/home/coast/.cache/zsh/history";
|
|
||||||
size = 100000000;
|
|
||||||
save = 100000000;
|
|
||||||
append = true;
|
|
||||||
};
|
|
||||||
enableCompletion = true;
|
|
||||||
shellAliases = {
|
|
||||||
nf = "neofetch";
|
|
||||||
nrs = "sudo nixos-rebuild switch";
|
|
||||||
emoji = "cat ~/.local/src/local/share/emoji | grep";
|
|
||||||
ls = "ls --color=auto";
|
|
||||||
smi = "nvidia-smi";
|
|
||||||
battery = "sb-battery";
|
|
||||||
weather = "curl wttr.in/masjedsoleyman";
|
|
||||||
las = "ls";
|
|
||||||
c = "clear";
|
|
||||||
cear = "clear";
|
|
||||||
".." = "cd ..";
|
|
||||||
hotp = "htop";
|
|
||||||
main = "man";
|
|
||||||
mian = "man";
|
|
||||||
mna = "man";
|
|
||||||
dias = "sudo";
|
|
||||||
delgen = "sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system";
|
|
||||||
alsamixer = "alsamixer -c 0 --no-color";
|
|
||||||
la = "ls --color=auto -la";
|
|
||||||
};
|
|
||||||
initContent = ''
|
|
||||||
autoload -U compinit
|
|
||||||
zstyle ':completion:*' menu select
|
|
||||||
zmodload zsh/complist
|
|
||||||
compinit
|
|
||||||
comp_options+=(globdots)
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
|
||||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=12"
|
|
||||||
autoload -U colors && colors && setopt prompt_subst
|
|
||||||
PROMPT="[%n@%m %~]%% "
|
|
||||||
export LIBCLANG_PATH=/usr/lib/llvm/20/lib64
|
|
||||||
export PATH=$PATH:/home/coast/.spicetify
|
|
||||||
source ~/.local/src/zsh.d/zsh-autosuggestions.zsh
|
|
||||||
export PATH="/usr/bin:$PATH"
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
20
local/bin/setwall.py
Executable file
20
local/bin/setwall.py
Executable file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
import secrets
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
BASE_DIR = "/home/coast/.local/src/wall"
|
||||||
|
|
||||||
|
wallpapers = []
|
||||||
|
for root, dirs, files in os.walk(BASE_DIR):
|
||||||
|
for file in files:
|
||||||
|
if file.lower().endswith(('.png', '.jpg', '.jpeg', '.bmp', '.gif')):
|
||||||
|
wallpapers.append(os.path.join(root, file))
|
||||||
|
|
||||||
|
if not wallpapers:
|
||||||
|
print("No wallpapers found!")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
chosen_wallpaper = secrets.choice(wallpapers)
|
||||||
|
print(chosen_wallpaper)
|
||||||
|
subprocess.run(["swaybg", "-i", chosen_wallpaper, "-m", "fill"])
|
||||||
Loading…
Add table
Reference in a new issue