Compare commits
3 Commits
49ba7ddb41
...
248e5a2c05
| Author | SHA1 | Date | |
|---|---|---|---|
| 248e5a2c05 | |||
| 10e0de5b05 | |||
| 2930d71889 |
@@ -2,3 +2,4 @@
|
|||||||
*.vim
|
*.vim
|
||||||
*p.yml
|
*p.yml
|
||||||
.num.json
|
.num.json
|
||||||
|
result
|
||||||
|
|||||||
Generated
+27
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
description = "kutu wm environment";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
(ruby.withPackages (ps: [
|
||||||
|
ps.ffi
|
||||||
|
]))
|
||||||
|
gcc
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
xorg.libxcb
|
||||||
|
xorg.xcbutilwm
|
||||||
|
xorg.xrandr
|
||||||
|
xorg.xprop
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
echo "kutu dev shell"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
packages.${system}.default = pkgs.callPackage ./package.nix {};
|
||||||
|
};
|
||||||
|
}
|
||||||
+60
@@ -0,0 +1,60 @@
|
|||||||
|
{ stdenv
|
||||||
|
, ruby
|
||||||
|
, makeWrapper
|
||||||
|
, pkg-config
|
||||||
|
, xorg
|
||||||
|
, rubyPackages
|
||||||
|
, gcc
|
||||||
|
, lib
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "kutu";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
makeWrapper
|
||||||
|
gcc
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
(ruby.withPackages (ps: [
|
||||||
|
ps.ffi
|
||||||
|
]))
|
||||||
|
xorg.libxcb
|
||||||
|
xorg.xcbutilwm
|
||||||
|
xorg.xrandr
|
||||||
|
xorg.xprop
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
mkdir -p build
|
||||||
|
|
||||||
|
gcc -shared -fPIC \
|
||||||
|
-Wall -Wextra \
|
||||||
|
-o build/X-kutu.so \
|
||||||
|
src/c/X-kutu.c \
|
||||||
|
$(pkg-config --libs --cflags xcb xcb-icccm);
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
mkdir -p $out/build
|
||||||
|
mkdir -p $out/src
|
||||||
|
|
||||||
|
cp bin/kutu.rb $out/bin/kutu.rb
|
||||||
|
cp bin/kutu-run.rb $out/bin/kutu-run.rb
|
||||||
|
|
||||||
|
cp build/X-kutu.so $out/build/
|
||||||
|
cp -r src/. $out/src/
|
||||||
|
|
||||||
|
wrapProgram $out/bin/kutu.rb \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [
|
||||||
|
xorg.xrandr
|
||||||
|
xorg.xprop
|
||||||
|
]}
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -28,9 +28,4 @@ for f in "$DIR/bin/"* "$DIR/src/shell/"*; do
|
|||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
||||||
if ! command -v kutu.rb >/dev/null 2>&1 || ! command -v kutu-run.rb >/dev/null 2>&1; then
|
|
||||||
echo "Tip: Add $DIR/bin to your PATH to run 'kutu.rb' and 'kutu-run.rb' from anywhere:"
|
|
||||||
echo "export PATH=\"\$PATH:$DIR/bin\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "\e[32mAll done! Build successful.\e[0m"
|
echo -e "\e[32mAll done! Build successful.\e[0m"
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ keybind 171, presets[:mod] do |_event|
|
|||||||
run %q(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next)
|
run %q(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next)
|
||||||
end
|
end
|
||||||
|
|
||||||
keybind 110, presets[:mod] do |_event|
|
keybind 89, presets[:mod] do |_event|
|
||||||
monitor = current_monitor
|
monitor = current_monitor
|
||||||
persistence_path = File.join(__dir__, ".num.json")
|
persistence_path = File.join(__dir__, ".num.json")
|
||||||
persistence = File.exist?(persistence_path) ?
|
persistence = File.exist?(persistence_path) ?
|
||||||
@@ -148,7 +148,7 @@ keybind 110, presets[:mod] do |_event|
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
keybind 89, presets[:mod] do |event|
|
keybind 81, presets[:mod] do |event|
|
||||||
monitor = current_monitor
|
monitor = current_monitor
|
||||||
persistence_path = File.join(__dir__, ".num.json")
|
persistence_path = File.join(__dir__, ".num.json")
|
||||||
persistence = File.exist?(persistence_path) ?
|
persistence = File.exist?(persistence_path) ?
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
choice=$(
|
choice=$(
|
||||||
(
|
(
|
||||||
printf "%s\n" godot mvox mox aseprite terraria zomboid silksong factorio oxygen
|
printf "%s\n" prism
|
||||||
compgen -c
|
compgen -c
|
||||||
) |
|
) |
|
||||||
grep -v -E '^(if|fi|case|esac|for|done|while|until|select|function|return|continue|break|time|exec|source|alias|builtin|read|export|unset|local|set|declare|typeset|:|\.|\[|coproc|l|ll|ls|then|else|elif|do|in|\{|\}|!|\[\[|\]\]|_.*|compgen)$' |
|
grep -v -E '^(if|fi|case|esac|for|done|while|until|select|function|return|continue|break|time|exec|source|alias|builtin|read|export|unset|local|set|declare|typeset|:|\.|\[|coproc|l|ll|ls|then|else|elif|do|in|\{|\}|!|\[\[|\]\]|_.*|compgen)$' |
|
||||||
|
|||||||
Reference in New Issue
Block a user