Compare commits
No commits in common. "ca4e1be0451a9a346e306f9f1ec2d44e8b0bf4a7" and "23e50efee015bc958fe4ac500306d711c444c73c" have entirely different histories.
ca4e1be045
...
23e50efee0
5 changed files with 37 additions and 72 deletions
|
@ -1,38 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
tablet() {
|
|
||||||
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
|
|
||||||
|
|
||||||
brightnessctl -d tpacpi::kbd_backlight s 0
|
|
||||||
|
|
||||||
"$HYPR_PATH"/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" &
|
|
||||||
}
|
|
||||||
|
|
||||||
laptop() {
|
|
||||||
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false
|
|
||||||
|
|
||||||
brightnessctl -d tpacpi::kbd_backlight s 2
|
|
||||||
|
|
||||||
killall -r autorotate.sh
|
|
||||||
killall -r evtest
|
|
||||||
}
|
|
||||||
|
|
||||||
toggle () {
|
|
||||||
if [[ "$(gsettings get org.gnome.desktop.a11y.applications screen-keyboard-enabled)" == "false" ]]; then
|
|
||||||
echo "Tablet"
|
|
||||||
tablet > /dev/null
|
|
||||||
else
|
|
||||||
echo "Laptop"
|
|
||||||
laptop > /dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $1 == "toggle" ]];then
|
|
||||||
toggle
|
|
||||||
fi
|
|
|
@ -5,7 +5,7 @@ import { CurrentWindow } from './current-window.js';
|
||||||
import { Workspaces } from './workspaces.js';
|
import { Workspaces } from './workspaces.js';
|
||||||
import { OskToggle } from './osk-toggle.js';
|
import { OskToggle } from './osk-toggle.js';
|
||||||
import { Heart } from './heart.js';
|
import { Heart } from './heart.js';
|
||||||
import { TabletToggle } from './tablet-toggle.js';
|
import { TabletToggle } from './tablet-toggle.js';
|
||||||
|
|
||||||
export const Bar = Window({
|
export const Bar = Window({
|
||||||
name: 'left-bar',
|
name: 'left-bar',
|
||||||
|
|
|
@ -1,27 +1,12 @@
|
||||||
const { Box, Label } = ags.Widget;
|
|
||||||
const { subprocess } = ags.Utils;
|
|
||||||
|
|
||||||
import { EventBox } from '../common.js';
|
import { EventBox } from '../common.js';
|
||||||
|
|
||||||
export const TabletToggle = EventBox({
|
export const TabletToggle = EventBox({
|
||||||
className: 'toggle-off',
|
className: 'toggle-off',
|
||||||
onPrimaryClickRelease: function() {
|
onPrimaryClickRelease: '',
|
||||||
subprocess(
|
child: ags.Widget.Box({
|
||||||
['bash', '-c', '/home/matt/.nix/config/ags/bin/tablet-toggle.sh toggle'],
|
|
||||||
(output) => {
|
|
||||||
print(output)
|
|
||||||
if (output == 'Tablet') {
|
|
||||||
TabletToggle.toggleClassName('toggle-on', true);
|
|
||||||
} else {
|
|
||||||
TabletToggle.toggleClassName('toggle-on', false);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: Box({
|
|
||||||
className: 'tablet-toggle',
|
className: 'tablet-toggle',
|
||||||
vertical: false,
|
vertical: false,
|
||||||
child: Label({
|
child: ags.Widget.Label({
|
||||||
label: " ",
|
label: " ",
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -1,14 +1,22 @@
|
||||||
|
// https://github.com/Aylur/dotfiles/blob/f03e58ba0d3b56f1144631c179ab27357e466753/.config/ags/modules/hyprland.js#L4
|
||||||
|
import Gdk from 'gi://Gdk';
|
||||||
|
const display = Gdk.Display.get_default();
|
||||||
|
const { App } = ags;
|
||||||
const { Hyprland, Applications } = ags.Service;
|
const { Hyprland, Applications } = ags.Service;
|
||||||
const { execAsync } = ags.Utils;
|
const { execAsync, lookUpIcon } = ags.Utils;
|
||||||
const { Box, Button, Label, Revealer } = ags.Widget;
|
const { Box, Button, EventBox, Label, Icon } = ags.Widget;
|
||||||
|
|
||||||
import { EventBox } from '../common.js';
|
export const Workspace = ({ i, } = {}) =>
|
||||||
|
ags.Widget.Revealer({
|
||||||
const Workspace = ({ i } = {}) =>
|
|
||||||
Revealer({
|
|
||||||
transition: "slide_right",
|
transition: "slide_right",
|
||||||
child: EventBox({
|
child: EventBox({
|
||||||
onPrimaryClickRelease: () => execAsync(`hyprctl dispatch workspace ${i}`).catch(print),
|
onPrimaryClickRelease: () => execAsync(`hyprctl dispatch workspace ${i}`).catch(print),
|
||||||
|
onHover: box => {
|
||||||
|
box.window.set_cursor(Gdk.Cursor.new_from_name(display, 'pointer'));
|
||||||
|
},
|
||||||
|
onHoverLost: box => {
|
||||||
|
box.window.set_cursor(null);
|
||||||
|
},
|
||||||
child: Box({
|
child: Box({
|
||||||
className: 'button',
|
className: 'button',
|
||||||
child: Label(`${i}`),
|
child: Label(`${i}`),
|
||||||
|
@ -25,22 +33,32 @@ Revealer({
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var prev = Hyprland.active.workspace.id;
|
||||||
|
|
||||||
export const Workspaces = props => Box({
|
export const Workspaces = props => Box({
|
||||||
className: 'workspaces',
|
className: 'workspaces panel-button',
|
||||||
children: [EventBox({
|
children: [EventBox({
|
||||||
child: Box({
|
child: Box({
|
||||||
children: Array.from({ length: 15 }, (_, i) => i + 1).map(i => Workspace({ i: i})),
|
|
||||||
connections: [[Hyprland, box => {
|
connections: [[Hyprland, box => {
|
||||||
let workspaces = [];
|
let workspaces = [];
|
||||||
Hyprland.workspaces.forEach(ws => {
|
|
||||||
if (ws.id > 0) workspaces.push(ws);
|
|
||||||
});
|
|
||||||
|
|
||||||
box.children.forEach(rev => rev.reveal_child = false);
|
new Promise(resolve => {
|
||||||
workspaces.forEach(ws => {
|
|
||||||
box.children[ws.id - 1].reveal_child = true;
|
Hyprland.workspaces.forEach(ws => {
|
||||||
|
if (ws.id > 0) workspaces.push(ws);
|
||||||
|
});
|
||||||
|
|
||||||
|
resolve();
|
||||||
|
}).then(value => {
|
||||||
|
|
||||||
|
box.children.forEach(rev => rev.reveal_child = false);
|
||||||
|
workspaces.forEach(ws => {
|
||||||
|
box.children[ws.id - 1].reveal_child = true;
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}]],
|
}]],
|
||||||
|
children: Array.from({ length: 15 }, (_, i) => i + 1).map(i => Workspace({ i: i})),
|
||||||
}),
|
}),
|
||||||
})],
|
})],
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
networking.hostName = "wim";
|
networking.hostName = "wim";
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
networking.networkmanager.wifi.backend = "wpa_supplicant";
|
networking.networkmanager.wifi.backend = "iwd";
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "America/Montreal";
|
time.timeZone = "America/Montreal";
|
||||||
|
|
Loading…
Reference in a new issue