Compare commits
11 commits
c650df2204
...
2a4316b08a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a4316b08a | ||
|
|
69abb3c54a | ||
|
|
33375a30f6 | ||
|
|
32506837ad | ||
|
|
9584c63aa2 | ||
|
|
693af2e90a | ||
|
|
09a3669b57 | ||
|
|
7a1d47172b | ||
|
|
e3d3ab6bf6 | ||
|
|
046f061657 | ||
|
|
55903a2242 |
52
flake.lock
52
flake.lock
|
|
@ -5,11 +5,11 @@
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727826117,
|
"lastModified": 1730504689,
|
||||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -26,11 +26,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729776962,
|
"lastModified": 1732539262,
|
||||||
"narHash": "sha256-+aVNtTBq61XMr5fmRluwfbv624axzV5Y6DxLaww71ZI=",
|
"narHash": "sha256-FdVYqG37TYGC/oiXpFt8VVHTv7lCyjc3UxPaZIxvWCI=",
|
||||||
"owner": "wamserma",
|
"owner": "wamserma",
|
||||||
"repo": "flake-programs-sqlite",
|
"repo": "flake-programs-sqlite",
|
||||||
"rev": "34923154bf9ab189bd24499c265c0c90a41327ab",
|
"rev": "9355bb57fbc60103e933e081e36f9712e3b3bc66",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -46,11 +46,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729716953,
|
"lastModified": 1732482255,
|
||||||
"narHash": "sha256-FbRKGRRd0amsk/WS/UV9ukJ8jT1dZ2pJBISxkX+uq6A=",
|
"narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a4353cc43d1b4dd6bdeacea90eb92a8b7b78a9d7",
|
"rev": "a9953635d7f34e7358d5189751110f87e3ac17da",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -68,11 +68,11 @@
|
||||||
"umu": "umu"
|
"umu": "umu"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730425644,
|
"lastModified": 1732543374,
|
||||||
"narHash": "sha256-dfxO6mkn1KkotGQXV93m/2MoS9ayLUwaIIbR3mReLd0=",
|
"narHash": "sha256-suhk41NhdsnN3aa7gpsr8KnYJtbaLeZBJMB2vqWbkzA=",
|
||||||
"owner": "fufexan",
|
"owner": "fufexan",
|
||||||
"repo": "nix-gaming",
|
"repo": "nix-gaming",
|
||||||
"rev": "bcc7c896b56ccd644ca2daea74dac05c1731f59d",
|
"rev": "18b8f0796f3e9dd8b9d9f262a56f2914a0586a22",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -83,11 +83,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729665710,
|
"lastModified": 1732014248,
|
||||||
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
|
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d",
|
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -99,23 +99,23 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727825735,
|
"lastModified": 1730504152,
|
||||||
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
|
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729691686,
|
"lastModified": 1731797254,
|
||||||
"narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=",
|
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37",
|
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -143,11 +143,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "packaging/nix",
|
"dir": "packaging/nix",
|
||||||
"lastModified": 1729978972,
|
"lastModified": 1732337089,
|
||||||
"narHash": "sha256-Zox0iAi4CRPn4rxrhOetFFZ2jcSipe8tGD8nMTgcjhE=",
|
"narHash": "sha256-dwFza03ETqrcmVGSCdgDDKTWKRgckpQ3vXkZRCYtM9g=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "72499f349ca81cb2838eced9d7c465b2cf71c4a2",
|
"rev": "f6a6af3191f5497d95d8f8aaa08826a45da199c4",
|
||||||
"revCount": 825,
|
"revCount": 842,
|
||||||
"submodules": true,
|
"submodules": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"
|
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,15 @@
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c547", ATTR{power/wakeup}="disabled"
|
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c547", ATTR{power/wakeup}="disabled"
|
||||||
'';
|
'';
|
||||||
|
networking.firewall = {
|
||||||
|
logReversePathDrops = true;
|
||||||
|
extraCommands = ''
|
||||||
|
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
|
||||||
|
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
|
||||||
|
'';
|
||||||
|
extraStopCommands = ''
|
||||||
|
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
|
||||||
|
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,24 @@
|
||||||
{config, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../../../../user
|
../../../../user
|
||||||
];
|
];
|
||||||
|
|
||||||
home.username = "ahnwuoa";
|
home.username = "ahnwuoa";
|
||||||
|
services.activitywatch = {
|
||||||
|
enable = true;
|
||||||
|
watchers = {
|
||||||
|
aw-watcher-afk.package = pkgs.activitywatch;
|
||||||
|
aw-watcher-window.package = pkgs.activitywatch;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.targets.activitywatch = {
|
||||||
|
Unit.Requires = lib.mkForce ["autostart.target"];
|
||||||
|
Unit.After = lib.mkForce ["autostart.target"];
|
||||||
|
Install.WantedBy = lib.mkForce ["autostart.target"];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
environment.pathsToLink = ["/libexec"];
|
environment.pathsToLink = ["/libexec"];
|
||||||
environment.localBinInPath = true;
|
environment.localBinInPath = true;
|
||||||
|
services.globalprotect.enable = true;
|
||||||
|
|
||||||
boot.tmp.useTmpfs = true;
|
boot.tmp.useTmpfs = true;
|
||||||
|
|
||||||
|
|
@ -36,6 +37,8 @@
|
||||||
settings.default = ["Alacritty.desktop"];
|
settings.default = ["Alacritty.desktop"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.etc."ssh/ssh_config".text = lib.mkAfter "Include /home/*/.local/ssh/config";
|
||||||
|
|
||||||
programs.command-not-found.dbPath = flake-programs-sqlite.packages.${pkgs.system}.programs-sqlite;
|
programs.command-not-found.dbPath = flake-programs-sqlite.packages.${pkgs.system}.programs-sqlite;
|
||||||
|
|
||||||
programs.ssh.enableAskPassword = false;
|
programs.ssh.enableAskPassword = false;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
{...}: {
|
{pkgs, ...}: {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autorun = false;
|
autorun = false;
|
||||||
displayManager.sx.enable = true;
|
displayManager.sx.enable = true;
|
||||||
windowManager.awesome.enable = true;
|
windowManager.awesome = {
|
||||||
|
enable = true;
|
||||||
|
luaModules = [pkgs.luaPackages.vicious];
|
||||||
|
};
|
||||||
desktopManager.plasma5.enable = true;
|
desktopManager.plasma5.enable = true;
|
||||||
autoRepeatDelay = 200;
|
autoRepeatDelay = 200;
|
||||||
autoRepeatInterval = 30;
|
autoRepeatInterval = 30;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,4 @@
|
||||||
package = pkgs.libsForQt5.partitionmanager;
|
package = pkgs.libsForQt5.partitionmanager;
|
||||||
};
|
};
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
systemd.user.services = {
|
|
||||||
plasma-kactivitymanagerd.enable = false;
|
|
||||||
plasma-xdg-desktop-portal-kde.enable = false;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
user/autostart.nix
Normal file
22
user/autostart.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{pkgs, pkgs-stable, ...}: {
|
||||||
|
systemd.user.targets.autostart = {
|
||||||
|
Unit = {
|
||||||
|
Wants = [
|
||||||
|
"plasma-polkit-agent.service"
|
||||||
|
"plasma-xdg-desktop-portal-kde.service"
|
||||||
|
"plasma-dolphin.service"
|
||||||
|
"xdg-desktop-portal.service"
|
||||||
|
"copyq.service"
|
||||||
|
"fcitx5.service"
|
||||||
|
"picom.service"
|
||||||
|
"safeeyes.service"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.services = {
|
||||||
|
copyq.Service.ExecStart = ["${pkgs.copyq}/bin/copyq"];
|
||||||
|
fcitx5.Service.ExecStart = ["/run/current-system/sw/bin/fcitx5"];
|
||||||
|
picom.Service.ExecStart = ["${pkgs.picom}/bin/picom"];
|
||||||
|
safeeyes.Service.ExecStart = ["${pkgs-stable.safeeyes}/bin/safeeyes"];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
}: let
|
}: let
|
||||||
deps = {
|
deps = {
|
||||||
bell = [pkgs.pipewire pkgs.libnotify];
|
bell = [pkgs.pipewire pkgs.libnotify];
|
||||||
nsxiv-rifle = [pkgs.nsxiv];
|
#nsxiv-rifle = [pkgs.nsxiv];
|
||||||
screenshot = [pkgs.maim pkgs.xclip];
|
#screenshot = [pkgs.maim pkgs.xclip];
|
||||||
};
|
};
|
||||||
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/bin/${x}";
|
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/bin/${x}";
|
||||||
in {
|
in {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ "$#" -ne 1 ]; then
|
if [ "$#" -ne 1 ]; then
|
||||||
echo "usage: $0 <file>"
|
echo "usage: ${0##*/} <file>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ local awful = require("awful")
|
||||||
require("awful.autofocus")
|
require("awful.autofocus")
|
||||||
-- Widget and layout library
|
-- Widget and layout library
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
|
local vicious = require("vicious")
|
||||||
-- Theme handling library
|
-- Theme handling library
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
-- Notification library
|
-- Notification library
|
||||||
|
|
@ -110,11 +111,33 @@ menubar.menu_gen.all_categories = {}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- Keyboard map indicator and switcher
|
-- Keyboard map indicator and switcher
|
||||||
mykeyboardlayout = awful.widget.keyboardlayout()
|
-- mykeyboardlayout = awful.widget.keyboardlayout()
|
||||||
|
|
||||||
-- {{{ Wibar
|
-- {{{ Wibar
|
||||||
-- Create a textclock widget
|
-- Create a textclock widget
|
||||||
mytextclock = wibox.widget.textclock()
|
mytextclock = wibox.widget.textclock()
|
||||||
|
cal_style = {
|
||||||
|
bg_color = "#dddddd",
|
||||||
|
fg_color = "#222222",
|
||||||
|
border_width = 0,
|
||||||
|
}
|
||||||
|
cal = awful.widget.calendar_popup.month {
|
||||||
|
margin = 10,
|
||||||
|
bg = "#ff0000",
|
||||||
|
start_sunday = true,
|
||||||
|
style_normal = cal_style,
|
||||||
|
style_header = cal_style,
|
||||||
|
style_weekday = cal_style,
|
||||||
|
style_month = cal_style,
|
||||||
|
style_focus = { border_width = 0 },
|
||||||
|
}
|
||||||
|
cal:attach(mytextclock, "tr", {on_hover=false})
|
||||||
|
memw = wibox.widget.textbox()
|
||||||
|
cpuw = wibox.widget.textbox()
|
||||||
|
vicious.cache(vicious.widgets.mem)
|
||||||
|
vicious.cache(vicious.widgets.cpu)
|
||||||
|
vicious.register(memw, vicious.widgets.mem, " $1% ($2M)", 13)
|
||||||
|
vicious.register(cpuw, vicious.widgets.cpu, " $1%", 17)
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
-- Create a wibox for each screen and add it
|
||||||
local taglist_buttons = gears.table.join(
|
local taglist_buttons = gears.table.join(
|
||||||
|
|
@ -204,7 +227,7 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Create the wibox
|
-- Create the wibox
|
||||||
s.mywibox = awful.wibar({ position = "top", screen = s })
|
s.mywibox = awful.wibar({ position = "top", screen = s, margins = 10 })
|
||||||
|
|
||||||
-- Add widgets to the wibox
|
-- Add widgets to the wibox
|
||||||
s.mywibox:setup {
|
s.mywibox:setup {
|
||||||
|
|
@ -218,7 +241,9 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
s.mytasklist, -- Middle widget
|
s.mytasklist, -- Middle widget
|
||||||
{ -- Right widgets
|
{ -- Right widgets
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
mykeyboardlayout,
|
spacing = 10,
|
||||||
|
cpuw,
|
||||||
|
memw,
|
||||||
wibox.widget.systray(),
|
wibox.widget.systray(),
|
||||||
mytextclock,
|
mytextclock,
|
||||||
s.mylayoutbox,
|
s.mylayoutbox,
|
||||||
|
|
@ -618,11 +643,13 @@ client.connect_signal("mouse::enter", function(c)
|
||||||
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
||||||
end)
|
end)
|
||||||
client.connect_signal("property::floating", function(c)
|
client.connect_signal("property::floating", function(c)
|
||||||
|
if c.titlebars_enabled then
|
||||||
if c.floating then
|
if c.floating then
|
||||||
awful.titlebar(c, {bg = "#7d92c6"})
|
awful.titlebar(c, {bg = "#7d92c6"})
|
||||||
else
|
else
|
||||||
awful.titlebar(c, {bg = beautiful.titlebar_bg_normal})
|
awful.titlebar(c, {bg = beautiful.titlebar_bg_normal})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,10 @@ theme.border_normal = "#000000"
|
||||||
theme.border_focus = "#4949ff"
|
theme.border_focus = "#4949ff"
|
||||||
theme.border_marked = "#91231c"
|
theme.border_marked = "#91231c"
|
||||||
|
|
||||||
|
theme.snap_bg = "#ddeedd"
|
||||||
|
local gears = require("gears")
|
||||||
|
theme.snap_shape = gears.shape.rectangle
|
||||||
|
|
||||||
-- There are other variable sets
|
-- There are other variable sets
|
||||||
-- overriding the default one when
|
-- overriding the default one when
|
||||||
-- defined, the sets are:
|
-- defined, the sets are:
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,6 @@ alias ll='ls -la'
|
||||||
alias la='ls -la'
|
alias la='ls -la'
|
||||||
alias l='ls'
|
alias l='ls'
|
||||||
|
|
||||||
if [[ -e ~/.local/ssh/config ]]; then
|
|
||||||
alias ssh="ssh -F ~/.local/ssh/config"
|
|
||||||
alias sftp="sftp -F ~/.local/ssh/config"
|
|
||||||
alias scp="scp -F ~/.local/ssh/config"
|
|
||||||
alias rsync="rsync -e 'ssh -F $HOME/.local/ssh/config'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# replace cat with bat
|
# replace cat with bat
|
||||||
_exists bat && alias cat='bat'
|
_exists bat && alias cat='bat'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ _load history
|
||||||
_load aliases
|
_load aliases
|
||||||
# set xdg env vars to keep home directory clean
|
# set xdg env vars to keep home directory clean
|
||||||
_load xdg
|
_load xdg
|
||||||
|
_load show
|
||||||
|
|
||||||
if _exists fzf; then
|
if _exists fzf; then
|
||||||
export FZF_DEFAULT_OPTS="--bind=ctrl-u:page-up,ctrl-d:page-down"
|
export FZF_DEFAULT_OPTS="--bind=ctrl-u:page-up,ctrl-d:page-down"
|
||||||
|
|
|
||||||
32
user/config/bash/show
Normal file
32
user/config/bash/show
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
function show() {
|
||||||
|
if [[ "$#" -ne 1 ]]; then
|
||||||
|
echo "usage: show <prog>" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
case "$(type -t "$1")" in
|
||||||
|
alias)
|
||||||
|
alias "$1" | bat -pl sh ;;
|
||||||
|
keyword|builtin)
|
||||||
|
help "$1" ;;
|
||||||
|
function)
|
||||||
|
declare -f "$1" | bat -l sh ;;
|
||||||
|
file)
|
||||||
|
local path="$(which "$1")"
|
||||||
|
local real="$(realpath "$path")"
|
||||||
|
[[ "$path" != "$real" ]] && echo "$path"
|
||||||
|
bat "$real" ;;
|
||||||
|
"")
|
||||||
|
echo "$1 doesn't exist" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
function goto() {
|
||||||
|
if [[ "$#" -ne 1 ]]; then
|
||||||
|
echo "usage: goto <prog>" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local path="$(which "$1")"
|
||||||
|
[[ -z "$path" ]] && return 2
|
||||||
|
local real="$(realpath "$path")"
|
||||||
|
cd "${real%/*}"
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
xdg.configFile.kiorc.source = ./kiorc;
|
xdg.configFile.kiorc.source = ./kiorc;
|
||||||
xdg.configFile.kservicemenurc.source = ./kservicemenurc;
|
xdg.configFile.kservicemenurc.source = ./kservicemenurc;
|
||||||
xdg.configFile.lightlyrc.source = ./lightlyrc;
|
xdg.configFile.lightlyrc.source = ./lightlyrc;
|
||||||
|
xdg.configFile.xdg-desktop-portal-kderc.source = ./xdg-desktop-portal-kderc;
|
||||||
xdg.dataFile."ark/ark_recentfiles" = {
|
xdg.dataFile."ark/ark_recentfiles" = {
|
||||||
text = "";
|
text = "";
|
||||||
force = true;
|
force = true;
|
||||||
|
|
|
||||||
24
user/config/kde/xdg-desktop-portal-kderc
Normal file
24
user/config/kde/xdg-desktop-portal-kderc
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
[FileDialogSize]
|
||||||
|
2 screens: Height=788
|
||||||
|
2 screens: Width=1286
|
||||||
|
|
||||||
|
[KFileDialog Settings]
|
||||||
|
detailViewIconSize=48
|
||||||
|
Allow Expansion=false
|
||||||
|
Automatically select filename extension=true
|
||||||
|
Breadcrumb Navigation=true
|
||||||
|
Decoration position=2
|
||||||
|
LocationCombo Completionmode=5
|
||||||
|
PathCombo Completionmode=5
|
||||||
|
Show Bookmarks=false
|
||||||
|
Show Full Path=false
|
||||||
|
Show Inline Previews=true
|
||||||
|
Show Preview=false
|
||||||
|
Show Speedbar=true
|
||||||
|
Show hidden files=true
|
||||||
|
Sort by=Name
|
||||||
|
Sort directories first=true
|
||||||
|
Sort hidden files last=false
|
||||||
|
Sort reversed=false
|
||||||
|
Speedbar Width=170
|
||||||
|
View Style=Detail
|
||||||
|
|
@ -1,47 +1,21 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# set keyboard repeat rate
|
export QT_QPA_PLATFORMTHEME="qt6ct"
|
||||||
xset r rate 200 30
|
|
||||||
|
|
||||||
# monitor settings
|
|
||||||
xrandr --output DisplayPort-1 --mode 1920x1080 --rate 144
|
|
||||||
|
|
||||||
# tablet settings
|
|
||||||
xsetwacom set "Wacom One by Wacom S Pen stylus" MapToOutput DisplayPort-0
|
|
||||||
|
|
||||||
# set color temperature
|
|
||||||
sct 4500
|
|
||||||
|
|
||||||
# compositor
|
|
||||||
picom &
|
|
||||||
|
|
||||||
LIBEXEC=/run/current-system/sw/libexec
|
|
||||||
[ -d "$LIBEXEC" ] || LIBEXEC=/usr/lib
|
|
||||||
# session manager
|
|
||||||
"$LIBEXEC"/polkit-kde-authentication-agent-1 &
|
|
||||||
# desktop portal
|
|
||||||
"$LIBEXEC"/xdg-desktop-portal-kde &
|
|
||||||
"$LIBEXEC"/xdg-desktop-portal &
|
|
||||||
kded5 &
|
|
||||||
|
|
||||||
# ime
|
|
||||||
export GTK_IM_MODULE=fctix
|
export GTK_IM_MODULE=fctix
|
||||||
export QT_IM_MODULE=fcitx
|
export QT_IM_MODULE=fcitx
|
||||||
export XMODIFIERS=@im=fcitx
|
export XMODIFIERS=@im=fcitx
|
||||||
fcitx5 &
|
|
||||||
|
|
||||||
# file manager daemon
|
|
||||||
dolphin --daemon &
|
|
||||||
|
|
||||||
# qt setting
|
|
||||||
export QT_QPA_PLATFORMTHEME="qt6ct"
|
|
||||||
# same dpi for multi monitor
|
|
||||||
export WINIT_X11_SCALE_FACTOR=1
|
export WINIT_X11_SCALE_FACTOR=1
|
||||||
|
|
||||||
safeeyes &
|
_vars="DBUS_SESSION_BUS_ADDRESS DISPLAY SSH_AUTH_SOCK XAUTHORITY XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID QT_PLUGIN_PATH QML2_IMPORT_PATH QT_QPA_PLATFORMTHEME QT_STYLE_OVERRIDE NIX_XDG_DESKTOP_PORTAL_DIR"
|
||||||
|
systemctl --user import-environment $_vars
|
||||||
copyq &
|
dbus-update-activation-environment $_vars
|
||||||
|
|
||||||
xrdb -merge ~/.config/Xresources
|
xrdb -merge ~/.config/Xresources
|
||||||
|
xset r rate 200 30
|
||||||
|
xrandr --output DisplayPort-1 --mode 1920x1080 --rate 144
|
||||||
|
xsetwacom set "Wacom One by Wacom S Pen stylus" MapToOutput DisplayPort-0
|
||||||
|
sct 4500
|
||||||
|
|
||||||
exec "${1:-awesome}"
|
systemctl --user start autostart.target
|
||||||
|
|
||||||
|
exec ${@:-awesome}
|
||||||
|
|
|
||||||
|
|
@ -92,16 +92,15 @@ bind -T copy-mode-vi y send -X copy-selection
|
||||||
unbind -T copy-mode-vi MouseDragEnd1Pane
|
unbind -T copy-mode-vi MouseDragEnd1Pane
|
||||||
|
|
||||||
# use arrow keys when scrolling on certain commands
|
# use arrow keys when scrolling on certain commands
|
||||||
tmux_commands_with_legacy_scroll="nano less more man git"
|
|
||||||
bind -T root WheelUpPane \
|
bind -T root WheelUpPane \
|
||||||
if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
|
if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
|
||||||
'send -Mt=' \
|
'send -Mt=' \
|
||||||
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
'if-shell -t= "#{?alternate_on,true,false} || echo \"nano less more man git journalctl\" | grep -q \"#{pane_current_command}\"" \
|
||||||
"send -t= Up Up Up" "copy-mode -et="'
|
"send -t= Up Up Up" "copy-mode -et="'
|
||||||
bind -T root WheelDownPane \
|
bind -T root WheelDownPane \
|
||||||
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
|
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
|
||||||
'send -Mt=' \
|
'send -Mt=' \
|
||||||
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
'if-shell -t= "#{?alternate_on,true,false} || echo \"nano less more man git journalctl\" | grep -q \"#{pane_current_command}\"" \
|
||||||
"send -t= Down Down Down" "send -Mt="'
|
"send -t= Down Down Down" "send -Mt="'
|
||||||
|
|
||||||
### plugins
|
### plugins
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
./autostart.nix
|
||||||
./bin
|
./bin
|
||||||
./config
|
./config
|
||||||
./home.nix
|
./home.nix
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
(pkgs.symlinkJoin {
|
(pkgs.symlinkJoin {
|
||||||
name = "firefox";
|
name = "firefox";
|
||||||
paths = [pkgs-stable.firefox];
|
paths = [pkgs.firefox-bin];
|
||||||
buildInputs = [pkgs.makeWrapper];
|
buildInputs = [pkgs.makeWrapper];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/firefox \
|
wrapProgram $out/bin/firefox \
|
||||||
|
|
@ -18,10 +18,16 @@
|
||||||
})
|
})
|
||||||
alacritty
|
alacritty
|
||||||
mpv
|
mpv
|
||||||
nsxiv
|
(nsxiv.overrideAttrs {
|
||||||
|
buildInputs = pkgs.nsxiv.buildInputs ++ [pkgs.xorg.libXcursor];
|
||||||
|
env.NIX_LDFLAGS = "-lXcursor";
|
||||||
|
})
|
||||||
rofi
|
rofi
|
||||||
sct
|
sct
|
||||||
maim
|
(maim.overrideAttrs {
|
||||||
|
buildInputs = pkgs.maim.buildInputs ++ [pkgs.xorg.libXcursor];
|
||||||
|
env.NIX_LDFLAGS = "-lXcursor";
|
||||||
|
})
|
||||||
xclip
|
xclip
|
||||||
copyq
|
copyq
|
||||||
picom
|
picom
|
||||||
|
|
@ -54,6 +60,8 @@
|
||||||
file
|
file
|
||||||
nix-tree
|
nix-tree
|
||||||
alejandra
|
alejandra
|
||||||
|
ffmpeg
|
||||||
|
ffsubsync
|
||||||
|
|
||||||
(python312.withPackages (python-pkgs: [
|
(python312.withPackages (python-pkgs: [
|
||||||
python-pkgs.pwntools
|
python-pkgs.pwntools
|
||||||
|
|
@ -68,6 +76,7 @@
|
||||||
coqPackages.coqide
|
coqPackages.coqide
|
||||||
gcc
|
gcc
|
||||||
sqlitebrowser
|
sqlitebrowser
|
||||||
|
globalprotect-openconnect
|
||||||
|
|
||||||
tmuxPlugins.vim-tmux-navigator
|
tmuxPlugins.vim-tmux-navigator
|
||||||
tmuxPlugins.sessionist
|
tmuxPlugins.sessionist
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme.name = "qtct";
|
platformTheme.name = "qtct";
|
||||||
style.name = "breeze";
|
style.name = "breeze";
|
||||||
style.package = pkgs.libsForQt5.breeze-qt5;
|
style.package = pkgs.kdePackages.breeze;
|
||||||
};
|
};
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -15,12 +15,12 @@
|
||||||
gtk3.extraConfig = {gtk-recent-files-limit = 0;};
|
gtk3.extraConfig = {gtk-recent-files-limit = 0;};
|
||||||
theme = {
|
theme = {
|
||||||
name = "Breeze";
|
name = "Breeze";
|
||||||
package = pkgs.libsForQt5.breeze-gtk;
|
package = pkgs.kdePackages.breeze-gtk;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
name = "breeze_cursors";
|
name = "breeze_cursors";
|
||||||
package = pkgs.libsForQt5.breeze-qt5;
|
package = pkgs.kdePackages.breeze;
|
||||||
size = 24;
|
size = 24;
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
x11.enable = true;
|
x11.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@
|
||||||
};
|
};
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configPackages = [pkgs.libsForQt5.xdg-desktop-portal-kde];
|
configPackages = [pkgs.kdePackages.xdg-desktop-portal-kde];
|
||||||
extraPortals = [pkgs.libsForQt5.xdg-desktop-portal-kde];
|
extraPortals = [pkgs.kdePackages.xdg-desktop-portal-kde];
|
||||||
config.common.default = "kde";
|
config.common.default = "kde";
|
||||||
};
|
};
|
||||||
home.file = let
|
home.file = let
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue