pub / dotfiles

Configuration of software on my computer
git clone https://src.jayvii.de/pub/dotfiles.git
Home | Log | Files | Exports | Refs | RSS

config (11077B)


      1 # Default config for sway
      2 #
      3 # Copy this to ~/.config/sway/config and edit it to your liking.
      4 #
      5 # Read `man 5 sway` for a complete reference.
      6 
      7 ### Variables
      8 #
      9 # Logo key. Use Mod1 for Alt.
     10 set $mod Mod4
     11 # Home row direction keys, like vim
     12 set $left h
     13 set $down j
     14 set $up k
     15 set $right l
     16 # Your preferred terminal emulator
     17 set $term foot
     18 # Your preferred application launcher
     19 # Note: pass the final command to swaymsg so that the resulting window can be opened
     20 # on the original workspace that the command was run on.
     21 #set $menu dmenu_path | dmenu | xargs swaymsg exec --
     22 set $menu wofi
     23 
     24 include /etc/sway/config-vars.d/*
     25 
     26 ### Output configuration
     27 #
     28 # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
     29 #output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
     30 output * bg ~/Bilder/Wallpaper/Sway_Wallpaper_purple_2048x1536.png fill
     31 #
     32 # Example configuration:
     33 #
     34 #   output HDMI-A-1 resolution 1920x1080 position 1920,0
     35 #
     36 # You can get the names of your outputs by running: swaymsg -t get_outputs
     37 
     38 ### Idle configuration
     39 #
     40 # Example configuration:
     41 #
     42  exec swayidle -w \
     43     timeout 290 "makoctl set-mode away" resume "makoctl set-mode default" \
     44     timeout 10 'swaylock -f' \
     45     timeout 60 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
     46     before-sleep 'makoctl set-mode away && swaylock' \
     47     after-sleep 'makoctl set-mode default'
     48 #
     49 # Set notification damon as AFK after almost 5 minutes. Lock screen 10 seconds
     50 # afterwards, turn of screen one minute afterwards. ALso set notification daemon
     51 # AFK and lock screen before going to sleep
     52 
     53 ### Input configuration
     54 #
     55 # Example configuration:
     56 #
     57 #   input "2:14:SynPS/2_Synaptics_TouchPad" {
     58 #       dwt enabled
     59 #       tap enabled
     60 #       natural_scroll enabled
     61 #       middle_emulation enabled
     62 #   }
     63 #
     64 # You can get the names of your inputs by running: swaymsg -t get_inputs
     65 # Read `man 5 sway-input` for more information about this section.
     66 input * {
     67     xkb_layout "de"
     68 }
     69 input "type:touchpad" {
     70     dwt enabled
     71     tap enabled
     72     tap_button_map lrm
     73 }
     74 
     75 
     76 ### Key bindings
     77 #
     78 # Basics:
     79 #
     80     # Start a terminal
     81     bindsym $mod+t exec $term
     82 
     83     # Kill focused window
     84     bindsym $mod+q kill
     85 
     86     # Start your launcher
     87     bindsym $mod+d exec $menu
     88 
     89     # Lock session
     90     bindsym $mod+l exec swaylock
     91     bindsym $mod+Shift+l exec wlogout
     92 
     93     # Drag floating windows by holding down $mod and left mouse button.
     94     # Resize them with right mouse button + $mod.
     95     # Despite the name, also works for non-floating windows.
     96     # Change normal to inverse to use left mouse button for resizing and right
     97     # mouse button for dragging.
     98     floating_modifier $mod normal
     99 
    100     # Reload the configuration file
    101     bindsym $mod+Shift+c reload
    102 
    103     # Exit sway (logs you out of your Wayland session)
    104     bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
    105 #
    106 # Moving around:
    107 #
    108     # Move your focus around
    109     #bindsym $mod+$left focus left
    110     #bindsym $mod+$down focus down
    111     #bindsym $mod+$up focus up
    112     #bindsym $mod+$right focus right
    113     # Or use $mod+[up|down|left|right]
    114     bindsym $mod+Left focus left
    115     bindsym $mod+Down focus down
    116     bindsym $mod+Up focus up
    117     bindsym $mod+Right focus right
    118 
    119     # Move the focused window with the same, but add Shift
    120     #bindsym $mod+Shift+$left move left
    121     #bindsym $mod+Shift+$down move down
    122     #bindsym $mod+Shift+$up move up
    123     #bindsym $mod+Shift+$right move right
    124     # Ditto, with arrow keys
    125     bindsym $mod+Shift+Left move left
    126     bindsym $mod+Shift+Down move down
    127     bindsym $mod+Shift+Up move up
    128     bindsym $mod+Shift+Right move right
    129 #
    130 # Workspaces:
    131 #
    132     # Switch to workspace
    133     bindsym --no-repeat $mod+1 workspace number 1; exec "echo 1 > /tmp/sovpipe"
    134     bindsym --no-repeat $mod+2 workspace number 2; exec "echo 1 > /tmp/sovpipe"
    135     bindsym --no-repeat $mod+3 workspace number 3; exec "echo 1 > /tmp/sovpipe"
    136     bindsym --no-repeat $mod+4 workspace number 4; exec "echo 1 > /tmp/sovpipe"
    137     bindsym --no-repeat $mod+5 workspace number 5; exec "echo 1 > /tmp/sovpipe"
    138     bindsym --no-repeat $mod+6 workspace number 6; exec "echo 1 > /tmp/sovpipe"
    139     bindsym --no-repeat $mod+7 workspace number 7; exec "echo 1 > /tmp/sovpipe"
    140     bindsym --no-repeat $mod+8 workspace number 8; exec "echo 1 > /tmp/sovpipe"
    141     bindsym --no-repeat $mod+9 workspace number 9; exec "echo 1 > /tmp/sovpipe"
    142     bindsym --no-repeat $mod+0 workspace number 10; exec "echo 1 > /tmp/sovpipe"
    143     bindsym --release $mod+1 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    144     bindsym --release $mod+2 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    145     bindsym --release $mod+3 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    146     bindsym --release $mod+4 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    147     bindsym --release $mod+5 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    148     bindsym --release $mod+6 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    149     bindsym --release $mod+7 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    150     bindsym --release $mod+8 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    151     bindsym --release $mod+9 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    152     bindsym --release $mod+0 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    153     # Move focused container to workspace
    154     bindsym $mod+Shift+1 move container to workspace number 1
    155     bindsym $mod+Shift+2 move container to workspace number 2
    156     bindsym $mod+Shift+3 move container to workspace number 3
    157     bindsym $mod+Shift+4 move container to workspace number 4
    158     bindsym $mod+Shift+5 move container to workspace number 5
    159     bindsym $mod+Shift+6 move container to workspace number 6
    160     bindsym $mod+Shift+7 move container to workspace number 7
    161     bindsym $mod+Shift+8 move container to workspace number 8
    162     bindsym $mod+Shift+9 move container to workspace number 9
    163     bindsym $mod+Shift+0 move container to workspace number 10
    164     bindsym --release $mod+Shift+1 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    165     bindsym --release $mod+Shift+2 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    166     bindsym --release $mod+Shift+3 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    167     bindsym --release $mod+Shift+4 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    168     bindsym --release $mod+Shift+5 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    169     bindsym --release $mod+Shift+6 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    170     bindsym --release $mod+Shift+7 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    171     bindsym --release $mod+Shift+8 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    172     bindsym --release $mod+Shift+9 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    173     bindsym --release $mod+Shift+0 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
    174     # Note: workspaces can have any name you want, not just numbers.
    175     # We just use 1-10 as the default.
    176 #
    177 # Layout stuff:
    178 #
    179     # You can "split" the current object of your focus with
    180     # $mod+b or $mod+v, for horizontal and vertical splits
    181     # respectively.
    182     bindsym $mod+b splith
    183     bindsym $mod+v splitv
    184 
    185     # Switch the current container between different layout styles
    186     bindsym $mod+s layout stacking
    187     bindsym $mod+w layout tabbed
    188     bindsym $mod+e layout toggle split
    189 
    190     # Make the current focus fullscreen
    191     bindsym $mod+f fullscreen
    192 
    193     # Toggle the current focus between tiling and floating mode
    194     bindsym $mod+Shift+space floating toggle
    195 
    196     # Swap focus between the tiling area and the floating area
    197     bindsym $mod+space focus mode_toggle
    198 
    199     # Move focus to the parent container
    200     bindsym $mod+a focus parent
    201 #
    202 # Scratchpad:
    203 #
    204     # Sway has a "scratchpad", which is a bag of holding for windows.
    205     # You can send windows there and get them back later.
    206 
    207     # Move the currently focused window to the scratchpad
    208     bindsym $mod+Shift+minus move scratchpad
    209 
    210     # Show the next scratchpad window or hide the focused scratchpad window.
    211     # If there are multiple scratchpad windows, this command cycles through them.
    212     bindsym $mod+minus scratchpad show
    213 
    214 #
    215 # Mediakeys
    216 #
    217 bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%; exec echo "Volume: $(pactl get-sink-volume @DEFAULT_SINK@ | awk '{ print $5 }')" > /tmp/notificationpipe
    218 bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%; exec echo "Volume: $(pactl get-sink-volume @DEFAULT_SINK@ | awk '{ print $5 }')" > /tmp/notificationpipe
    219 bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle; exec pactl get-sink-mute @DEFAULT_SINK@ > /tmp/notificationpipe
    220 bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle; exec pactl get-source-mute @DEFAULT_SOURCE@ > /tmp/notificationpipe
    221 bindsym XF86MonBrightnessDown exec ~/.config/sway/brightness.sh dec 5; exec echo "Brightness $(~/.config/sway/brightness.sh)" > /tmp/notificationpipe
    222 bindsym XF86MonBrightnessUp exec ~/.config/sway/brightness.sh inc 5; exec echo "Brightness $(~/.config/sway/brightness.sh)" > /tmp/notificationpipe
    223 
    224 #
    225 # Resizing containers:
    226 #
    227 mode "resize" {
    228     # left will shrink the containers width
    229     # right will grow the containers width
    230     # up will shrink the containers height
    231     # down will grow the containers height
    232     bindsym $left resize shrink width 10px
    233     bindsym $down resize grow height 10px
    234     bindsym $up resize shrink height 10px
    235     bindsym $right resize grow width 10px
    236 
    237     # Ditto, with arrow keys
    238     bindsym Left resize shrink width 10px
    239     bindsym Down resize grow height 10px
    240     bindsym Up resize shrink height 10px
    241     bindsym Right resize grow width 10px
    242 
    243     # Return to default mode
    244     bindsym Return mode "default"
    245     bindsym Escape mode "default"
    246 }
    247 bindsym $mod+r mode "resize"
    248 
    249 #
    250 # Status Bar:
    251 #
    252 # Read `man 5 sway-bar` for more information about this section.
    253 #bar {
    254 #    position top
    255 #
    256 #    # When the status_command prints a new line to stdout, swaybar updates.
    257 #    # The default just shows the current date and time.
    258 #    status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
    259 #
    260 #    colors {
    261 #        statusline #ffffff
    262 #        background #323232
    263 #        inactive_workspace #32323200 #32323200 #5c5c5c
    264 #    }
    265 #}
    266 
    267 include /etc/sway/config.d/*
    268 
    269 default_border pixel
    270 
    271 #
    272 ## Autostart
    273 #
    274 
    275 # SOV
    276 exec rm -f /tmp/sovpipe && mkfifo /tmp/sovpipe && tail -f /tmp/sovpipe | sov &
    277 
    278 # Notification Daemon
    279 exec ~/.config/sway/notification_daemon.sh
    280 
    281 # waybar
    282 exec waybar
    283 
    284 # wlsunset
    285 exec wlsunset -L 6.6441878 -l 49.7596208
    286 
    287 # set volume to 100% and mute
    288 exec pactl set-sink-volume @DEFAULT_SINK@ 100%
    289 exec pactl set-sink-mute @DEFAULT_SINK@ 1
    290 
    291 # set microphone to 15% and mute
    292 exec pactl set-source-volume @DEFAULT_SOURCE@ 15%
    293 exec pactl set-source-mute @DEFAULT_SOURCE@ 1
    294 
    295 # set brightness to 100%
    296 exec ~/.local/bin/brightness "inc" 100
    297 
    298 # Launch KDE Connect
    299 exec kdeconnect-indicator
    300 exec_always kdeconnect-cli --refresh
    301 
    302 # Launch Nextcloud Sync
    303 exec nextcloud --background
    304 
    305 # Launch Nextcloud Talk
    306 exec $HOME/.local/opt/nextcloud-talk/Nextcloud\ Talk --background
    307 
    308 # Launch Nextcloud Talk
    309 exec flatpak run org.signal.Signal
    310