31 Jan 2023 |
Arya [projectsegfau.lt] | is it possible to disable middle key clipboard in sway? | 12:09:31 |
Arya [projectsegfau.lt] | * is it possible to disable middle click clipboard in sway? | 12:09:48 |
dortveg | In your config, did you try:
input <input> middle_emulation disabled | 14:31:42 |
CauΓ£ |  Download 2023-01-31-141658.png | 17:17:20 |
dortveg | Does anyone know if its possible to have your waybar dynamically change position based on whether or not an external display is plugged in?? My current setup is a laptop hooked up to a monitor thats stacked on top. My waybar is typically set at the top of my external monitor only. Problem is whenever its not plugged in, I have no bar at all on my laptop and have to manually change the config and reload the bar. | 18:57:25 |
tomodachi | hmm not sure but i display my waybar on all monitors | 21:48:14 |
tomodachi | perhaps that's an option for you? | 21:48:20 |
dortveg | Eh, thats exactly what I'm trying to avoid actually π. Any solutions that came up on google however was pretty much that or choosing one display at a time. | 23:09:49 |
penaiple | how can i change my keyboard layout using commands or custom keybinds? | 23:17:39 |
penaiple | im using grp:alt_space_toggle because mod+space is taken, but i'd like a custom keybind (like mod+shift+t) | 23:18:55 |
1 Feb 2023 |
novorol | how to set up hotplugging of multiple displays? | 01:06:48 |
novorol | In reply to @penaiple:matrix.thisisjoes.site how can i change my keyboard layout using commands or custom keybinds? you can map it to sed on your sway config file + swaymsg reload | 01:08:52 |
penaiple | In reply to @novorol:matrix.org how to set up hotplugging of multiple displays? kanshi | 15:01:27 |
penaiple | In reply to @novorol:matrix.org you can map it to sed on your sway config file + swaymsg reload what do you mean? | 15:01:39 |
Arya [projectsegfau.lt] | bind it to swaymsg | 15:07:36 |
Arya [projectsegfau.lt] | and then the keybinding command | 15:07:41 |
penaiple | yeah but what command do i use to switch layouts | 18:48:08 |
2 Feb 2023 |
| πΏππππ π. changed their profile picture. | 07:24:45 |
novorol | In reply to@penaiple:matrix.thisisjoes.site In reply to @novorol:matrix.org you can map it to sed on your sway config file + swaymsg reload what do you mean? write a oneliner script where sed replaces the name of the layout of your config file, where the layout names are stored in an array (so you basically just iterate over the array elements). I believe you can use swaynag to then prompt for confirmation and reload your config or just do it without confirmation
you can also add notify-send to display the new layout's name | 20:30:14 |
novorol | like so: | 20:45:07 |
novorol |
| 20:45:09 |
novorol | Redacted or Malformed Event | 20:45:13 |
novorol | * #!/bin/bashlayouts=("en-US" "de-DE" "colemak")config="$HOME/.config/sway/config"#cycle through layouts, start the index with the current layout in config filefor i in layouts; do if grep -q "$i" "$config"; then break fi #replace layout in config file with next layout in arraysed -i "s/${layouts[$i]}/${layouts[$((i+1))]}/g" "$config"notify-send "Switching to layout: $i" doneswaymsg reload | 20:45:38 |
novorol | * #!/bin/bashlayouts=("en-US" "de-DE" "colemak")config="$HOME/.config/sway/config"#cycle through layouts, start the index with the current layout in config filefor i in layouts; do if grep -q "$i" "$config"; then break fi #replace layout in config file with next layout in arraysed -i "s/${layouts[$i]}/${layouts[$((i+1))]}/g" "$config"notify-send "Switching to layout: $i" doneswaymsg reload | 20:45:49 |
novorol | * #!/bin/bashlayouts=("en-US" "de-DE" "colemak")config="$HOME/.config/sway/config"#cycle through layouts, start the index with the current layout in config filefor i in layouts; do if grep -q "$i" "$config"; then break fi #replace layout in config file with next layout in arraysed -i "s/${layouts[$i]}/${layouts[$((i+1))]}/g" "$config"notify-send "Switching to layout: $i" doneswaymsg reload | 20:46:06 |
novorol |
| 20:46:25 |
novorol | #!/bin/bash
layouts=("en-US" "de-DE" "colemak")
config="$HOME/.config/sway/config"
#cycle through layouts, start the index with the current layout in config file
for i in layouts; do
if grep -q "$i" "$config"; then
break
fi
#replace layout in config file with next layout in array
sed -i "s/${layouts[$i]}/${layouts[$((i+1))]}/g" "$config"
notify-send "Switching to layout: $i"
done
swaymsg reload | 20:50:45 |
novorol | if it doesn't work try moving the last 2 lines out of the loop or storing the current layout as a new variable inside the if statement | 20:52:13 |
novorol | you can also use grep -qw if your layouts may be substrings (like 2 chars long) | 20:57:07 |
novorol | and of course back up your config first | 20:58:06 |