Scaffold hyprevo repo: core config, capture scripts, install.sh skeleton
This commit is contained in:
1 parent
85a2942740
commit
617ec8cca9
9 files changed
+260
No files matched your search
@@ -0,0 +1,4 @@
|
||||
# hyprevo
|
||||
|
||||
A one-command installer for Hyprland + DankMaterialShell (DMS) on any
|
||||
Arch-based Linux. Full content written in Task 6.
|
||||
@@ -0,0 +1,116 @@
|
||||
# Auto-detect monitor(s) -- replace with an explicit `monitor=NAME,RES@HZ,POS,SCALE`
|
||||
# line (see `hyprctl monitors`) if you want fixed layout/scaling.
|
||||
monitor = , preferred, auto, 1
|
||||
|
||||
# DankMaterialShell autostart (systemd-managed, see hyprland-session.target)
|
||||
exec-once = dbus-update-activation-environment --systemd --all
|
||||
exec-once = systemctl --user start hyprland-session.target
|
||||
|
||||
# KDE secret service (org.freedesktop.secrets) has no D-Bus activation alias on
|
||||
# most systems -- start it manually or Bitwarden/libsecret apps hang waiting for it
|
||||
exec-once = /usr/bin/ksecretd
|
||||
|
||||
source = ~/.config/hypr/extras.conf
|
||||
|
||||
$terminal = konsole
|
||||
$fileManager = dolphin
|
||||
|
||||
input {
|
||||
kb_layout = us
|
||||
follow_mouse = 0
|
||||
|
||||
touchpad {
|
||||
natural_scroll = true
|
||||
}
|
||||
}
|
||||
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 10
|
||||
border_size = 2
|
||||
layout = scrolling
|
||||
}
|
||||
|
||||
decoration {
|
||||
rounding = 8
|
||||
blur {
|
||||
enabled = true
|
||||
size = 6
|
||||
passes = 2
|
||||
}
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
dwindle {
|
||||
preserve_split = true
|
||||
}
|
||||
|
||||
# Niri-style scrolling layout, built into Hyprland core since 0.54 --
|
||||
# windows scroll on an infinite horizontal tape.
|
||||
scrolling {
|
||||
direction = right
|
||||
}
|
||||
|
||||
$mainMod = SUPER
|
||||
|
||||
# Tap Super alone (no other key) to open the DMS app menu
|
||||
bindr = $mainMod, SUPER_L, exec, dms ipc call spotlight toggle
|
||||
|
||||
bind = $mainMod, RETURN, exec, $terminal
|
||||
bind = CTRL ALT, T, exec, $terminal
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, Q, killactive
|
||||
bind = $mainMod SHIFT, E, exit
|
||||
bind = $mainMod, V, togglefloating
|
||||
bind = $mainMod, F, fullscreen
|
||||
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
|
||||
bind = $mainMod, F1, workspace, 1
|
||||
bind = $mainMod, F2, workspace, 2
|
||||
bind = $mainMod, F3, workspace, 3
|
||||
bind = $mainMod, F4, workspace, 4
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
|
||||
# Window stacking (native Hyprland groups, like i3/sway tabbed containers)
|
||||
bind = $mainMod, G, togglegroup
|
||||
bind = $mainMod, Tab, changegroupactive, f
|
||||
bind = $mainMod SHIFT, Tab, changegroupactive, b
|
||||
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
|
||||
# Scrolling-layout column controls (built into Hyprland core, see general:layout above)
|
||||
bind = $mainMod SHIFT, left, layoutmsg, swapcol l
|
||||
bind = $mainMod SHIFT, right, layoutmsg, swapcol r
|
||||
bind = $mainMod CTRL, left, layoutmsg, colresize -0.05
|
||||
bind = $mainMod CTRL, right, layoutmsg, colresize +0.05
|
||||
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Common multimedia keys -- harmless no-ops on hardware without them
|
||||
bindle = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindle = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindl = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
bindle = , XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
|
||||
bindle = , XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
|
||||
bindl = , XF86AudioNext, exec, playerctl next
|
||||
bindl = , XF86AudioPause, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
LOCAL_BIN="${HYPREVO_LOCAL_BIN:-$HOME/.local/bin}"
|
||||
|
||||
check_arch() {
|
||||
command -v pacman >/dev/null 2>&1
|
||||
}
|
||||
|
||||
main() {
|
||||
if ! check_arch; then
|
||||
echo "hyprevo is Arch-based only -- pacman not found"
|
||||
exit 0
|
||||
fi
|
||||
echo "hyprevo: Arch detected, continuing..."
|
||||
}
|
||||
|
||||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||
main "$@"
|
||||
fi
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# Single Print-key entry point: pick area + action from one popup, like
|
||||
# Spectacle's picker did on KDE. Spectacle itself can't run under Hyprland
|
||||
# (needs KWin-only protocols), so this glues grim/slurp/satty/wf-recorder
|
||||
# behind one menu instead of separate keybinds per mode.
|
||||
|
||||
# If a recording is already running, Print just stops it -- no menu, no delay.
|
||||
if pgrep -x wf-recorder >/dev/null; then
|
||||
~/.local/bin/toggle-recording.sh
|
||||
exit 0
|
||||
fi
|
||||
|
||||
choice=$(printf 'Screenshot - Region\nScreenshot - Full screen\nScreenshot - Window\nRecord - Region\nRecord - Full screen\nRecord - Window' | fuzzel --dmenu --prompt "Capture: ")
|
||||
[ -z "$choice" ] && exit 0
|
||||
|
||||
case "$choice" in
|
||||
"Screenshot - Region") ~/.local/bin/screenshot.sh region ;;
|
||||
"Screenshot - Full screen") ~/.local/bin/screenshot.sh full ;;
|
||||
"Screenshot - Window") ~/.local/bin/screenshot.sh window ;;
|
||||
"Record - Region") ~/.local/bin/toggle-recording.sh region ;;
|
||||
"Record - Full screen") ~/.local/bin/toggle-recording.sh full ;;
|
||||
"Record - Window") ~/.local/bin/toggle-recording.sh window ;;
|
||||
esac
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# Screenshot with mode select (region|full|window), piped into Satty for annotation.
|
||||
# grim/slurp + Satty is the Hyprland-native replacement for KDE Spectacle, whose
|
||||
# screenshot code hard-requires KWin's own D-Bus interface and never works here.
|
||||
|
||||
mode="${1:-region}"
|
||||
out="$HOME/Pictures/Screenshots/satty-$(date +%Y%m%d-%H%M%S).png"
|
||||
|
||||
case "$mode" in
|
||||
region)
|
||||
geom=$(slurp) || exit 1
|
||||
grim -g "$geom" - | satty -f - --copy-command wl-copy -o "$out" --early-exit all
|
||||
;;
|
||||
full)
|
||||
grim - | satty -f - --copy-command wl-copy -o "$out" --early-exit all
|
||||
;;
|
||||
window)
|
||||
geom=$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
|
||||
[ -z "$geom" ] && exit 1
|
||||
grim -g "$geom" - | satty -f - --copy-command wl-copy -o "$out" --early-exit all
|
||||
;;
|
||||
*)
|
||||
echo "usage: screenshot.sh [region|full|window]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
# Toggle a screen recording via wf-recorder (Hyprland/wlroots-native,
|
||||
# since Spectacle's recorder needs KWin's zkde_screencast_unstable_v1 protocol
|
||||
# which Hyprland doesn't implement).
|
||||
#
|
||||
# usage: toggle-recording.sh [region|full|window]
|
||||
# Second press of the same bind (any mode) always stops the running recording.
|
||||
|
||||
mode="${1:-region}"
|
||||
OUT_DIR="$HOME/Videos/Screenrecords"
|
||||
|
||||
if pgrep -x wf-recorder >/dev/null; then
|
||||
pkill -INT -x wf-recorder
|
||||
notify-send "Screen recording" "Stopped, saved to $OUT_DIR"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$mode" in
|
||||
region)
|
||||
geom=$(slurp) || exit 1
|
||||
;;
|
||||
window)
|
||||
geom=$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
|
||||
[ -z "$geom" ] && exit 1
|
||||
;;
|
||||
full)
|
||||
geom=""
|
||||
;;
|
||||
*)
|
||||
echo "usage: toggle-recording.sh [region|full|window]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p "$OUT_DIR"
|
||||
file="$OUT_DIR/recording-$(date +%Y%m%d-%H%M%S).mp4"
|
||||
notify-send "Screen recording" "Started ($mode) -- press the bind again to stop"
|
||||
|
||||
if [ -n "$geom" ]; then
|
||||
wf-recorder -g "$geom" -f "$file" >/tmp/wf-recorder.log 2>&1 &
|
||||
else
|
||||
wf-recorder -f "$file" >/tmp/wf-recorder.log 2>&1 &
|
||||
fi
|
||||
disown
|
||||
@@ -0,0 +1,11 @@
|
||||
hyprland
|
||||
xdg-desktop-portal-hyprland
|
||||
quickshell
|
||||
dms-shell
|
||||
dms-shell-hyprland
|
||||
matugen
|
||||
inter-font
|
||||
ttf-fira-code
|
||||
kwallet
|
||||
jq
|
||||
wl-clipboard
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
@test "check_arch returns 0 when pacman is on PATH" {
|
||||
source "${BATS_TEST_DIRNAME}/../install.sh"
|
||||
run check_arch
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "check_arch returns 1 when pacman is not on PATH" {
|
||||
source "${BATS_TEST_DIRNAME}/../install.sh"
|
||||
PATH="/nonexistent" run check_arch
|
||||
[ "$status" -ne 0 ]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
org.kde.konsole.desktop
|
||||
Reference in new issue
Block a user