Compare commits
4
Commits
6f5de9f1c0
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dfde2bab6
|
||
|
|
41491f62ab
|
||
|
|
8404b00550
|
||
|
|
48e6eaa112
|
Generated
+1
-36
@@ -20,41 +20,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"kutu": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1783461814,
|
|
||||||
"narHash": "sha256-ycpzjXjMey4PlAFYeprz2nHI2azxkvEn3wNvHee+Yh0=",
|
|
||||||
"ref": "refs/heads/main",
|
|
||||||
"rev": "4b8599132f26d75bddfe613bcf9697ce0f91d212",
|
|
||||||
"revCount": 40,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.syedm.dev/syedm/kutu.rb.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.syedm.dev/syedm/kutu.rb.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1783148766,
|
|
||||||
"narHash": "sha256-uslt2pqShTIXDdAHRHv2QkYLsVdY8Oqwz0EA48/RSM8=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a50de1b7d8a586adc18d2395c19de7d6058e6030",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-26.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1788179007,
|
"lastModified": 1788179007,
|
||||||
"narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=",
|
"narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=",
|
||||||
@@ -73,8 +39,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"kutu": "kutu",
|
"nixpkgs": "nixpkgs"
|
||||||
"nixpkgs": "nixpkgs_2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
kutu.url = "git+https://git.syedm.dev/syedm/kutu.rb.git";
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -12,7 +10,6 @@
|
|||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
kutu,
|
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
...
|
...
|
||||||
@@ -42,7 +39,6 @@
|
|||||||
|
|
||||||
tardis = nixpkgs.lib.nixosSystem {
|
tardis = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit kutu; };
|
|
||||||
modules = commonModules ++ [
|
modules = commonModules ++ [
|
||||||
./hosts/tardis
|
./hosts/tardis
|
||||||
{ home-manager.users.me = import ./home/tardis.nix; }
|
{ home-manager.users.me = import ./home/tardis.nix; }
|
||||||
|
|||||||
+144
-68
@@ -1,91 +1,167 @@
|
|||||||
run "bash @src@/startup.sh"
|
tmp_src = "@src@"
|
||||||
|
if tmp_src == "@src@"
|
||||||
|
SRC = "~/main/ocaml/epq/scripts"
|
||||||
|
else
|
||||||
|
SRC = tmp_src
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 23, true, "firefox"
|
MAX_PROJECTS = 3
|
||||||
bind_key 24, true, :kill_window
|
|
||||||
bind_key 25, true, "kitty"
|
|
||||||
bind_key 26, true, "bash @src@/power.sh"
|
|
||||||
|
|
||||||
bind_key 123, false, %q(
|
SPECIAL = {
|
||||||
pactl set-sink-volume @DEFAULT_SINK@ +5%;
|
terminal: { cmd: 'kitty' },
|
||||||
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]\+%' | head -n1);
|
browser: { cmd: 'firefox' },
|
||||||
dunstify "Volume Adjusted" "" -h int:value:$vol -r 997
|
misc: { cmd: nil }
|
||||||
)
|
}
|
||||||
|
|
||||||
bind_key 122, false, %q(
|
$current = 0
|
||||||
pactl set-sink-volume @DEFAULT_SINK@ -5%;
|
|
||||||
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]\+%' | head -n1);
|
|
||||||
dunstify "Volume Adjusted" "" -h int:value:$vol -r 997
|
|
||||||
)
|
|
||||||
|
|
||||||
bind_key 121, false, %q(
|
system "bash #{SRC}/startup.sh >/dev/null 2>&1 &"
|
||||||
pactl set-sink-mute @DEFAULT_SINK@ toggle;
|
|
||||||
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]\+%' | head -n1);
|
|
||||||
dunstify "Volume Adjusted" "" -h int:value:$vol -r 997
|
|
||||||
)
|
|
||||||
|
|
||||||
bind_key 38, true, %Q(
|
def project_ws(n)
|
||||||
maim -c 0.3,0.5,1.0,0.8 -s | tee /tmp/screenshot_temp.png | xclip -selection clipboard -t image/png;
|
:"p#{n}"
|
||||||
if [ -s '/tmp/screenshot_temp.png' ]; then
|
end
|
||||||
mv /tmp/screenshot_temp.png ~/screenshots/$(date +%Y-%m-%d_%H:%M:%S).png;
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
|
|
||||||
bind_key 232, false, %q(
|
def go_project(n)
|
||||||
brightnessctl set 5%-;
|
$current = n
|
||||||
pct=$(brightnessctl -m | cut -d, -f4 | tr -d ' %');
|
jump_ws project_ws($current)
|
||||||
dunstify "Brightness" "" -h int:value:$pct -r 998
|
end
|
||||||
)
|
|
||||||
|
|
||||||
bind_key 233, false, %q(
|
def in_project?(ws)
|
||||||
brightnessctl set 5%+;
|
!SPECIAL.key?(ws)
|
||||||
pct=$(brightnessctl -m | cut -d, -f4 | tr -d ' %');
|
end
|
||||||
dunstify "Brightness" "" -h int:value:$pct -r 998
|
|
||||||
)
|
|
||||||
|
|
||||||
bind_key 54, true, 'kitty -e fish -c "y"'
|
def go_special(name, ws)
|
||||||
bind_key 53, true, 'kitty -e fish -c "editor"'
|
cfg = SPECIAL.fetch(name)
|
||||||
bind_key 41, true, 'kitty -e fish -c "btop"'
|
|
||||||
|
|
||||||
bind_key 40, true, "bash @src@/run.sh"
|
if ws == name
|
||||||
|
target = project_ws($current)
|
||||||
|
jump_ws target
|
||||||
|
else
|
||||||
|
jump_ws name
|
||||||
|
system("#{cfg[:cmd]} >/dev/null 2>&1 &") if cfg[:cmd] && ws_empty?(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 56, true, :add_workspace
|
bind 'q' do |x|
|
||||||
bind_key 57, true, :delete_workspace
|
kill x
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 110, false, %q(
|
bind 'w' do
|
||||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify \
|
system 'kitty >/dev/null 2>&1 &'
|
||||||
/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause;
|
end
|
||||||
dbus-send --print-reply --dest=$(busctl --user list | grep -oP 'org.mpris.MediaPlayer2.firefox.instance_1_\d+') \
|
|
||||||
/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
|
|
||||||
)
|
|
||||||
|
|
||||||
bind_key 173, true,
|
bind 'e' do
|
||||||
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
|
system "bash #{SRC}/power.sh >/dev/null 2>&1 &"
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 171, true,
|
bind 'd' do
|
||||||
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
|
system "bash #{SRC}/run.sh >/dev/null 2>&1 &"
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 89, true, :toggle_scratchpad
|
bind 'v' do
|
||||||
|
system 'CM_LAUNCHER=rofi clipmenu >/dev/null 2>&1 &'
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 81, true, :toggle_move_scratchpad
|
bind 'a' do
|
||||||
|
system 'bash', '-c', "
|
||||||
|
maim -c 0.3,0.5,1.0,0.8 -s | tee /tmp/screenshot_temp.png | xclip -selection clipboard -t image/png;
|
||||||
|
if [ -s '/tmp/screenshot_temp.png' ]; then
|
||||||
|
mv /tmp/screenshot_temp.png ~/screenshots/$(date +%Y-%m-%d_%H:%M:%S).png;
|
||||||
|
fi
|
||||||
|
"
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 118, false,
|
bind 123, :none do
|
||||||
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
|
system 'bash', '-c', %q(
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ +5%;
|
||||||
|
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]\+%' | head -n1);
|
||||||
|
dunstify "Volume Adjusted" "" -h int:value:$vol -r 997
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 86, false, :workspace_next
|
bind 122, :none do
|
||||||
bind_key 86, true, :move_window_next_workspace
|
system 'bash', '-c', %q(
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ -5%;
|
||||||
|
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]\+%' | head -n1);
|
||||||
|
dunstify "Volume Adjusted" "" -h int:value:$vol -r 997
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 82, false, :workspace_previous
|
bind 121, :none do
|
||||||
bind_key 82, true, :move_window_previous_workspace
|
system 'bash', '-c', %q(
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ toggle;
|
||||||
|
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]\+%' | head -n1);
|
||||||
|
dunstify "Volume Adjusted" "" -h int:value:$vol -r 997
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 10, true, "setxkbmap us"
|
bind 232, :none do
|
||||||
bind_key 11, true, "setxkbmap ara"
|
system 'bash', '-c', %q(
|
||||||
|
brightnessctl set 5%-;
|
||||||
|
pct=$(brightnessctl -m | cut -d, -f4 | tr -d ' %');
|
||||||
|
dunstify "Brightness" "" -h int:value:$pct -r 998
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 55, true, "CM_LAUNCHER=rofi clipmenu"
|
bind 233, :none do
|
||||||
|
system 'bash', '-c', %q(
|
||||||
|
brightnessctl set 5%+;
|
||||||
|
pct=$(brightnessctl -m | cut -d, -f4 | tr -d ' %');
|
||||||
|
dunstify "Brightness" "" -h int:value:$pct -r 998
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
bind_key 39, true, :toggle_floating
|
bind 'x' do
|
||||||
|
system 'kitty -e fish -c "editor" >/dev/null 2>&1 &'
|
||||||
|
end
|
||||||
|
|
||||||
bind_mouse 8, false, :workspace_next
|
bind 'c' do
|
||||||
bind_mouse 8, true, :move_window_next_workspace
|
system 'kitty -e fish -c "y" >/dev/null 2>&1 &'
|
||||||
|
end
|
||||||
|
|
||||||
bind_mouse 9, false, :workspace_previous
|
bind 's' do |x|
|
||||||
bind_mouse 9, true, :move_window_previous_workspace
|
toggle_float x
|
||||||
|
end
|
||||||
|
|
||||||
|
bind 'f' do
|
||||||
|
system 'kitty -e fish -c "btop" >/dev/null 2>&1 &'
|
||||||
|
end
|
||||||
|
|
||||||
|
bind 80, :none do |_, ws|
|
||||||
|
go_special :terminal, ws
|
||||||
|
end
|
||||||
|
|
||||||
|
bind 79, :none do |_, ws|
|
||||||
|
go_special :browser, ws
|
||||||
|
end
|
||||||
|
|
||||||
|
bind 89 do |_, ws|
|
||||||
|
go_special :misc, ws
|
||||||
|
end
|
||||||
|
|
||||||
|
bind 118, :none do
|
||||||
|
system 'bash', '-c',
|
||||||
|
'dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause >/dev/null 2>&1 &'
|
||||||
|
end
|
||||||
|
|
||||||
|
(0..MAX_PROJECTS - 1).each do |n|
|
||||||
|
bind (n + 1).to_s do
|
||||||
|
go_project(n)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
bind 86, :none do |_, ws|
|
||||||
|
next unless in_project?(ws)
|
||||||
|
|
||||||
|
n = (($current - 1 + MAX_PROJECTS) % MAX_PROJECTS)
|
||||||
|
go_project(n)
|
||||||
|
end
|
||||||
|
|
||||||
|
bind 82, :none do |_, ws|
|
||||||
|
next unless in_project?(ws)
|
||||||
|
|
||||||
|
n = (($current + 1) % MAX_PROJECTS)
|
||||||
|
go_project(n)
|
||||||
|
end
|
||||||
|
|
||||||
|
go_project(0)
|
||||||
|
|||||||
@@ -11,5 +11,8 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.file.".config/kutu/config.rb".source = script;
|
xsession = {
|
||||||
|
enable = true;
|
||||||
|
windowManager.command = "kutu ${script}";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [[ "$(xset q | awk '/timeout:/ {print $2}')" == "0" ]]; then
|
|
||||||
xset s on
|
|
||||||
xset +dpms
|
|
||||||
else
|
|
||||||
xset s off
|
|
||||||
xset -dpms
|
|
||||||
fi
|
|
||||||
@@ -31,7 +31,8 @@ case "$sel" in
|
|||||||
[ "$confirm" = "Yes" ] && exec systemctl --system hibernate
|
[ "$confirm" = "Yes" ] && exec systemctl --system hibernate
|
||||||
;;
|
;;
|
||||||
*Stop\ KutuWM*)
|
*Stop\ KutuWM*)
|
||||||
exec kutu-run.rb stop
|
#exec kutu-run.rb stop TODO.
|
||||||
|
pkill X
|
||||||
;;
|
;;
|
||||||
*Suspend*)
|
*Suspend*)
|
||||||
exec systemctl --system suspend
|
exec systemctl --system suspend
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
declare -A aliases=(
|
declare -A aliases=(
|
||||||
[prism]="nvidia-offload prismlauncher"
|
|
||||||
[editor]="kitty -e fish -c editor"
|
[editor]="kitty -e fish -c editor"
|
||||||
[yazi]="kitty -e fish -c yazi"
|
[yazi]="kitty -e fish -c yazi"
|
||||||
[btop]="kitty -e fish -c btop"
|
[btop]="kitty -e fish -c btop"
|
||||||
|
|||||||
@@ -10,11 +10,6 @@
|
|||||||
./rofi
|
./rofi
|
||||||
];
|
];
|
||||||
|
|
||||||
xsession = {
|
|
||||||
enable = true;
|
|
||||||
windowManager.command = "kutu.rb";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".xinitrc".text = ''
|
home.file.".xinitrc".text = ''
|
||||||
if [ -f ~/.xsession ]; then
|
if [ -f ~/.xsession ]; then
|
||||||
exec ~/.xsession
|
exec ~/.xsession
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
kutu,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
@@ -31,8 +30,6 @@
|
|||||||
lunar-client
|
lunar-client
|
||||||
jdk21
|
jdk21
|
||||||
spotify
|
spotify
|
||||||
|
|
||||||
kutu.packages.${stdenv.hostPlatform.system}.default
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,10 @@
|
|||||||
services.ollama = {
|
services.ollama = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.ollama-cuda;
|
package = pkgs.ollama-cuda;
|
||||||
loadModels = [ "deepseek-coder-v2:16b" "qwen3.5:9b" ];
|
loadModels = [
|
||||||
|
"deepseek-coder-v2:16b"
|
||||||
|
"qwen3.5:9b"
|
||||||
|
];
|
||||||
environmentVariables = {
|
environmentVariables = {
|
||||||
OLLAMA_KEEP_ALIVE = "20m";
|
OLLAMA_KEEP_ALIVE = "20m";
|
||||||
};
|
};
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user