Compare commits
4
Commits
6f5de9f1c0
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dfde2bab6
|
||
|
|
41491f62ab
|
||
|
|
8404b00550
|
||
|
|
48e6eaa112
|
Generated
+1
-36
@@ -20,41 +20,7 @@
|
||||
"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": {
|
||||
"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": {
|
||||
"lastModified": 1788179007,
|
||||
"narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=",
|
||||
@@ -73,8 +39,7 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"kutu": "kutu",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
kutu.url = "git+https://git.syedm.dev/syedm/kutu.rb.git";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -12,7 +10,6 @@
|
||||
|
||||
outputs =
|
||||
{
|
||||
kutu,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
...
|
||||
@@ -42,7 +39,6 @@
|
||||
|
||||
tardis = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit kutu; };
|
||||
modules = commonModules ++ [
|
||||
./hosts/tardis
|
||||
{ home-manager.users.me = import ./home/tardis.nix; }
|
||||
|
||||
+136
-60
@@ -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"
|
||||
bind_key 24, true, :kill_window
|
||||
bind_key 25, true, "kitty"
|
||||
bind_key 26, true, "bash @src@/power.sh"
|
||||
MAX_PROJECTS = 3
|
||||
|
||||
bind_key 123, false, %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
|
||||
)
|
||||
SPECIAL = {
|
||||
terminal: { cmd: 'kitty' },
|
||||
browser: { cmd: 'firefox' },
|
||||
misc: { cmd: nil }
|
||||
}
|
||||
|
||||
bind_key 122, false, %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
|
||||
)
|
||||
$current = 0
|
||||
|
||||
bind_key 121, false, %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
|
||||
)
|
||||
system "bash #{SRC}/startup.sh >/dev/null 2>&1 &"
|
||||
|
||||
bind_key 38, true, %Q(
|
||||
def project_ws(n)
|
||||
:"p#{n}"
|
||||
end
|
||||
|
||||
def go_project(n)
|
||||
$current = n
|
||||
jump_ws project_ws($current)
|
||||
end
|
||||
|
||||
def in_project?(ws)
|
||||
!SPECIAL.key?(ws)
|
||||
end
|
||||
|
||||
def go_special(name, ws)
|
||||
cfg = SPECIAL.fetch(name)
|
||||
|
||||
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 'q' do |x|
|
||||
kill x
|
||||
end
|
||||
|
||||
bind 'w' do
|
||||
system 'kitty >/dev/null 2>&1 &'
|
||||
end
|
||||
|
||||
bind 'e' do
|
||||
system "bash #{SRC}/power.sh >/dev/null 2>&1 &"
|
||||
end
|
||||
|
||||
bind 'd' do
|
||||
system "bash #{SRC}/run.sh >/dev/null 2>&1 &"
|
||||
end
|
||||
|
||||
bind 'v' do
|
||||
system 'CM_LAUNCHER=rofi clipmenu >/dev/null 2>&1 &'
|
||||
end
|
||||
|
||||
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 232, false, %q(
|
||||
bind 123, :none do
|
||||
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 122, :none do
|
||||
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 121, :none do
|
||||
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 232, :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 233, false, %q(
|
||||
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 54, true, 'kitty -e fish -c "y"'
|
||||
bind_key 53, true, 'kitty -e fish -c "editor"'
|
||||
bind_key 41, true, 'kitty -e fish -c "btop"'
|
||||
bind 'x' do
|
||||
system 'kitty -e fish -c "editor" >/dev/null 2>&1 &'
|
||||
end
|
||||
|
||||
bind_key 40, true, "bash @src@/run.sh"
|
||||
bind 'c' do
|
||||
system 'kitty -e fish -c "y" >/dev/null 2>&1 &'
|
||||
end
|
||||
|
||||
bind_key 56, true, :add_workspace
|
||||
bind_key 57, true, :delete_workspace
|
||||
bind 's' do |x|
|
||||
toggle_float x
|
||||
end
|
||||
|
||||
bind_key 110, false, %q(
|
||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify \
|
||||
/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause;
|
||||
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 'f' do
|
||||
system 'kitty -e fish -c "btop" >/dev/null 2>&1 &'
|
||||
end
|
||||
|
||||
bind_key 173, true,
|
||||
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
|
||||
bind 80, :none do |_, ws|
|
||||
go_special :terminal, ws
|
||||
end
|
||||
|
||||
bind_key 171, true,
|
||||
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
|
||||
bind 79, :none do |_, ws|
|
||||
go_special :browser, ws
|
||||
end
|
||||
|
||||
bind_key 89, true, :toggle_scratchpad
|
||||
bind 89 do |_, ws|
|
||||
go_special :misc, ws
|
||||
end
|
||||
|
||||
bind_key 81, true, :toggle_move_scratchpad
|
||||
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
|
||||
|
||||
bind_key 118, false,
|
||||
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
|
||||
(0..MAX_PROJECTS - 1).each do |n|
|
||||
bind (n + 1).to_s do
|
||||
go_project(n)
|
||||
end
|
||||
end
|
||||
|
||||
bind_key 86, false, :workspace_next
|
||||
bind_key 86, true, :move_window_next_workspace
|
||||
bind 86, :none do |_, ws|
|
||||
next unless in_project?(ws)
|
||||
|
||||
bind_key 82, false, :workspace_previous
|
||||
bind_key 82, true, :move_window_previous_workspace
|
||||
n = (($current - 1 + MAX_PROJECTS) % MAX_PROJECTS)
|
||||
go_project(n)
|
||||
end
|
||||
|
||||
bind_key 10, true, "setxkbmap us"
|
||||
bind_key 11, true, "setxkbmap ara"
|
||||
bind 82, :none do |_, ws|
|
||||
next unless in_project?(ws)
|
||||
|
||||
bind_key 55, true, "CM_LAUNCHER=rofi clipmenu"
|
||||
n = (($current + 1) % MAX_PROJECTS)
|
||||
go_project(n)
|
||||
end
|
||||
|
||||
bind_key 39, true, :toggle_floating
|
||||
|
||||
bind_mouse 8, false, :workspace_next
|
||||
bind_mouse 8, true, :move_window_next_workspace
|
||||
|
||||
bind_mouse 9, false, :workspace_previous
|
||||
bind_mouse 9, true, :move_window_previous_workspace
|
||||
go_project(0)
|
||||
|
||||
@@ -11,5 +11,8 @@ let
|
||||
};
|
||||
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
|
||||
;;
|
||||
*Stop\ KutuWM*)
|
||||
exec kutu-run.rb stop
|
||||
#exec kutu-run.rb stop TODO.
|
||||
pkill X
|
||||
;;
|
||||
*Suspend*)
|
||||
exec systemctl --system suspend
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
declare -A aliases=(
|
||||
[prism]="nvidia-offload prismlauncher"
|
||||
[editor]="kitty -e fish -c editor"
|
||||
[yazi]="kitty -e fish -c yazi"
|
||||
[btop]="kitty -e fish -c btop"
|
||||
|
||||
@@ -10,11 +10,6 @@
|
||||
./rofi
|
||||
];
|
||||
|
||||
xsession = {
|
||||
enable = true;
|
||||
windowManager.command = "kutu.rb";
|
||||
};
|
||||
|
||||
home.file.".xinitrc".text = ''
|
||||
if [ -f ~/.xsession ]; then
|
||||
exec ~/.xsession
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
kutu,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
@@ -31,8 +30,6 @@
|
||||
lunar-client
|
||||
jdk21
|
||||
spotify
|
||||
|
||||
kutu.packages.${stdenv.hostPlatform.system}.default
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
package = pkgs.ollama-cuda;
|
||||
loadModels = [ "deepseek-coder-v2:16b" "qwen3.5:9b" ];
|
||||
loadModels = [
|
||||
"deepseek-coder-v2:16b"
|
||||
"qwen3.5:9b"
|
||||
];
|
||||
environmentVariables = {
|
||||
OLLAMA_KEEP_ALIVE = "20m";
|
||||
};
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user