~whynothugo/dotfiles

ref: 5837972 dotfiles/home/.config/sway/apps.conf -rw-r--r-- 3.3 KiB
58379726Hugo Osvaldo Barrera Rotate GPG key 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Launcher:
bindsym $super+d exec alacritty --class=sway-launcher -e sway-launcher-desktop
for_window [app_id="^sway-launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10
# Other launchers I've tried:
# - ulauncher: prohibitively slow
# - wofi: works well, but fuzzy matching want's really there.
# - yofi: can't run commands with no desktop file. Items are not well aligned.
#   Not bad, but the current is a bit nicer.

# Terminals
bindsym $super+T exec alacritty
# In case I ever break ksh
bindsym $super+Shift+T exec alacritty -e bash

# Applications
bindsym $super+q exec nemo
bindsym $super+c exec $BROWSER
bindsym $super+o exec wdisplays
bindsym $super+Comma exec flatpak run org.onepassword.onepassword

# Microphone
# This toggle the microphone mute/unmuted. An indicator in shown in waybar when
# the mic is open, so this works globally for all calls and apps.
bindsym $super+m                  exec ponymix --source toggle
bindsym Ctrl+XF86AudioMute        exec ponymix --source toggle

# Output volume
bindsym XF86AudioMute               exec ponymix --sink toggle
bindsym XF86AudioLowerVolume        exec ponymix --sink decrease 3
bindsym XF86AudioRaiseVolume        exec ponymix --sink increase 3
bindsym $super+XF86AudioLowerVolume exec ponymix --sink set-volume 0
bindsym $super+XF86AudioRaiseVolume exec ponymix --sink set-volume 100

# Brightness control
bindsym XF86MonBrightnessDown exec ~/.local/lib/light-wrapper decrease
bindsym XF86MonBrightnessUp exec ~/.local/lib/light-wrapper increase
bindsym $super+XF86MonBrightnessDown exec ~/.local/lib/light-wrapper low
bindsym $super+XF86MonBrightnessUp exec ~/.local/lib/light-wrapper high

# Power management
bindsym XF86PowerOff exec loginctl lock-session
bindsym Shift+XF86PowerOff exec systemctl suspend
bindsym Control+XF86PowerOff exec systemctl hibernate

bindsym XF86Eject exec loginctl lock-session
bindsym Shift+XF86Eject exec systemctl suspend
bindsym Control+XF86Eject exec systemctl hibernate

bindsym Pause exec loginctl lock-session
bindsym Shift+Pause exec systemctl suspend
bindsym Control+Pause exec systemctl hibernate

# Dismiss notifications with alt+space
bindsym $alt+space exec makoctl dismiss
bindsym Shift+$alt+space exec makoctl dismiss --all

# Float the buggy firefox indicator
for_window [title="Firefox - Sharing Indicator"] floating enable
# Float the buggy chromium indicator
for_window [title=".*is sharing your screen."] floating enable


# The GTK file-choser renders too big on the laptop screen (the windows is
# bigger than the monitor, so controls are off-screen.
# This picks up all variations of the file picker for firefox, and shrinks it.
# As a bonus, it also grows the window to a larger size if it's too small.
for_window [title="File Upload" floating] resize set width 90 ppt height 90 ppt
for_window [title="Open File" floating] resize set width 90 ppt height 90 ppt
for_window [title="Enter name of file to save to…" floating] resize set width 90 ppt height 90 ppt
for_window [title="Save As" floating] resize set width 90 ppt height 90 ppt
for_window [title="Save Image" floating] resize set width 90 ppt height 90 ppt

# This matches things that shouldn't (e.g.: open or save prompts)
# for_window [app_id="firefox" floating] floating disable

bindsym $super+u exec kruler
for_window [app_id="org.kde.kruler"] floating enable