mirror of
https://github.com/Cametendo/MyI3Config-fork.git
synced 2026-03-18 03:40:20 +01:00
Compare commits
8 Commits
4989bb4f03
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8be672d5cd | ||
|
|
b2e1a4bd26 | ||
|
|
12b421997d | ||
|
|
dd00074bed | ||
|
|
26f730d59b | ||
|
|
49274b6f97 | ||
|
|
8ff6123893 | ||
|
|
c114324dfc |
@@ -13,7 +13,8 @@ bindsym $mod+b exec ~/.config/MyI3Config/settings/browser.sh
|
|||||||
bindsym $mod+e exec ~/.config/MyI3Config/settings/filemanager.sh
|
bindsym $mod+e exec ~/.config/MyI3Config/settings/filemanager.sh
|
||||||
bindsym $mod+Ctrl+c exec ~/.config/MyI3Config/settings/calculator.sh
|
bindsym $mod+Ctrl+c exec ~/.config/MyI3Config/settings/calculator.sh
|
||||||
bindsym $mod+Ctrl+Return exec --no-startup-id rofi -show drun
|
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
|
# Window management
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -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
|
|
||||||
@@ -27,3 +27,6 @@ nautilus
|
|||||||
|
|
||||||
# Power menu
|
# Power menu
|
||||||
wlogout
|
wlogout
|
||||||
|
|
||||||
|
# Clipboard
|
||||||
|
clipmenu
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ slurp
|
|||||||
|
|
||||||
# Clipboard (Wayland)
|
# Clipboard (Wayland)
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
clipmenu
|
||||||
|
|
||||||
# Lock screen (Wayland)
|
# Lock screen (Wayland)
|
||||||
swaylock
|
swaylock
|
||||||
|
|||||||
7
scripts/clipboard.sh
Executable file
7
scripts/clipboard.sh
Executable 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:"
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -n "$SWAYSOCK" ]; then
|
if [ -n "$SWAYSOCK" ]; then
|
||||||
# Sway
|
swaymsg input type:keyboard xkb_layout "us,ch"
|
||||||
swaymsg input "*" xkb_layout "ch"
|
swaymsg input type:keyboard xkb_variant "workman,de"
|
||||||
swaymsg input "*" xkb_variant "de"
|
|
||||||
else
|
else
|
||||||
# i3
|
setxkbmap -layout us,ch -variant workman,de
|
||||||
setxkbmap -layout ch -variant de
|
|
||||||
fi
|
fi
|
||||||
@@ -1,19 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Toggle between CH and US layouts
|
# layout-toggle.sh
|
||||||
|
|
||||||
if [ -n "$SWAYSOCK" ]; then
|
if [ -n "$SWAYSOCK" ]; then
|
||||||
# Sway: get current layout and toggle
|
swaymsg input type:keyboard xkb_switch_layout next
|
||||||
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
|
else
|
||||||
swaymsg input "*" xkb_layout "ch"
|
current=$(setxkbmap -query | awk '/layout/{print $2}')
|
||||||
swaymsg input "*" xkb_variant "de"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# i3: get current layout and toggle
|
|
||||||
current=$(setxkbmap -query | grep layout | awk '{print $2}')
|
|
||||||
if [ "$current" = "ch" ]; then
|
if [ "$current" = "ch" ]; then
|
||||||
setxkbmap -layout us -variant workman
|
setxkbmap -layout us -variant workman
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user