TODO: put all this in nixos configs

This commit is contained in:
matt1432 2023-06-24 12:35:40 +02:00
parent eb5f7a9e50
commit d16051dada
7 changed files with 82 additions and 11 deletions

10
.gitignore vendored
View file

@ -1,4 +1,12 @@
cef_user_data/
okularrc
user-dirs.dirs
.gsd-keyboard.settings-ported
arkrc
evolution/
fontconfig/
gnome-initial-setup-done
kcharselectrc
user-dirs.locale
GalaxyBudsClient/
baloofilerc
Zeal/

View file

@ -1 +1 @@
/nix/store/jxgghqpkcr60pfn4bixazpzihx4aqsi5-home-manager-files/.config/hypr/hyprland.conf
/nix/store/nsxbpm07iq9gr8h9pd6vvmj139nlm2gd-home-manager-files/.config/hypr/hyprland.conf

View file

@ -13,8 +13,7 @@ monitor=eDP-1,1920x1200@60,0x0,1
$menu = "$HOME/.config/rofi/launcher.sh"
$scripts = "$HOME/.config/hypr/scripts"
bind =, edge:d:u, exec, bash -c "busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true"
exec-once = lisgd -d /dev/input/by-path/platform-AMDI0010\:00-event -o 0 -t 125 -r 25 -m 3200 -g "1,UD,B,*,R,bash -c 'busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false'"
exec-once = $HOME/.config/lisgd/config &
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@ -84,6 +83,7 @@ general {
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
vfr = true
}
decoration {
@ -95,10 +95,10 @@ decoration {
blur_passes = 1
blur_new_optimizations = on
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
drop_shadow = false
#shadow_range = 4
#shadow_render_power = 3
#col.shadow = rgba(1a1a1aee)
}
animations {

46
hypr/scripts/autorotate.sh Executable file
View file

@ -0,0 +1,46 @@
#!/usr/bin/env bash
# This script was forked from https://gitlab.com/snippets/1793649 by Fishonadish
SCREEN="eDP-1"
WAYLANDINPUT=("wacom-hid-52eb-finger"
"wacom-hid-52eb-pen")
function rotate_ms {
case $1 in
"normal")
rotate 0
;;
"right-up")
rotate 3
;;
"bottom-up")
rotate 2
;;
"left-up")
rotate 1
;;
esac
}
function rotate {
TARGET_ORIENTATION=$1
echo "Rotating to" $TARGET_ORIENTATION
hyprctl keyword monitor $SCREEN,transform,$TARGET_ORIENTATION
for i in "${WAYLANDINPUT[@]}"
do
hyprctl keyword device:"$i":transform $TARGET_ORIENTATION
done
/home/matt/.config/lisgd/config &
}
while IFS='$\n' read -r line; do
rotation="$(echo $line | sed -En "s/^.*orientation changed: (.*)/\1/p")"
[[ ! -z $rotation ]] && rotate_ms $rotation
done < <(stdbuf -oL monitor-sensor)

View file

@ -5,5 +5,5 @@ gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false
brightnessctl -d tpacpi::kbd_backlight s 2
killall iio-hyprland
killall evtest
killall -r autorotate.sh
killall -r evtest

View file

@ -6,7 +6,7 @@ gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
brightnessctl -d tpacpi::kbd_backlight s 0
$HOME/.local/bin/iio-hyprland &
$HOME/.config/hypr/scripts/autorotate.sh &
evtest --grab "/dev/input/by-path/platform-i8042-serio-0-event-kbd" &
evtest --grab "/dev/input/by-path/platform-i8042-serio-1-event-mouse" &

17
lisgd/config Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
## https://www.reddit.com/r/swaywm/comments/ocec7k/comment/i93s0ma/
## https://git.sr.ht/~mil/lisgd/tree/0.3.7/item/config.def.h
function gestures {
lisgd -d /dev/input/by-path/platform-AMDI0010\:00-event -o 0 -t 125 -r 25 -m 3200 \
-g "1,UD,B,*,R,bash -c 'busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false'" \
-g "1,DU,B,*,R,bash -c 'busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true'"
}
if pgrep lisgd ; then
killall -r lisgd
gestures
else
gestures
fi