feat!: switch to NixOS
This commit is contained in:
parent
b91f59cf91
commit
e8ec42676b
41 changed files with 81 additions and 365 deletions
|
@ -1,33 +0,0 @@
|
|||
#!/bin/bash
|
||||
SIDE="$1"
|
||||
TOUCH="$2"
|
||||
workspaces=($(hyprctl workspaces -j | jq '.[] | .id'))
|
||||
current_workspace=$(hyprctl monitors -j | jq '.[0].activeWorkspace.id')
|
||||
|
||||
echo $current_workspace
|
||||
if [[ ${workspaces[-1]} == ${workspaces[0]} ]]; then
|
||||
if [[ $current_workspace == "1" ]]; then
|
||||
hyprctl dispatch workspace 2
|
||||
|
||||
elif [[ $SIDE == "prev" ]]; then
|
||||
hyprctl dispatch workspace $[${workspaces[0]} - 1]
|
||||
|
||||
elif [[ $SIDE == "next" ]]; then
|
||||
hyprctl dispatch workspace $[${workspaces[0]} + 1]
|
||||
fi
|
||||
|
||||
elif [[ $SIDE == "prev" ]]; then
|
||||
if [[ $current_workspace == "1" ]]; then
|
||||
hyprctl dispatch workspace ${workspaces[-1]}
|
||||
else
|
||||
hyprctl dispatch workspace $[$current_workspace - 1]
|
||||
fi
|
||||
|
||||
elif [[ $SIDE == "next" ]]; then
|
||||
hyprctl dispatch workspace $[$current_workspace + 1]
|
||||
fi
|
||||
|
||||
if [[ $TOUCH == "touch" ]]; then
|
||||
sleep 0.2
|
||||
sudo input-emulator touch tap 1280 720
|
||||
fi
|
|
@ -1,12 +1,12 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
while true
|
||||
do
|
||||
while killall -0 blueman-manager > /dev/null 2>&1
|
||||
while killall -0 .blueman-manage > /dev/null 2>&1
|
||||
do
|
||||
if [[ $(bluetoothctl show | grep Powered | grep yes) ]]; then
|
||||
if [[ $(hyprctl activewindow | grep blueman-manager) == "" && $(hyprctl clients | grep blueman-manager) != "" ]]; then
|
||||
killall blueman-manager
|
||||
killall .blueman-manage
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
execute() {
|
||||
echo "Rotating"
|
||||
/home/matt/.config/lisgd/config &
|
||||
lisgd_pid=$! # Save the PID of the lisgd process
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
echo "Cleaning up..."
|
||||
kill $lisgd_pid # Terminate the lisgd process
|
||||
wait $lisgd_pid # Wait for the process to exit
|
||||
}
|
||||
|
||||
# Register the cleanup function to be called on script exit
|
||||
trap cleanup EXIT
|
||||
|
||||
# Loop to listen to the command
|
||||
while IFS='$\n' read -r line; do
|
||||
rotation="$(echo $line | sed -En "s/^.*orientation changed: (.*)/\1/p")"
|
||||
[[ ! -z $rotation ]] && execute
|
||||
done < <(stdbuf -oL monitor-sensor)
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
eww update toggle-state=false
|
||||
/usr/bin/setsysmode laptop
|
||||
|
||||
|
@ -7,6 +7,4 @@ gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false
|
|||
brightnessctl -d tpacpi::kbd_backlight s 2
|
||||
|
||||
killall iio-hyprland
|
||||
#swaymsg output eDP-1 transform 0
|
||||
$HOME/.config/lisgd/config
|
||||
killall autorotate.sh
|
||||
killall evtest
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $(busctl get-property --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 Visible) == "b true" ]]
|
||||
then
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
eww update toggle-state=true
|
||||
setsysmode tablet
|
||||
|
||||
|
@ -8,6 +8,8 @@ brightnessctl -d tpacpi::kbd_backlight s 0
|
|||
|
||||
iio-hyprland &
|
||||
|
||||
$HOME/.config/hypr/scripts/tablet/autorotate.sh &
|
||||
killall autorotate.sh
|
||||
$HOME/.config/hypr/scripts/tablet/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" &
|
||||
evtest --grab "/dev/input/by-path/platform-AMDI0010:02-event-mouse" &
|
||||
evtest --grab "/dev/input/by-path/platform-thinkpad_acpi-event" &
|
||||
evtest --grab "/dev/video-bus" &
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $(gsettings get org.gnome.desktop.a11y.applications screen-keyboard-enabled) == true ]]; then
|
||||
$HOME/.config/sway/scripts/tablet/laptop-mode.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue