Compare commits

..

8 Commits

Author SHA1 Message Date
Cametendo
8be672d5cd added clipmenu to packages-sway.txt 2026-02-27 12:05:42 +01:00
Cametendo
b2e1a4bd26 clarify clipboard.sh
clarified clipboard history launch command.
2026-02-27 11:03:30 +01:00
Cametendo
12b421997d corrected clipboard path and added clipmenu package in common-packages.txt 2026-02-27 11:00:47 +01:00
Cametendo
dd00074bed add keyboard shortcut for clipboard 2026-02-27 10:54:46 +01:00
Cametendo
26f730d59b Merge branch 'JGH0:main' into main 2026-02-27 10:38:02 +01:00
Jürg Hallenbarter
49274b6f97 removed redudant files 2026-02-10 10:34:00 +00:00
Jürg Hallenbarter
8ff6123893 added mod + space for toggeling keyboard layouts 2026-02-10 09:23:11 +00:00
JGH
c114324dfc Add keybinding for launching Visual Studio Code 2026-02-10 07:54:04 +00:00
8 changed files with 22 additions and 39 deletions

View File

@@ -13,7 +13,8 @@ bindsym $mod+b exec ~/.config/MyI3Config/settings/browser.sh
bindsym $mod+e exec ~/.config/MyI3Config/settings/filemanager.sh
bindsym $mod+Ctrl+c exec ~/.config/MyI3Config/settings/calculator.sh
bindsym $mod+Ctrl+Return exec --no-startup-id rofi -show drun
bindsym $mod+v exec code
bindsym $mod+v exec --no-startup-id ~/.config/MyI3Config/scripts/clipboard.sh #clipboard history
bindsym $mod+Shift+v exec code
# ----------------------------------------
# Window management

View File

@@ -1,9 +0,0 @@
#!/bin/sh
# Toggle between Swiss German (CH_DE) and US Workman layouts
CURRENT=$(setxkbmap -query | grep layout | awk '{print $2}')
if [ "$CURRENT" = "ch" ]; then
setxkbmap -layout us -variant workman
else
setxkbmap -layout ch -variant de
fi

View File

@@ -1,10 +0,0 @@
# Get screen resolution
res_w=$(xdpyinfo | awk '/dimensions/{print $2}' | cut -d'x' -f1)
res_h=$(xdpyinfo | awk '/dimensions/{print $2}' | cut -d'x' -f2)
# Compute margins if needed
w_margin=$((res_w / 4))
h_margin=$((res_h / 4))
# Launch wlogout with margins
wlogout -T $h_margin -B $h_margin

View File

@@ -26,4 +26,7 @@ gnome-calculator
nautilus
# Power menu
wlogout
wlogout
# Clipboard
clipmenu

View File

@@ -7,10 +7,11 @@ slurp
# Clipboard (Wayland)
wl-clipboard
clipmenu
# Lock screen (Wayland)
swaylock
swayidle
# Display configuration (Wayland)
wdisplays
wdisplays

7
scripts/clipboard.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Ensure the daemon is running (it exits if already running)
clipmenud &
# launches the clipboard history
CM_LAUNCHER="rofi" clipmenu -dmenu -i -p "Clipboard:"

View File

@@ -1,10 +1,8 @@
#!/bin/bash
if [ -n "$SWAYSOCK" ]; then
# Sway
swaymsg input "*" xkb_layout "ch"
swaymsg input "*" xkb_variant "de"
swaymsg input type:keyboard xkb_layout "us,ch"
swaymsg input type:keyboard xkb_variant "workman,de"
else
# i3
setxkbmap -layout ch -variant de
setxkbmap -layout us,ch -variant workman,de
fi

View File

@@ -1,19 +1,11 @@
#!/bin/bash
# Toggle between CH and US layouts
# layout-toggle.sh
if [ -n "$SWAYSOCK" ]; then
# Sway: get current layout and toggle
current=$(swaymsg -t get_inputs | jq -r '.[] | select(.type=="keyboard") | .xkb_active_layout_name' | head -1)
if [ "$current" = "Swiss" ] || [ "$current" = "ch" ]; then
swaymsg input "*" xkb_layout "us"
swaymsg input "*" xkb_variant "workman"
else
swaymsg input "*" xkb_layout "ch"
swaymsg input "*" xkb_variant "de"
fi
swaymsg input type:keyboard xkb_switch_layout next
else
# i3: get current layout and toggle
current=$(setxkbmap -query | grep layout | awk '{print $2}')
current=$(setxkbmap -query | awk '/layout/{print $2}')
if [ "$current" = "ch" ]; then
setxkbmap -layout us -variant workman
else