214 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 *
This commit is contained in:
parent
ebdc037b07
commit
871acbd8e6
@ -6,39 +6,24 @@
|
||||
}: let
|
||||
schema = "org.gnome.desktop.a11y.applications";
|
||||
key = "screen-keyboard-enabled";
|
||||
squeekboard_toggle = pkgs.writeTextFile {
|
||||
name = "squeekboard_toggle";
|
||||
destination = "/bin/squeekboard_toggle";
|
||||
executable = true;
|
||||
text = ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
squeekboard_toggle = pkgs.writeShellScriptBin "squeekboard_toggle" ''
|
||||
if [ "$(gsettings get ${schema} ${key})" == "true" ]; then
|
||||
gsettings set ${schema} ${key} false
|
||||
else
|
||||
gsettings set ${schema} ${key} true
|
||||
fi
|
||||
'';
|
||||
};
|
||||
squeekboard_format = pkgs.writeTextFile {
|
||||
name = "squeekboard_format";
|
||||
destination = "/bin/squeekboard_format";
|
||||
executable = true;
|
||||
text = ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
squeekboard_format = pkgs.writeShellScriptBin "squeekboard_format" ''
|
||||
if [ "$(gsettings get ${schema} ${key})" == "true" ]; then
|
||||
echo '{ "text": "", "tooltip": "enabled", "percentage": 100 }'
|
||||
else
|
||||
echo '{ "text": "", "tooltip": "disabled", "percentage": 0 }'
|
||||
fi
|
||||
'';
|
||||
};
|
||||
rotate_lisgd = pkgs.writeTextFile {
|
||||
name = "rotate_lisgd";
|
||||
destination = "/bin/rotate_lisgd";
|
||||
executable = true;
|
||||
text = ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
rotate_lisgd = pkgs.writeShellScriptBin "rotate_lisgd" ''
|
||||
# PREV_ORIENTATION and ORIENTATION are given by rot8
|
||||
|
||||
LISGD_INPUT=/dev/input/by-path/platform-AMDI0010:02-event
|
||||
@ -65,7 +50,21 @@
|
||||
|
||||
${pkgs.lisgd}/bin/lisgd -v -d "$LISGD_INPUT" "''${LISGD_ACTION_OPTIONS[@]}" &
|
||||
'';
|
||||
};
|
||||
|
||||
# bash script to let dbus know about impotant env variables and
|
||||
# propagate them to relevent services run at the end of sway config
|
||||
dbus-sway-environment = pkgs.writeShellScriptBin "dubs-sway-environment" ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
|
||||
# currently, there is some friction between sway and gtk:
|
||||
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||
configure-gtk = pkgs.writeShellScriptBin "configure-gtk" ''
|
||||
gnome_schema=org.gnome.desktop.interface
|
||||
gsettings set $gnome_schema gtk-theme 'Dracula'
|
||||
'';
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
waybar # status bar
|
||||
@ -186,8 +185,8 @@ in {
|
||||
};
|
||||
|
||||
startup = [
|
||||
{command = "dbus-sway-environment";}
|
||||
{command = "configure-gtk";}
|
||||
{command = "${dbus-sway-environment}/bin/dbus-sway-environment";}
|
||||
{command = "${configure-gtk}/bin/configure-gtk";}
|
||||
{command = "${pkgs.squeekboard}/bin/squeekboard";}
|
||||
{command = "${pkgs.rot8}/bin/rot8 -n 10 -h ${rotate_lisgd}/bin/rotate_lisgd";}
|
||||
{command = "${rotate_lisgd}/bin/rotate_lisgd";}
|
||||
|
@ -3,39 +3,9 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
# bash script to let dbus know about impotant env variables and
|
||||
# propagate them to relevent services run at the end of sway config
|
||||
dbus-sway-environment = pkgs.writeTextFile {
|
||||
name = "dubs-sway-environment";
|
||||
destination = "/bin/dbus-sway-environment";
|
||||
executable = true;
|
||||
text = ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
};
|
||||
|
||||
# currently, there is some friction between sway and gtk:
|
||||
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||
configure-gtk = pkgs.writeTextFile {
|
||||
name = "configure-gtk";
|
||||
destination = "/bin/configure-gtk";
|
||||
executable = true;
|
||||
text = let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in ''
|
||||
gnome_schema=org.gnome.desktop.interface
|
||||
gsettings set $gnome_schema gtk-theme 'Dracula'
|
||||
'';
|
||||
};
|
||||
in {
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
dbus # make dbus-update-activation-environment available in the path
|
||||
dbus-sway-environment
|
||||
configure-gtk
|
||||
wayland
|
||||
xdg-utils # for opening default programs when clicking links
|
||||
glib # gsettings
|
||||
|
Loading…
Reference in New Issue
Block a user