Optimized i3 setup: clipboard manager, scratchpad terminal, workspace assignments, media keys with dunstify, thunar, autotiling, system info notification
This commit is contained in:
@@ -31,16 +31,33 @@ exec_always --no-startup-id xinput set-prop "bcm5974" "libinput Natural Scrollin
|
|||||||
bindsym $mod+Shift+Return exec alacritty
|
bindsym $mod+Shift+Return exec alacritty
|
||||||
bindsym $mod+Shift+w exec vivaldi-stable
|
bindsym $mod+Shift+w exec vivaldi-stable
|
||||||
bindsym $mod+Shift+f exec alacritty -e ranger
|
bindsym $mod+Shift+f exec alacritty -e ranger
|
||||||
|
bindsym $mod+Shift+t exec thunar
|
||||||
bindsym $mod+Shift+e exec mousepad
|
bindsym $mod+Shift+e exec mousepad
|
||||||
bindsym $mod+Shift+p exec keepassxc
|
bindsym $mod+Shift+p exec keepassxc
|
||||||
bindsym $mod+Shift+m exec ghostwriter
|
bindsym $mod+Shift+m exec ghostwriter
|
||||||
|
|
||||||
bindsym $mod+space --release exec "rofi -combi-modi drun,window -show combi -modi combi"
|
bindsym $mod+space --release exec "rofi -combi-modi drun,window -show combi -modi combi"
|
||||||
bindsym $mod+x kill
|
bindsym $mod+q kill
|
||||||
|
|
||||||
|
# Clipboard manager
|
||||||
|
bindsym $mod+c exec --no-startup-id clipboard-rofi
|
||||||
|
|
||||||
bindsym $mod+Ctrl+p exec pavucontrol
|
bindsym $mod+Ctrl+p exec pavucontrol
|
||||||
bindsym $mod+Ctrl+b exec alacritty -e bmenu
|
bindsym $mod+Ctrl+b exec alacritty -e bmenu
|
||||||
bindsym $mod+Print --release exec --no-startup-id flameshot gui
|
bindsym $mod+Print --release exec --no-startup-id flameshot gui
|
||||||
|
bindsym $mod+Shift+Print --release exec --no-startup-id flameshot full -p ~/Pictures/Screenshots/
|
||||||
|
|
||||||
|
# Scratchpad terminal (dropdown-style)
|
||||||
|
for_window [instance="scratchterm"] floating enable, resize set 1200 600, move position center, move scratchpad
|
||||||
|
exec --no-startup-id alacritty --class scratchterm
|
||||||
|
bindsym $mod+Tab scratchpad show
|
||||||
|
|
||||||
|
# Media keys (MacBook)
|
||||||
|
bindsym XF86AudioRaiseVolume exec --no-startup-id volume-notify up
|
||||||
|
bindsym XF86AudioLowerVolume exec --no-startup-id volume-notify down
|
||||||
|
bindsym XF86AudioMute exec --no-startup-id volume-notify mute
|
||||||
|
bindsym XF86MonBrightnessUp exec --no-startup-id brightness-notify up
|
||||||
|
bindsym XF86MonBrightnessDown exec --no-startup-id brightness-notify down
|
||||||
|
|
||||||
# Display management
|
# Display management
|
||||||
bindsym $mod+Ctrl+d exec autorandr --change
|
bindsym $mod+Ctrl+d exec autorandr --change
|
||||||
@@ -59,7 +76,10 @@ exec --no-startup-id nm-applet
|
|||||||
exec --no-startup-id blueman-applet
|
exec --no-startup-id blueman-applet
|
||||||
exec --no-startup-id xautolock -time 10 -locker blurlock
|
exec --no-startup-id xautolock -time 10 -locker blurlock
|
||||||
exec --no-startup-id autorandr --change
|
exec --no-startup-id autorandr --change
|
||||||
|
exec --no-startup-id greenclip daemon
|
||||||
|
exec_always --no-startup-id autotiling
|
||||||
exec --no-startup-id keepassxc --keyfile /home/kalle/kgokeyfile /home/kalle/Passwords.kdbx
|
exec --no-startup-id keepassxc --keyfile /home/kalle/kgokeyfile /home/kalle/Passwords.kdbx
|
||||||
|
exec --no-startup-id sysinfo-notify
|
||||||
|
|
||||||
bindsym $mod+Left focus left
|
bindsym $mod+Left focus left
|
||||||
bindsym $mod+Down focus down
|
bindsym $mod+Down focus down
|
||||||
@@ -84,10 +104,10 @@ bindsym $mod+Ctrl+Left workspace prev
|
|||||||
# Workspace names
|
# Workspace names
|
||||||
# Eg: set $ws1 1:mail
|
# Eg: set $ws1 1:mail
|
||||||
# set $ws2 2:
|
# set $ws2 2:
|
||||||
set $ws1 1
|
set $ws1 1:WEB
|
||||||
set $ws2 2
|
set $ws2 2:TERM
|
||||||
set $ws3 3
|
set $ws3 3:EDIT
|
||||||
set $ws4 4
|
set $ws4 4:FILES
|
||||||
set $ws5 5
|
set $ws5 5
|
||||||
set $ws6 6
|
set $ws6 6
|
||||||
set $ws7 7
|
set $ws7 7
|
||||||
@@ -114,9 +134,11 @@ bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
|
|||||||
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
||||||
|
|
||||||
# Open applications on specific workspaces
|
# Open applications on specific workspaces
|
||||||
# assign [class="Thunderbird"] $ws1
|
assign [class="Vivaldi-stable"] $ws1
|
||||||
# assign [class="Pcmanfm"] $ws3
|
assign [class="Alacritty"] $ws2
|
||||||
# assign [class="Skype"] $ws5
|
assign [class="Mousepad"] $ws3
|
||||||
|
assign [class="ghostwriter"] $ws3
|
||||||
|
assign [class="Thunar"] $ws4
|
||||||
|
|
||||||
# Open specific applications in floating mode
|
# Open specific applications in floating mode
|
||||||
for_window [title="alsamixer"] floating enable border pixel 1
|
for_window [title="alsamixer"] floating enable border pixel 1
|
||||||
@@ -130,11 +152,7 @@ for_window [class="Nitrogen"] floating enable sticky enable border normal
|
|||||||
for_window [class="Pavucontrol"] floating enable
|
for_window [class="Pavucontrol"] floating enable
|
||||||
for_window [class="Simple-scan"] floating enable border normal
|
for_window [class="Simple-scan"] floating enable border normal
|
||||||
for_window [class="(?i)System-config-printer.py"] floating enable border normal
|
for_window [class="(?i)System-config-printer.py"] floating enable border normal
|
||||||
for_window [class="Skype"] floating enable border normal
|
for_window [class="KeePassXC"] floating enable
|
||||||
for_window [class="Timeset-gui"] floating enable border normal
|
|
||||||
for_window [class="SimpleScreenRecorder"] floating enable border normal
|
|
||||||
for_window [class="MPlayer"] floating enable
|
|
||||||
for_window [class="Spotify"] floating enable
|
|
||||||
|
|
||||||
# switch to workspace with urgent window automatically
|
# switch to workspace with urgent window automatically
|
||||||
for_window [urgent=latest] focus
|
for_window [urgent=latest] focus
|
||||||
|
|||||||
14
files/configs/misc-scripts/brightness-notify
Normal file
14
files/configs/misc-scripts/brightness-notify
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Brightness control with dunst notification
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
up)
|
||||||
|
brightnessctl set +5%
|
||||||
|
;;
|
||||||
|
down)
|
||||||
|
brightnessctl set 5%-
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
BRIGHTNESS=$(brightnessctl -m | awk -F, '{print $4}' | tr -d '%')
|
||||||
|
dunstify -a "brightness" -u low -r 9998 -h int:value:${BRIGHTNESS} " ${BRIGHTNESS}%"
|
||||||
4
files/configs/misc-scripts/clipboard-rofi
Normal file
4
files/configs/misc-scripts/clipboard-rofi
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Rofi-based clipboard manager using greenclip
|
||||||
|
|
||||||
|
rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
|
||||||
15
files/configs/misc-scripts/sysinfo-notify
Normal file
15
files/configs/misc-scripts/sysinfo-notify
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Show system info notification on login
|
||||||
|
|
||||||
|
sleep 3
|
||||||
|
|
||||||
|
IP=$(ip route get 1.1.1.1 2>/dev/null | grep -o 'src [0-9.]*' | awk '{print $2}')
|
||||||
|
MEM_TOTAL=$(free -h | grep Mem | awk '{print $2}')
|
||||||
|
MEM_AVAIL=$(free -h | grep Mem | awk '{print $7}')
|
||||||
|
DISK_AVAIL=$(df -h / | tail -1 | awk '{print $4}')
|
||||||
|
BATTERY=$(cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo "N/A")
|
||||||
|
UPTIME=$(uptime -p | sed 's/up //')
|
||||||
|
|
||||||
|
dunstify -a "sysinfo" -u normal -r 9997 -t 8000 \
|
||||||
|
"System Info" \
|
||||||
|
"IP: ${IP:-nicht verbunden}\nRAM frei: ${MEM_AVAIL}/${MEM_TOTAL}\nDisk frei: ${DISK_AVAIL}\nAkku: ${BATTERY}%\nUptime: ${UPTIME}"
|
||||||
24
files/configs/misc-scripts/volume-notify
Normal file
24
files/configs/misc-scripts/volume-notify
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Volume control with dunst notification
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
up)
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||||
|
;;
|
||||||
|
down)
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||||
|
;;
|
||||||
|
mute)
|
||||||
|
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
VOLUME=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]*%' | head -1)
|
||||||
|
MUTE=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
|
||||||
|
|
||||||
|
if [[ "${MUTE}" == "yes" ]]; then
|
||||||
|
dunstify -a "volume" -u low -r 9999 -h int:value:0 " MUTE"
|
||||||
|
else
|
||||||
|
VOL_NUM=${VOLUME%\%}
|
||||||
|
dunstify -a "volume" -u low -r 9999 -h int:value:${VOL_NUM} " ${VOLUME}"
|
||||||
|
fi
|
||||||
@@ -82,3 +82,33 @@
|
|||||||
src: files/configs/misc-scripts/blurlock
|
src: files/configs/misc-scripts/blurlock
|
||||||
dest: /usr/bin/blurlock
|
dest: /usr/bin/blurlock
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: i3 Configuration - Copy clipboard-rofi script
|
||||||
|
copy:
|
||||||
|
src: files/configs/misc-scripts/clipboard-rofi
|
||||||
|
dest: /usr/bin/clipboard-rofi
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: i3 Configuration - Copy volume-notify script
|
||||||
|
copy:
|
||||||
|
src: files/configs/misc-scripts/volume-notify
|
||||||
|
dest: /usr/bin/volume-notify
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: i3 Configuration - Copy brightness-notify script
|
||||||
|
copy:
|
||||||
|
src: files/configs/misc-scripts/brightness-notify
|
||||||
|
dest: /usr/bin/brightness-notify
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: i3 Configuration - Copy sysinfo-notify script
|
||||||
|
copy:
|
||||||
|
src: files/configs/misc-scripts/sysinfo-notify
|
||||||
|
dest: /usr/bin/sysinfo-notify
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: i3 Configuration - Create Screenshots directory
|
||||||
|
become_user: "{{ username }}"
|
||||||
|
file:
|
||||||
|
path: "{{ userhome }}/Pictures/Screenshots"
|
||||||
|
state: directory
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- name: Package Installation - Productivity Tools
|
- name: Package Installation - Productivity Tools
|
||||||
package:
|
package:
|
||||||
name: ["alacritty", "ranger", "mousepad", "ghostwriter"]
|
name: ["alacritty", "ranger", "mousepad", "ghostwriter", "thunar", "xclip"]
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Package Installation - Development Tools
|
- name: Package Installation - Development Tools
|
||||||
@@ -15,7 +15,16 @@
|
|||||||
|
|
||||||
- name: Package Installation - System Desktop
|
- name: Package Installation - System Desktop
|
||||||
package:
|
package:
|
||||||
name: ["rofi", "nitrogen", "arandr", "autorandr", "dunst"]
|
name:
|
||||||
|
[
|
||||||
|
"rofi",
|
||||||
|
"nitrogen",
|
||||||
|
"arandr",
|
||||||
|
"autorandr",
|
||||||
|
"dunst",
|
||||||
|
"brightnessctl",
|
||||||
|
"autotiling",
|
||||||
|
]
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Package Installation - I3 Desktop
|
- name: Package Installation - I3 Desktop
|
||||||
|
|||||||
@@ -5,9 +5,15 @@
|
|||||||
|
|
||||||
- name: Package Installation - Productivity Tools
|
- name: Package Installation - Productivity Tools
|
||||||
package:
|
package:
|
||||||
name: ["alacritty", "ranger", "mousepad", "ghostwriter"]
|
name: ["alacritty", "ranger", "mousepad", "ghostwriter", "thunar", "xclip"]
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: Package Installation - Install greenclip from AUR
|
||||||
|
become_user: "{{ username }}"
|
||||||
|
command: pamac install --no-confirm greenclip
|
||||||
|
args:
|
||||||
|
creates: /usr/bin/greenclip
|
||||||
|
|
||||||
- name: Package Installation - Development Tools
|
- name: Package Installation - Development Tools
|
||||||
package:
|
package:
|
||||||
name: ["binutils"]
|
name: ["binutils"]
|
||||||
@@ -20,5 +26,15 @@
|
|||||||
|
|
||||||
- name: Package Installation - System Desktop
|
- name: Package Installation - System Desktop
|
||||||
package:
|
package:
|
||||||
name: ["rofi", "nitrogen", "dunst", "i3blocks", "arandr", "autorandr"]
|
name:
|
||||||
|
[
|
||||||
|
"rofi",
|
||||||
|
"nitrogen",
|
||||||
|
"dunst",
|
||||||
|
"i3blocks",
|
||||||
|
"arandr",
|
||||||
|
"autorandr",
|
||||||
|
"brightnessctl",
|
||||||
|
"autotiling",
|
||||||
|
]
|
||||||
state: present
|
state: present
|
||||||
|
|||||||
@@ -5,7 +5,16 @@
|
|||||||
|
|
||||||
- name: Package Installation - Productivity Tools
|
- name: Package Installation - Productivity Tools
|
||||||
package:
|
package:
|
||||||
name: ["alacritty", "ranger", "mousepad", "ghostwriter"]
|
name:
|
||||||
|
[
|
||||||
|
"alacritty",
|
||||||
|
"ranger",
|
||||||
|
"mousepad",
|
||||||
|
"ghostwriter",
|
||||||
|
"thunar",
|
||||||
|
"xclip",
|
||||||
|
"greenclip",
|
||||||
|
]
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Package Installation - Development Tools
|
- name: Package Installation - Development Tools
|
||||||
@@ -20,5 +29,15 @@
|
|||||||
|
|
||||||
- name: Package Installation - System Desktop
|
- name: Package Installation - System Desktop
|
||||||
package:
|
package:
|
||||||
name: ["rofi", "nitrogen", "dunst", "i3blocks", "arandr", "autorandr"]
|
name:
|
||||||
|
[
|
||||||
|
"rofi",
|
||||||
|
"nitrogen",
|
||||||
|
"dunst",
|
||||||
|
"i3blocks",
|
||||||
|
"arandr",
|
||||||
|
"autorandr",
|
||||||
|
"brightnessctl",
|
||||||
|
"autotiling",
|
||||||
|
]
|
||||||
state: present
|
state: present
|
||||||
|
|||||||
Reference in New Issue
Block a user