Compare commits

...

5 Commits

Author SHA1 Message Date
e6328e254b added whatever tf changes 2025-05-11 18:34:04 +09:00
b7342e6e6a removed arguments from zed's bash 2025-03-08 19:12:04 +09:00
390392813b toppled home-manager 2025-03-08 19:10:37 +09:00
3cf8a263c7 Removed unnecessary configs 2025-03-08 19:06:35 +09:00
9e2b554152 Added some packages 2025-03-08 19:00:55 +09:00
43 changed files with 493 additions and 1247 deletions

View File

@@ -2,4 +2,6 @@
dotfiles for nixos dotfiles for nixos
referenced heavily on [librephoenix's nixos-config](https://github.com/librephoenix/nixos-config). ~~referenced heavily on [librephoenix's nixos-config](https://github.com/librephoenix/nixos-config).~~
This config is now more looks like [sioodmy's config](https://github.com/sioodmy/dotfiles).

34
flake.lock generated
View File

@@ -1,26 +1,5 @@
{ {
"nodes": { "nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1741217763,
"narHash": "sha256-g/TrltIjFHIjtzKY5CJpoPANfHQWDD43G5U1a/v5oVg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "486b066025dccd8af7fbe5dd2cc79e46b88c80da",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"homix": { "homix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
@@ -42,11 +21,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1741325094, "lastModified": 1745907084,
"narHash": "sha256-RUAdT8dZ6k/486vnu3tiNRrNW6+Q8uSD2Mq7gTX4jlo=", "narHash": "sha256-Q8SpDbTI95vtKXgNcVl1VdSUhhDOORE8R77wWS2rmg8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "b48cc4dab0f9711af296fc367b6108cf7b8ccb16", "rev": "f1e52a018166e1a324f832de913e12c0e55792d0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -74,11 +53,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1741246872, "lastModified": 1745794561,
"narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=", "narHash": "sha256-T36rUZHUART00h3dW4sV5tv4MrXKT7aWjNfHiZz7OHg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "10069ef4cf863633f57238f179a0297de84bd8d3", "rev": "5461b7fa65f3ca74cef60be837fd559a8918eaa0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -89,7 +68,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager",
"homix": "homix", "homix": "homix",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"

View File

@@ -3,56 +3,23 @@
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
homix.url = "github:sioodmy/homix/main"; homix.url = "github:sioodmy/homix/main";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
}; };
outputs = inputs@{ self, nixpkgs, homix, ... }: outputs = inputs@{ self, nixpkgs, homix, ... }:
let let
systemSettings = {
system = "x86_64-linux";
hostname = "kenryu-nixos";
host = "syushiki";
timezone = "Asia/Tokyo";
locale = "ja_JP.UTF-8";
};
userSettings = {
username = "kenryus";
name = "Kenryu Shibata";
email-dev = "kenryudev5894@gmail.com";
dotfilesDir = "/etc/nixos";
};
pkgs = import inputs.nixpkgs { pkgs = import inputs.nixpkgs {
system = systemSettings.system; system = "x86_64-linux";
}; };
lib = inputs.nixpkgs.lib; lib = inputs.nixpkgs.lib;
in { in
{
nixosModules = { nixosModules = {
homix = homix.nixosModules.default; homix = homix.nixosModules.default;
}; };
nixosConfigurations = import ./hosts inputs; nixosConfigurations = import ./hosts inputs;
#nixosConfigurations.syushiki = lib.nixosSystem {
# system = systemSettings.system;
# modules = [
# ./hosts/syushiki
# ./overlays
# home-manager.nixosModules.home-manager {
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
# home-manager.users.${userSettings.username} = import (./. + "/hosts/${systemSettings.host}/home.nix");
# home-manager.extraSpecialArgs = {
# inherit userSettings;
# };
# }
# ];
# specialArgs = {
# inherit inputs systemSettings userSettings;
# };
#};
}; };
} }

View File

@@ -1,22 +0,0 @@
{ pkgs, userSettings, ... }:
{
imports = [
../../user/dev/tools/git.nix
../../user/dev/tools/gh.nix
../../user/dev/editor/vscodium.nix
../../user/dev/editor/zed-editor.nix
../../user/dev/lang/cc.nix
../../user/dev/lang/python.nix
../../user/dev/lang/rust.nix
../../user/dev/lang/ecmascript.nix
];
home.username = userSettings.username;
home.homeDirectory = "/home/" + userSettings.username;
programs.home-manager.enable = true;
home.stateVersion = "24.05";
home.packages = with pkgs; [];
}

View File

@@ -1,41 +0,0 @@
{ pkgs, lib, config, systemSettings, userSettings, ... }:
{
imports = [
../system/hardware/audio.nix
../system/hardware/time.nix
../system/services/network-manager.nix
../system/utils.nix
];
time.timeZone = systemSettings.timezone;
networking.hostName = systemSettings.hostname;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
i18n.defaultLocale = systemSettings.locale;
i18n.extraLocaleSettings = {
LC_ADDRESS = systemSettings.locale;
LC_IDENTIFICATION = systemSettings.locale;
LC_MEASUREMENT = systemSettings.locale;
LC_MONETARY = systemSettings.locale;
LC_NAME = systemSettings.locale;
LC_NUMERIC = systemSettings.locale;
LC_PAPER = systemSettings.locale;
LC_TELEPHONE = systemSettings.locale;
LC_TIME = systemSettings.locale;
};
users.users.${userSettings.username} = {
isNormalUser = true;
description = userSettings.name;
extraGroups = [ "networkmanager" "wheel" "docker" "podman" "input" "flatpak" "dialout" "video" "input" "audio" "libvirtd" ];
packages = with pkgs; [];
uid = 1000;
};
environment.shells = with pkgs; [ bash ];
users.defaultUserShell = pkgs.bash;
}

View File

@@ -1,43 +0,0 @@
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../base.nix
../../system/services/cups.nix
../../system/services/ssh.nix
../../system/services/polkit.nix
../../system/services/flatpak.nix
../../system/services/steam.nix
../../system/services/tailscale.nix
../../system/services/libvirtd.nix
../../system/services/podman.nix
../../system/hardware/kernel.nix
../../system/hardware/nvidia.nix
../../system/hardware/opengl.nix
../../system/hardware/bluetooth.nix
../../system/wm/sddm.nix
../../system/hardware/inputMethods.nix
../../system/env.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
programs.appimage = {
enable = true;
binfmt = true;
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 3000 3001 22 ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
system.stateVersion = "24.05"; # Did you read the changelog?
}

View File

@@ -1,46 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f4c95da6-3c6b-4414-a62a-c8c26c4a1c73";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C83C-841F";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/run/media/kenryus/hdd" = {
device = "/dev/disk/by-uuid/0d146628-12f4-4bb6-abde-bbf798a57c25";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d933c349-8e70-41e1-8d13-605656dba18b"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -1,48 +0,0 @@
{ pkgs, userSettings, ... }:
{
imports = [
../../user/apps/browsers/firefox.nix
../../user/apps/browsers/chromium.nix
../../user/apps/thunderbird.nix
../../user/dev/tools/git.nix
../../user/dev/tools/gitui.nix
../../user/dev/tools/firefox-devedition.nix
../../user/dev/tools/dbeaver-bin.nix
../../user/dev/tools/tldr.nix
../../user/dev/tools/gh.nix
../../user/dev/editor/vscodium.nix
../../user/dev/editor/zed-editor.nix
../../user/dev/lang/cc.nix
../../user/dev/lang/python.nix
../../user/dev/lang/rust.nix
../../user/dev/lang/ecmascript.nix
../../user/dev/ide/qtcreator.nix
../../user/apps/utils/alacritty.nix
../../user/apps/utils/keepassxc.nix
#../../user/apps/utils/cava.nix
../../user/apps/utils/owncloud-client.nix
../../user/apps/utils/fzf.nix
../../user/apps/utils/zoxide.nix
../../user/apps/media/vlc.nix
../../user/apps/media/mpv.nix
../../user/apps/media/yt-dlp.nix
../../user/apps/media/kdenlive.nix
../../user/apps/media/obs-studio.nix
../../user/apps/graphics/gimp.nix
../../user/apps/graphics/inkscape.nix
../../user/apps/games/mangohud.nix
../../user/apps/office/texlive.nix
#../../user/apps/office/libreoffice-fresh.nix
../../user/shell/bash.nix
../../user/wm/xmonad/xmonad.nix
];
home.username = userSettings.username;
home.homeDirectory = "/home/" + userSettings.username;
programs.home-manager.enable = true;
home.stateVersion = "24.05";
home.packages = with pkgs; [];
}

View File

@@ -1,63 +0,0 @@
#!/bin/bash
echo "newpkg.sh: create minimal nix file in current directory, Current Directory: $PWD"
if [ -z "$NIXOSSYSCONFIG" ]; then
echo "Error: Env Variable Missing, NIXOSSYSCONFIG"
exit 1
fi
if [ -z "$NIXOSHOMECONFIG" ]; then
echo "Error: Env Variable Missing, NIXOSHOMECONFIG"
exit 1
fi
if [ -z "$EDITOR" ]; then
echo "Error: Env Variable Missing, EDITOR"
exit 1
fi
echo -e "Select installation destination:\n[1]: System\n[2]: User\n[q]: quit"
read dest
echo "Specifiy the package to add:"
read pkgName
touch "$PWD/${pkgName}.nix"
if [[ $dest -eq 1 ]]; then
echo -e "{ pkgs, ... }:\n{\n environment.systemPackages = with pkgs; [\n ${pkgName}\n ];\n}" > "$PWD/${pkgName}.nix"
echo "Open editor to modify system imports? [y/N]: "
read doEdit
if [ "$doEdit" == "y" ] || [ "$doEdit" == "Y" ]; then
$EDITOR $NIXOSSYSCONFIG
fi
elif [[ $dest -eq 2 ]]; then
echo -e "{ pkgs, ... }:\n{\n home.packages = with pkgs; [\n ${pkgName}\n ];\n}" > "$PWD/${pkgName}.nix"
echo "Open editor to modify home imports? [y/N]: "
read doEdit
if [ "$doEdit" == "y" ] || [ "$doEdit" == "Y" ]; then
$EDITOR $NIXOSHOMECONFIG
fi
elif [[ $dest == "q" ]]; then
exit 0
else
echo "Error: Non-numeric or Out-ranged value inputed"
exit 1
fi
echo "Would you like to edit new nix file for further configuration? [y/N]: "
read doNixEdit
if [ "$doNixEdit" == "y" ] || [ "$doNixEdit" == "Y" ]; then
$EDITOR "$PWD/${pkgName}.nix"
fi
echo "Would you like to execute nixos-rebuild? [y/N]: "
read doExec
if [ "$doExec" == "y" ] || [ "$doExec" == "Y" ]; then
cd ~/.dotfiles
sudo nixos-rebuild switch --flake '.#system'
else
echo "Exiting"
exit 0
fi

View File

@@ -1,60 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
coreutils,
gnused,
gnugrep,
curl,
wget,
binutils,
unzip,
gnutar,
zsync
}:
stdenv.mkDerivation rec {
pname = "AppMan";
version = "7.7";
src = fetchFromGitHub {
owner = "ivan-hc";
repo = "AM";
rev = "e8abedace64c32023086a9c79fe646d84588a995";
hash = "sha256-n0m5VWdMTYWv18cB++NYWMQZXNKWfnj0iHgj0ZNdjy8=";
};
propagatedBuildInputs = [
coreutils
gnused
gnugrep
curl
wget
binutils
unzip
gnutar
zsync
];
buildPhase = ''
'';
installPhase = ''
mkdir -p $out/bin
cp APP-MANAGER $out/bin
ln -sf $out/bin/APP-MANAGER $out/bin/am
'';
meta = with lib; {
description = "Database & solutions for all AppImages and portable apps for GNU/Linux!";
longDescription = ''
AppImage package manager to install, update (for real) and manage ALL of them (system-wide or locally) thanks to its ever-growing AUR-inspired database listing 2000+ portable apps and programs for GNU/Linux.
The first, real centralized repository to manage your AppImages with the ease of APT and the power of PacMan.
'';
homepage = "https://portable-linux-apps.github.io/";
changelog = "https://github.com/ivan-hc/AM/releases/tag/${version}";
license = licenses.gpl3;
platforms = platforms.all;
};
}

View File

@@ -1,34 +0,0 @@
{ lib, fetchurl, appimageTools }:
let
pname = "badlion-client";
version = "4.4.1";
src = fetchurl {
name = "badlion-client-linux";
# https://www.badlion.net/download/client/latest/linux
url = "https://client-updates-cdn77.badlion.net/BadlionClient";
hash = "sha256-lyu0WQtkevCduGb5Hw5D79CekoHTQiKHvofnqS57mVU=";
};
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
install -Dm444 ${appimageContents}/BadlionClient.desktop $out/share/applications/BadlionClient.desktop
install -Dm444 ${appimageContents}/BadlionClient.png $out/share/pixmaps/BadlionClient.png
substituteInPlace $out/share/applications/BadlionClient.desktop \
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=badlion-client'
'';
meta = with lib; {
description = "Most Complete All-In-One Mod Library for Minecraft with 100+ Mods, FPS Improvements, and more";
homepage = "https://client.badlion.net";
license = with licenses; [ unfree ];
maintainers = [ ];
mainProgram = "badlion-client";
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -1,4 +0,0 @@
let
pkgs = import <nixpkgs> { };
in
pkgs.callPackage ./badlion-client.nix { }

View File

@@ -1,7 +0,0 @@
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.11";
pkgs = import nixpkgs { config = {}; overlays = []; };
in
{
zen-browser = pkgs.callPackage ./zen-browser.nix { };
}

View File

@@ -1,21 +0,0 @@
{ lib, stdenv, ... }:
let
version = "1.7b";
in
stdenv.mkDerivation {
pname="zen-browser";
inherit version;
src = fetchTarball {
url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-x86_64.tar.bz2";
sha256 = "0aig890fcynxwi7xi8jzd1w2gzg47n0jqfq76wvnkwcam611b2bp";
};
dontPatch = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
cp -r . $out
'';
}

View File

@@ -7,11 +7,10 @@
file file
eza eza
jq jq
killall
htop htop
btop btop
fastfetch
mc mc
git
parted parted
tree tree
tmux tmux

View File

@@ -2,7 +2,10 @@
{ {
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
_0xproto _0xproto
nerd-fonts._0xproto
ipafont ipafont
takao takao
noto-fonts-cjk-serif
noto-fonts-cjk-sans
]; ];
} }

View File

@@ -1,16 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
neovim
];
programs.neovim = {
enable = true;
vimAlias = false;
viAlias = false;
withRuby = true;
withPython3 = true;
withNodeJs = true;
package = pkgs.neovim-unwrapped;
};
}

View File

@@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.vscodium ];
}

View File

@@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.zed-editor ];
}

View File

@@ -1,14 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
gcc
gdb
cmake
autoconf
automake
gnumake
libtool
clang-analyzer
clang-tools
];
}

View File

@@ -1,6 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
nodejs_22
];
}

View File

@@ -1,6 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
python313Full
];
}

View File

@@ -1,6 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
rustup
];
}

View File

@@ -1,6 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
gh
];
}

View File

@@ -1,7 +0,0 @@
{ config, pkgs, userSettings, ... }:
{
home.packages = [ pkgs.git ];
programs.git.enable = true;
programs.git.userName = userSettings.name;
programs.git.userEmail = userSettings.email-dev;
}

View File

@@ -2,7 +2,9 @@
{ {
imports = [ imports = [
./git ./git
./polybar
./profile ./profile
./xmonad ./xmonad
#./zed-editor
]; ];
} }

View File

@@ -0,0 +1,15 @@
{ pkgs, ... }:
let
bar-launcher = conf: bar:
pkgs.writeShellScriptBin "launch-polybar-${conf}" ''
killall -q polybar
polybar -c ~/.config/polybar/${conf}.ini ${bar} 2>&1 | tee /tmp/polybar.log & disown
'';
in
{
environment.systemPackages = [
pkgs.polybar
(bar-launcher "xmonadAppTray" "apptray")
];
homix.".config/polybar/xmonadAppTray.ini".source = ./xmonadAppTray.ini;
}

View File

@@ -0,0 +1,15 @@
[bar/apptray]
monitor-strict = false
bottom = false
width = 7%
height = 24px
offset-x = 93%
modules-right = tray
foreground = #ffffff00
background = #000000A0
border-color = #000000
[module/tray]
type = internal/tray
tray-spacing = 2px
format-margin = 4px

View File

@@ -0,0 +1,4 @@
xmobar weather station
- *RJNG*: Gifu Air Base
- *RJGG*: Nagoya Airport

View File

@@ -13,6 +13,6 @@
xdg-desktop-portal-gtk xdg-desktop-portal-gtk
]; ];
homix.".config/xmonad/xmonad.hs".source = ./xmonad.hs; #homix.".config/xmonad/xmonad.hs".source = ./xmonad.hs;
homix.".config/xmobar/xmobarrc".source = ./xmobarrc; #homix.".config/xmobar/xmobarrc".source = ./xmobarrc;
} }

View File

@@ -1,33 +1,46 @@
Config { Config { font = "DejaVu Sans Mono 9"
font = "IPAGothic 9", , additionalFonts = ["DejaVu Sans Mono italic 9"]
bgColor = "black", , borderColor = "black"
fgColor = "#646464", , border = FullB
position = Top, , bgColor = "black"
border = BottomB, , fgColor = "whitesmoke"
borderColor = "#646464", , alpha = 160
, position = TopSize L 93 24
sepChar = "%", , textOffset = -1
alignSep = "}{", , iconOffset = -1
template = "%multicpu% | %coretemp% | %memory% | %dynnetwork% }{ %date%", , lowerOnStart = True
, pickBroadest = False
lowerOnStart = True, , persistent = False
hideOnStart = False, , hideOnStart = False
allDesktops = True, , iconRoot = "."
overrideRedirect = True, , allDesktops = True
pickBroadest = False, , overrideRedirect = False
persistent = True, , textOutputFormat = Ansi
, commands = [ Run Weather "RJNG" ["-t","@<station> <tempC>C, <rh>%, <pressure>hPa",
commands = "-L","18","-H","25",
[ "--normal","green",
Run DynNetwork [ "--template", "<dev>: <tx>kB/s|<rx>kB/s", "--high","red",
"--Low", "1000", -- units: B/s "--low","lightblue"] 36000
"--High", "5000", -- units: B/s , Run Weather "RJGG" ["-t","@<station> <tempC>C, <rh>%, <pressure>hPa",
"--low", "darkgreen", "-L", "18", "-H", "25",
"--normal", "darkorange", "--normal", "green",
"--high", "darkred" ] 10, "--high", "red",
"--low", "lightblue"] 36000
Run MultiCpu [ , Run Network "wlo1" ["-L","0","-H","32",
"--template", "Cpu: <total0>C|<core1>C" "--normal","green","--high","red"] 10
] 10, , Run Network "enp4s0" ["-L","0","-H","32",
"--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50",
"--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Swap [] 10
, Run Com "uname" ["-s","-r"] "" 36000
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
, Run StdinReader
] ]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% | %cpu% | <box>%memory% * %swap%</box> | %wlo1% - %enp4s0% }\
\{ %RJNG% <fc=#ee9a00><fn=1>%date%</fn></fc>"
} }

View File

@@ -1,335 +1,221 @@
--
-- xmonad example config file.
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
import XMonad import XMonad
import XMonad.Hooks.DynamicLog
import Data.Monoid import Data.Monoid
import System.Exit import System.Exit
-- XMonad Contrib
import XMonad.Actions.Submap
import XMonad.Actions.Minimize
import XMonad.Actions.CopyWindow
import XMonad.Actions.CycleWS
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.Gaps
import XMonad.Layout.Minimize
import XMonad.Layout.NoBorders
import XMonad.Layout.Tabbed
import XMonad.Util.Run
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.SpawnOnce
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
import qualified Data.Map as M import qualified Data.Map as M
-- The preferred terminal program, which is used in a binding below and by -- Main Terminal Program
-- certain contrib modules. term :: String
-- term = "alacritty"
myTerminal = "alacritty"
-- Whether focus follows the mouse pointer. -- Launcher Program
myFocusFollowsMouse :: Bool menu :: String
myFocusFollowsMouse = True menu = "rofi -show drun"
-- Whether clicking on a window to focus also passes the click to the window -- Focus Follows Mouse
myClickJustFocuses :: Bool ffm :: Bool
myClickJustFocuses = False ffm = True
-- Width of the window border in pixels. -- Click Focus
-- cf :: Bool
myBorderWidth = 1 cf = False
-- modMask lets you specify which modkey you want to use. The default -- Border Width
-- is mod1Mask ("left alt"). You may also consider using mod3Mask bw :: Dimension
-- ("right alt"), which does not conflict with emacs keybindings. The bw = 1
-- "windows key" is usually mod4Mask.
--
myModMask = mod4Mask
-- The default number of workspaces (virtual screens) and their names. -- Modifier Key (1: left alt, 2: right alt, 4: win key)
-- By default we use numeric strings, but any string may be used as a modKey :: KeyMask
-- workspace name. The number of workspaces is determined by the length modKey = mod4Mask
-- of this list.
--
-- A tagging example:
--
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--
myWorkspaces = ["term", "web", "code", "debug", "docs"] ++ map show [6..9]
-- Border colors for unfocused and focused windows, respectively. -- workspace
-- ws :: [String]
myNormalBorderColor = "#dddddd" ws = ["term", "web", "school", "docs", "code", "debug", "media", "games", "other"]
myFocusedBorderColor = "#ff0000"
------------------------------------------------------------------------ -- Border Color Normal
-- Key bindings. Add, modify or remove key bindings here. bcn :: String
-- bcn = "#dddddd"
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- launch a terminal -- Border Color Focused
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) bcf :: String
bcf = "#ff0000"
-- launch dmenu -- Key Bindings
, ((modm, xK_p ), spawn "rofi -show drun") keyBinds conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
[
-- Program Launch KB
((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf),
((modm, xK_r), spawn menu),
-- close focused window -- Program Close KB
, ((modm .|. shiftMask, xK_c ), kill) ((modm .|. shiftMask, xK_c), kill),
((modm .|. shiftMask .|. controlMask, xK_c), spawn "xkill"),
-- Rotate through the available layout algorithms -- WM Related KB
, ((modm, xK_space ), sendMessage NextLayout) ((modm, xK_Escape), visualSubmap def $ M.fromList $
[
-- Reset the layouts on the current workspace to default ((shiftMask, xK_q), subName "Exit" $ io exitSuccess),
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) ((0, xK_r), subName "Restart" $ spawn "xmonad --recompile; xmonad --restart")
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((modm, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm, xK_Return), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm, xK_l ), sendMessage Expand)
-- Push window back into tiling
, ((modm, xK_t ), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
--
-- , ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io exitSuccess)
-- Restart xmonad
, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
-- Run xmessage with a summary of the default keybindings (useful for beginners)
, ((modm .|. shiftMask, xK_slash ), xmessage help)
] ]
),
-- Layout Related KB
((modm, xK_space), sendMessage NextLayout),
((modm .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf),
((modm, xK_comma), sendMessage (IncMasterN 1)),
((modm, xK_period), sendMessage (IncMasterN (-1))),
((modm, xK_f), sendMessage $ JumpToLayout "Full"),
-- Gaps Related KB
(
(modm, xK_g), visualSubmap def $ M.fromList $
[
((0, xK_g), subName "Toggle Gaps" $ sendMessage $ ToggleGaps),
((controlMask, xK_h), subName "Toggle Left Gap" $ sendMessage $ ToggleGap L),
((controlMask, xK_l), subName "Toggle Right Gap" $ sendMessage $ ToggleGap R),
((controlMask, xK_k), subName "Toggle Up Gap" $ sendMessage $ ToggleGap U),
((controlMask, xK_j), subName "Toggle Down Gap" $ sendMessage $ ToggleGap D),
((0, xK_h), subName "Inc Left Gap" $ sendMessage $ IncGap 5 L),
((0, xK_l), subName "Inc Right Gap" $ sendMessage $ IncGap 5 R),
((0, xK_k), subName "Inc Up Gap" $ sendMessage $ IncGap 5 U),
((0, xK_j), subName "Inc Down Gap" $ sendMessage $ IncGap 5 D),
((shiftMask, xK_h), subName "Dec Left Gap" $ sendMessage $ DecGap 5 L),
((shiftMask, xK_l), subName "Dec Right Gap" $ sendMessage $ DecGap 5 R),
((shiftMask, xK_k), subName "Dec Up Gap" $ sendMessage $ DecGap 5 U),
((shiftMask, xK_j), subName "Dec Down Gap" $ sendMessage $ DecGap 5 D)
]
),
-- Windows Related KB
((modm, xK_a), refresh),
((modm, xK_Tab), windows W.focusDown),
((modm, xK_j), windows W.focusDown),
((modm, xK_k), windows W.focusUp),
((modm, xK_m), windows W.focusMaster),
((modm, xK_Return), windows W.swapMaster),
((modm .|. shiftMask, xK_j), windows W.swapDown),
((modm .|. shiftMask, xK_k), windows W.swapUp),
((modm, xK_h), sendMessage Expand),
((modm, xK_l), sendMessage Shrink),
((modm, xK_t), withFocused $ windows . W.sink),
((modm, xK_m), withFocused minimizeWindow),
((modm .|. shiftMask, xK_m), withLastMinimized maximizeWindowAndFocus),
((modm .|. controlMask, xK_c), windows copyToAll),
((modm .|. controlMask .|. shiftMask, xK_c), killAllOtherCopies),
((modm .|. shiftMask, xK_c), kill1)
]
++ ++
-- -- Workspace Related KB
-- mod-[1..9], Switch to workspace N [
-- mod-shift-[1..9], Move client to workspace N ((modm, xK_Page_Up), nextWS),
-- ((modm, xK_Page_Down), prevWS),
[((m .|. modm, k), windows $ f i) ((modm, xK_n), nextWS),
((modm, xK_p), prevWS)
]
++
[
((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask), (copy, controlMask)]
++
--
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
--
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events
--
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster)
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), \w -> focus w >> windows W.shiftMaster)
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), \w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster)
-- you may also bind events to the mouse scroll wheel (button4 and button5)
] ]
------------------------------------------------------------------------ mouseBinds (XConfig {XMonad.modMask = modm}) = M.fromList
-- Layouts: [
((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster),
((modm, button2), \w -> focus w >> windows W.shiftMaster),
((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)
]
-- You can specify and transform your layouts by modifying these values. layouts = avoidStruts(tiled ||| Mirror tiled ||| gaped_tiled ||| tabbed shrinkText tabConfig) ||| noBorders Full ||| gaped_full
-- If you change layout bindings be sure to use 'mod-shift-space' after
-- restarting (with 'mod-q') to reset your layout state to the new
-- defaults, as xmonad preserves your old layout settings by default.
--
-- The available layouts. Note that each layout is separated by |||,
-- which denotes layout choice.
--
myLayout = tiled ||| Mirror tiled ||| Full
where where
-- default tiling algorithm partitions the screen into two panes tiled = minimize(Tall nmaster delta ratio)
tiled = Tall nmaster delta ratio gaped_tiled = gaps surrounded_gap $ minimize(Tall nmaster delta ratio)
gaped_full = gaps surrounded_gap $ noBorders Full
-- The default number of windows in the master pane surrounded_gap = [(U,10),(D,10),(L,10),(R,10)]
nmaster = 1 nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2 ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100 delta = 3/100
tabConfig = def {
------------------------------------------------------------------------ fontName = "xft:DejaVu Sans Mono",
-- Window rules: activeColor = "#aaaaaa",
inactiveColor = "#8a8a8a"
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore ]
------------------------------------------------------------------------
-- Event handling
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
--
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
myEventHook = mempty
------------------------------------------------------------------------
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
--
myLogHook = return ()
------------------------------------------------------------------------
-- Startup hook
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
--
-- By default, do nothing.
myStartupHook = do
spawn "feh --bg-scale ~/画像/wallpaper/85444653_p0.jpg"
------------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up.
-- Run xmonad with the settings you specify. No need to modify this.
--
main :: IO()
main = do
xmobar myConfig >>= xmonad
-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
--
-- No need to modify this.
--
myConfig = def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = myLayout,
manageHook = myManageHook,
handleEventHook = myEventHook,
logHook = myLogHook,
startupHook = myStartupHook
} }
-- | Finally, a copy of the default bindings in simple textual tabular format. -- Manage Hook
help :: String mh = composeAll
help = unlines ["The default modifier key is 'alt'. Default keybindings:", [
"", title =? "Picture-in-Picture" --> doSideFloat SE,
"-- launching and killing programs", isFullscreen --> doFullFloat,
"mod-Shift-Enter Launch xterminal", isDialog --> doCenterFloat
"mod-p Launch dmenu", ]
"mod-Shift-p Launch gmrun", -- Event Hook
"mod-Shift-c Close/kill the focused window", eh = mempty
"mod-Space Rotate through the available layout algorithms", -- Log Hook
"mod-Shift-Space Reset the layouts on the current workSpace to default", lh h = dynamicLogWithPP $ statbarPipe { ppOutput = hPutStrLn h }
"mod-n Resize/refresh viewed windows to the correct size",
"mod-Shift-/ Show this help message with the default keybindings", -- Startup Hook
"", sh = do
"-- move focus up or down the window stack", spawn "launch-polybar-xmonadAppTray"
"mod-Tab Move focus to the next window", spawnOnce "feh --bg-scale ~/画像/wallpaper/85444653_p0.jpg"
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window", -- Status bar used in WM
"mod-k Move focus to the previous window", statbar :: String
"mod-m Move focus to the master window", statbar = "xmobar"
"",
"-- modifying the window order", statbarPipe = xmobarPP {
"mod-Return Swap the focused window and the master window", ppOrder = \(ws:l:t:_) -> [ws,t],
"mod-Shift-j Swap the focused window with the next window", ppCurrent = xmobarColor "red" "black" . \s -> wrap "[" "]" (s ++ ""),
"mod-Shift-k Swap the focused window with the previous window", ppUrgent = xmobarColor "gray" "black" . \s -> wrap "{" "}" (s ++ ""),
"", ppVisible = xmobarColor "red" "black" . \s -> pad (s ++ ""),
"-- resizing the master/slave ratio", ppHidden = xmobarColor "gray" "black" . \s -> pad (s ++ ""),
"mod-h Shrink the master area", ppHiddenNoWindows = xmobarColor "gray" "black" . \s -> pad (s ++ ""),
"mod-l Expand the master area", ppTitle = xmobarColor "red" "black" . shorten 32,
"", ppLayout = id,
"-- floating layer support", ppOutput = putStrLn,
"mod-t Push window back into tiling; unfloat and re-tile it", ppWsSep = " ",
"", ppSep = " | "
"-- increase or decrease number of windows in the master area", }
"mod-comma (mod-,) Increment the number of windows in the master area",
"mod-period (mod-.) Deincrement the number of windows in the master area", main :: IO()
"", main = do
"-- quit, or restart", wsbar <- spawnPipe statbar
"mod-Shift-q Quit xmonad", xmonad . docks $ myConfig wsbar
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N", myConfig bar = def {
"", terminal = term,
"-- Workspaces & screens", focusFollowsMouse = ffm,
"mod-Shift-[1..9] Move client to workspace N", clickJustFocuses = cf,
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3", borderWidth = bw,
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3", modMask = modKey,
"", workspaces = ws,
"-- Mouse bindings: default actions bound to mouse events", normalBorderColor = bcn,
"mod-button1 Set the window to floating mode and move by dragging", focusedBorderColor = bcf,
"mod-button2 Raise the window to the top of the stack", keys = keyBinds,
"mod-button3 Set the window to floating mode and resize by dragging"] mouseBindings = mouseBinds,
layoutHook = layouts,
manageHook = mh <+> manageDocks,
handleEventHook = eh,
logHook = lh bar,
startupHook = sh
}

View File

@@ -0,0 +1,6 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.zed-editor ];
homix.".config/zed/settings.json".source = ./settings.json;
}

View File

@@ -0,0 +1,47 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
"assistant": {
"default_model": {
"provider": "ollama",
"model": "mistral:7b"
},
"version": "2"
},
"base_keymap": "VSCode",
"theme": "Gruvbox Material",
"telemetry": {
"metrics": false
},
"vim_mode": true,
"buffer_font_family": "0xProto",
"buffer_font_size": 16,
"ui_font_size": 16,
"tab_size": 4,
"tabs": {
"close_position": "right",
"file_icons": true,
"git_status": true
},
"format_on_save": "off",
"language_models": {
"ollama": {
"api_url": "http://127.0.0.1:11434"
}
},
"terminal": {
"shell": {
"with_arguments": {
"program": "/run/current-system/sw/bin/bash",
"args": []
}
},
"blinking": "on"
}
}

View File

@@ -13,12 +13,14 @@
./kdenlive ./kdenlive
./keepassxc ./keepassxc
./kicad ./kicad
./krita
./libreoffice-fresh ./libreoffice-fresh
./mangohud ./mangohud
./mpv ./mpv
./obs-studio ./obs-studio
./owncloud-client ./owncloud-client
./pandoc ./pandoc
./python3
./qtcreator ./qtcreator
./thunderbird ./thunderbird
./tldr ./tldr

View File

@@ -0,0 +1,4 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.krita ];
}

View File

@@ -0,0 +1,6 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
python311
];
}

View File

@@ -1,33 +0,0 @@
Config {
font = "IPAGothic 9",
bgColor = "black",
fgColor = "#646464",
position = Top,
border = BottomB,
borderColor = "#646464",
sepChar = "%",
alignSep = "}{",
template = "%multicpu% | %coretemp% | %memory% | %dynnetwork% }{ %date%",
lowerOnStart = True,
hideOnStart = False,
allDesktops = True,
overrideRedirect = True,
pickBroadest = False,
persistent = True,
commands =
[
Run DynNetwork [ "--template", "<dev>: <tx>kB/s|<rx>kB/s",
"--Low", "1000", -- units: B/s
"--High", "5000", -- units: B/s
"--low", "darkgreen",
"--normal", "darkorange",
"--high", "darkred" ] 10,
Run MultiCpu [
"--template", "Cpu: <total0>C|<core1>C"
] 10,
]
}

View File

@@ -1,335 +0,0 @@
--
-- xmonad example config file.
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
import XMonad
import XMonad.Hooks.DynamicLog
import Data.Monoid
import System.Exit
import qualified XMonad.StackSet as W
import qualified Data.Map as M
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
--
myTerminal = "alacritty"
-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
-- Whether clicking on a window to focus also passes the click to the window
myClickJustFocuses :: Bool
myClickJustFocuses = False
-- Width of the window border in pixels.
--
myBorderWidth = 1
-- modMask lets you specify which modkey you want to use. The default
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
-- ("right alt"), which does not conflict with emacs keybindings. The
-- "windows key" is usually mod4Mask.
--
myModMask = mod4Mask
-- The default number of workspaces (virtual screens) and their names.
-- By default we use numeric strings, but any string may be used as a
-- workspace name. The number of workspaces is determined by the length
-- of this list.
--
-- A tagging example:
--
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--
myWorkspaces = ["term", "web", "code", "debug", "docs"] ++ map show [6..9]
-- Border colors for unfocused and focused windows, respectively.
--
myNormalBorderColor = "#dddddd"
myFocusedBorderColor = "#ff0000"
------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here.
--
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- launch a terminal
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
-- launch dmenu
, ((modm, xK_p ), spawn "rofi -show drun")
-- close focused window
, ((modm .|. shiftMask, xK_c ), kill)
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((modm, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm, xK_Return), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm, xK_l ), sendMessage Expand)
-- Push window back into tiling
, ((modm, xK_t ), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
--
-- , ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io exitSuccess)
-- Restart xmonad
, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
-- Run xmessage with a summary of the default keybindings (useful for beginners)
, ((modm .|. shiftMask, xK_slash ), xmessage help)
]
++
--
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
--
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
--
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
--
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events
--
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster)
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), \w -> focus w >> windows W.shiftMaster)
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), \w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster)
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]
------------------------------------------------------------------------
-- Layouts:
-- You can specify and transform your layouts by modifying these values.
-- If you change layout bindings be sure to use 'mod-shift-space' after
-- restarting (with 'mod-q') to reset your layout state to the new
-- defaults, as xmonad preserves your old layout settings by default.
--
-- The available layouts. Note that each layout is separated by |||,
-- which denotes layout choice.
--
myLayout = tiled ||| Mirror tiled ||| Full
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
------------------------------------------------------------------------
-- Window rules:
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore ]
------------------------------------------------------------------------
-- Event handling
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
--
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
myEventHook = mempty
------------------------------------------------------------------------
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
--
myLogHook = return ()
------------------------------------------------------------------------
-- Startup hook
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
--
-- By default, do nothing.
myStartupHook = do
spawn "feh --bg-scale ~/画像/wallpaper/85444653_p0.jpg"
------------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up.
-- Run xmonad with the settings you specify. No need to modify this.
--
main :: IO()
main = do
xmobar myConfig >>= xmonad
-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
--
-- No need to modify this.
--
myConfig = def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = myLayout,
manageHook = myManageHook,
handleEventHook = myEventHook,
logHook = myLogHook,
startupHook = myStartupHook
}
-- | Finally, a copy of the default bindings in simple textual tabular format.
help :: String
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
"",
"-- launching and killing programs",
"mod-Shift-Enter Launch xterminal",
"mod-p Launch dmenu",
"mod-Shift-p Launch gmrun",
"mod-Shift-c Close/kill the focused window",
"mod-Space Rotate through the available layout algorithms",
"mod-Shift-Space Reset the layouts on the current workSpace to default",
"mod-n Resize/refresh viewed windows to the correct size",
"mod-Shift-/ Show this help message with the default keybindings",
"",
"-- move focus up or down the window stack",
"mod-Tab Move focus to the next window",
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window",
"mod-k Move focus to the previous window",
"mod-m Move focus to the master window",
"",
"-- modifying the window order",
"mod-Return Swap the focused window and the master window",
"mod-Shift-j Swap the focused window with the next window",
"mod-Shift-k Swap the focused window with the previous window",
"",
"-- resizing the master/slave ratio",
"mod-h Shrink the master area",
"mod-l Expand the master area",
"",
"-- floating layer support",
"mod-t Push window back into tiling; unfloat and re-tile it",
"",
"-- increase or decrease number of windows in the master area",
"mod-comma (mod-,) Increment the number of windows in the master area",
"mod-period (mod-.) Deincrement the number of windows in the master area",
"",
"-- quit, or restart",
"mod-Shift-q Quit xmonad",
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N",
"",
"-- Workspaces & screens",
"mod-Shift-[1..9] Move client to workspace N",
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
"",
"-- Mouse bindings: default actions bound to mouse events",
"mod-button1 Set the window to floating mode and move by dragging",
"mod-button2 Raise the window to the top of the stack",
"mod-button3 Set the window to floating mode and resize by dragging"]

View File

@@ -1,18 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
xmobar
dunst
networkmanagerapplet
rofi
feh
pavucontrol
xorg.xkill
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
];
home.file.".config/xmonad/xmonad.hs".source = ./xmonad.hs;
home.file.".config/xmobar/xmobarrc".source = ./xmobarrc;
}

View File

@@ -3,6 +3,16 @@ let
alacrittyconf = pkgs.writeText "alacritty.toml" '' alacrittyconf = pkgs.writeText "alacritty.toml" ''
[window] [window]
opacity = 0.85 opacity = 0.85
[scrolling]
history = 25000
multiplier = 5
[font]
normal = { family = "0xProto Nerd Font Mono", style = "Regular" }
bold = { family = "0xProto Nerd Font Mono", style = "Bold" }
italic = { family = "0xProto Nerd Font Mono", style = "Italic" }
size = 12.00
''; '';
in in
pkgs.symlinkJoin { pkgs.symlinkJoin {

View File

@@ -3,6 +3,7 @@ let
packages = { packages = {
alacritty = pkgs.callPackage ./alacritty {}; alacritty = pkgs.callPackage ./alacritty {};
bash = pkgs.callPackage ./bash {}; bash = pkgs.callPackage ./bash {};
fastfetch = pkgs.callPackage ./fastfetch {};
}; };
in in
{ {

View File

@@ -0,0 +1,130 @@
{ pkgs, ... }:
let
config_file = pkgs.writeText "fastfetch-config.jsonc" ''
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"height": 24,
},
"modules": [
"title",
"separator",
{
"type": "os",
"key": " OS",
"keyColor": "yellow",
"format": "{2}"
},
{
"type": "os",
"key": "[]",
"keyColor": "yellow",
"format": "{2} {10} {11}"
},
{
"type": "kernel",
"key": "[]",
"keyColor": "yellow",
"format": "{1} {2} {4}"
},
{
"type": "initsystem",
"key": "[󰅕]",
"keyColor": "yellow",
"format": "{1} {3}"
},
{
"type": "packages",
"key": "[󰏖]",
"keyColor": "yellow",
"format": "Nix: {9} Flatpak: {14} All: {1}"
},
{
"type": "shell",
"key": "[]",
"keyColor": "yellow",
"format": "{1} {4}"
},
"break",
{
"type": "wm",
"key": " DE/WM",
"keyColor": "blue"
},
{
"type": "lm",
"key": "[󰍂]",
"keyColor": "blue",
"format": "{1} {2} {3}"
},
{
"type": "wmtheme",
"key": "[]",
"keyColor": "blue"
},
{
"type": "terminal",
"key": "[]",
"keyColor": "blue",
"format": "{5} {6}"
},
{
"type": "editor",
"key": "[󱩽]",
"keyColor": "blue",
"format": "{2} {4} ({1})"
},
"break",
{
"type": "custom",
"key": " PC",
"keyColor": "green"
},
{
"type": "cpu",
"key": "[]",
"keyColor": "green"
},
{
"type": "gpu",
"key": "[󰋩]",
"keyColor": "green"
},
{
"type": "disk",
"key": "[]",
"keyColor": "green"
},
{
"type": "memory",
"key": "[]",
"keyColor": "green"
},
{
"type": "swap",
"key": "[󰓡]",
"keyColor": "green"
},
{
"type": "display",
"key": "[󰍹]",
"keyColor": "green",
},
{
"type": "uptime",
"key": "[󰔛]",
"keyColor": "green",
"format": "{1}d, {2}h, {3}m, {4}s, since {6}"
}
]
}
'';
in
pkgs.symlinkJoin {
name = "fastfetch-wrapped";
paths = with pkgs; [ fastfetch ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/fastfetch --add-flags "-c ${config_file}"
'';
}