Add kutu config

This commit is contained in:
2026-07-07 23:10:13 +01:00
parent 91044efd80
commit bb6e4624db
9 changed files with 173 additions and 4 deletions
+1
View File
@@ -1,2 +1,3 @@
.pos
p.vim
log.txt
Generated
+4 -4
View File
@@ -26,11 +26,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1783430313,
"narHash": "sha256-OPyKjRU+DqJoF1qMtW8x8bzZQFczzC7c/dFhHwpaj9M=",
"lastModified": 1783461814,
"narHash": "sha256-ycpzjXjMey4PlAFYeprz2nHI2azxkvEn3wNvHee+Yh0=",
"ref": "refs/heads/main",
"rev": "7fb1ea8cb3fa4b80f684239fb962cfd3288f3e37",
"revCount": 35,
"rev": "4b8599132f26d75bddfe613bcf9697ce0f91d212",
"revCount": 40,
"type": "git",
"url": "https://git.syedm.dev/syedm/kutu.rb.git"
},
+1
View File
@@ -9,6 +9,7 @@
./fastfetch
./fish
./kitty
./kutu
./nvim
./picom
./rofi
+89
View File
@@ -0,0 +1,89 @@
bind_key 23, true, "firefox"
bind_key 24, true, :kill_window
bind_key 25, true, "kitty"
bind_key 26, true, "bash /home/me/dotfiles/scripts/power.sh"
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
)
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
)
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
)
bind_key 38, true, %Q(
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
)
bind_key 232, false, %q(
brightnessctl set 5%-;
pct=$(brightnessctl -m | cut -d, -f4 | tr -d ' %');
dunstify "Brightness" "" -h int:value:$pct -r 998
)
bind_key 233, false, %q(
brightnessctl set 5%+;
pct=$(brightnessctl -m | cut -d, -f4 | tr -d ' %');
dunstify "Brightness" "" -h int:value:$pct -r 998
)
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_key 40, true, "bash /home/me/dotfiles/scripts/run.sh"
bind_key 56, true, :add_workspace
bind_key 57, true, :delete_workspace
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_key 173, true,
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
bind_key 171, true,
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
bind_key 89, true, :toggle_scratchpad
bind_key 81, true, :toggle_move_scratchpad
bind_key 118, false,
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
bind_key 86, false, :workspace_next
bind_key 86, true, :move_window_next_workspace
bind_key 82, false, :workspace_previous
bind_key 82, true, :move_window_previous_workspace
bind_key 10, true, "setxkbmap us"
bind_key 11, true, "setxkbmap ara"
bind_key 55, true, "CM_LAUNCHER=rofi clipmenu"
bind_key 39, true, :toggle_floating
bind_mouse 9, false, :workspace_next
bind_mouse 9, true, :move_window_next_workspace
bind_mouse 8, false, :workspace_previous
bind_mouse 8, true, :move_window_previous_workspace
+5
View File
@@ -0,0 +1,5 @@
{ ... }:
{
home.file.".config/kutu/config.rb".source = ./config.rb;
}
+9
View File
@@ -0,0 +1,9 @@
#!/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
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
set -euo pipefail
opts=" Lock
󰒲 Suspend
 Shutdown
󰜉 Reboot
 Hibernate
 Stop KutuWM"
sel=$(printf "%s\n" "$opts" | dmenu -i -p "Select Power Option:" \
-nf '#e0af68' -nb '#1f2335' -sb '#f7768e' -sf '#1a1b26' -fn 'AgaveNerdFont-16')
[ -z "$sel" ] && exit 0
case "$sel" in
*Shutdown*)
confirm=$(printf "No\nYes" | dmenu -i -p "Are you sure you want to shutdown? :" \
-nf '#e0af68' -nb '#1f2335' -sb '#f7768e' -sf '#1a1b26' -fn 'AgaveNerdFont-16')
[ "$confirm" = "Yes" ] && exec shutdown -h now
;;
*Reboot*)
confirm=$(printf "No\nYes" | dmenu -i -p "Are you sure you want to reboot? :" \
-nf '#e0af68' -nb '#1f2335' -sb '#f7768e' -sf '#1a1b26' -fn 'HurmitNerdFont-16')
[ "$confirm" = "Yes" ] && exec reboot
;;
*Hibernate*)
confirm=$(printf "No\nYes" | dmenu -i -p "Are you sure you want to hibernate? :" \
-nf '#e0af68' -nb '#1f2335' -sb '#f7768e' -sf '#1a1b26' -fn 'AgaveNerdFont-16')
[ "$confirm" = "Yes" ] && exec systemctl hibernate
;;
*Stop\ KutuWM*)
exec kutu-run.rb stop
;;
*Suspend*)
exec systemctl suspend
;;
*Lock*)
~/dotfiles/scripts/lock.sh &
;;
esac
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
choice=$(
(
printf "%s\n" prism
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)$' |
sort |
dmenu -i -p "Enter command  " \
-nf '#4abaaf' -nb '#1f2335' -sb '#7aa2f7' -sf '#102030' -fn 'AgaveNerdFont-16'
)
[ -z "$choice" ] && exit 0
fish -c "$choice" >/dev/null 2>&1 &
disown
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
xsetroot -cursor_name left_ptr
setxkbmap us