sway

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

config (8190B)


      1 # Required
      2 # - i3status-rs `cargo install i3status-rs`
      3 # - pipewire `sudo apt install pipewire alsa-base alsa-utils pipewire-alsa`
      4 
      5 ### Variables
      6 #
      7 set $mod Mod1
      8 set $win Mod4
      9 # Home row direction keys, like vim
     10 set $left h
     11 set $down j
     12 set $up k
     13 set $right l
     14 # Your preferred terminal emulator
     15 set $term alacritty
     16 # Your preferred application launcher
     17 set $menu wmenu-run
     18 
     19 include /etc/sway/config-vars.d/*
     20 
     21 ### Output configuration
     22 #
     23 # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
     24 # This is commented in Debian, because the Sway wallpaper files are in a separate
     25 # package `sway-backgrounds`. Installing this package drops a config file to
     26 # /etc/sway/config.d/
     27 # output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
     28 #
     29 # Example configuration:
     30 #
     31 #   output HDMI-A-1 resolution 1920x1080 position 1920,0
     32 #
     33 # You can get the names of your outputs by running: swaymsg -t get_outputs
     34 
     35 ### Idle configuration
     36 #
     37 # Example configuration:
     38 #
     39 # exec swayidle -w \
     40 #          timeout 300 'swaylock -f -c 000000' \
     41 #          timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
     42 #          before-sleep 'swaylock -f -c 000000'
     43 #
     44 # This will lock your screen after 300 seconds of inactivity, then turn off
     45 # your displays after another 300 seconds, and turn your screens back on when
     46 # resumed. It will also lock your screen before your computer goes to sleep.
     47 
     48 ### Input configuration
     49 #
     50 # Example configuration:
     51 #
     52 #   input "2:14:SynPS/2_Synaptics_TouchPad" {
     53 #       dwt enabled
     54 #       tap enabled
     55 #       natural_scroll enabled
     56 #       middle_emulation enabled
     57 #   }
     58 #
     59 # You can get the names of your inputs by running: swaymsg -t get_inputs
     60 # Read `man 5 sway-input` for more information about this section.
     61 
     62 ### Key bindings
     63 #
     64 # Basics:
     65 #
     66     # Start a terminal
     67     bindsym $mod+Return exec $term
     68 
     69     # Kill focused window
     70     bindsym $mod+F4 kill
     71     # bindsym $mod+Shift+e kill
     72 
     73     # Start your launcher
     74     bindsym $win+R exec $menu
     75 
     76     # Drag floating windows by holding down $mod and left mouse button.
     77     # Resize them with right mouse button + $mod.
     78     # Despite the name, also works for non-floating windows.
     79     # Change normal to inverse to use left mouse button for resizing and right
     80     # mouse button for dragging.
     81     floating_modifier $mod normal
     82 
     83     # Reload the configuration file
     84     bindsym $mod+Shift+c reload
     85 
     86     # Exit sway (logs you out of your Wayland session)
     87     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'
     88 #
     89 # Moving around:
     90 #
     91     # Move your focus around
     92     bindsym $mod+$left focus left
     93     bindsym $mod+$down focus down
     94     bindsym $mod+$up focus up
     95     bindsym $mod+$right focus right
     96     # Or use $mod+[up|down|left|right]
     97     bindsym $mod+Left focus left
     98     bindsym $mod+Down focus down
     99     bindsym $mod+Up focus up
    100     bindsym $mod+Right focus right
    101 
    102     # Move the focused window with the same, but add Shift
    103     bindsym $mod+Shift+$left move left
    104     bindsym $mod+Shift+$down move down
    105     bindsym $mod+Shift+$up move up
    106     bindsym $mod+Shift+$right move right
    107     # Ditto, with arrow keys
    108     bindsym $mod+Shift+Left move left
    109     bindsym $mod+Shift+Down move down
    110     bindsym $mod+Shift+Up move up
    111     bindsym $mod+Shift+Right move right
    112 #
    113 # Workspaces:
    114 #
    115     # Define names for default workspaces for which we configure key bindings later on.
    116     # We use variables to avoid repeating the names in multiple places.
    117     set $ws1 "1"
    118     set $ws2 "2"
    119     set $ws3 "3"
    120     set $ws4 "4"
    121     set $ws5 "5"
    122     set $ws6 "6"
    123     set $ws7 "7"
    124     set $ws8 "8"
    125     set $ws9 "9"
    126     set $ws10 "10"
    127 
    128     # switch to workspace
    129     bindsym $win+1 workspace number $ws1
    130     bindsym $win+2 workspace number $ws2
    131     bindsym $win+3 workspace number $ws3
    132     bindsym $win+4 workspace number $ws4
    133     bindsym $win+5 workspace number $ws5
    134     bindsym $win+6 workspace number $ws6
    135     bindsym $win+7 workspace number $ws7
    136     bindsym $win+8 workspace number $ws8
    137     bindsym $win+9 workspace number $ws9
    138     bindsym $win+0 workspace number $ws10
    139 
    140     # move focused container to workspace
    141     bindsym $win+Shift+1 move container to workspace number $ws1
    142     bindsym $win+Shift+2 move container to workspace number $ws2
    143     bindsym $win+Shift+3 move container to workspace number $ws3
    144     bindsym $win+Shift+4 move container to workspace number $ws4
    145     bindsym $win+Shift+5 move container to workspace number $ws5
    146     bindsym $win+Shift+6 move container to workspace number $ws6
    147     bindsym $win+Shift+7 move container to workspace number $ws7
    148     bindsym $win+Shift+8 move container to workspace number $ws8
    149     bindsym $win+Shift+9 move container to workspace number $ws9
    150     bindsym $win+Shift+0 move container to workspace number $ws10
    151     # Note: workspaces can have any name you want, not just numbers.
    152     # We just use 1-10 as the default.
    153 #
    154 # Layout stuff:
    155 #
    156     # You can "split" the current object of your focus with
    157     # $mod+b or $mod+v, for horizontal and vertical splits
    158     # respectively.
    159     bindsym $mod+b splith
    160     bindsym $mod+v splitv
    161 
    162     # Switch the current container between different layout styles
    163     bindsym $mod+s layout stacking
    164     bindsym $mod+w layout tabbed
    165     bindsym $mod+e layout toggle split
    166 
    167     # Make the current focus fullscreen
    168     bindsym $mod+f fullscreen
    169 
    170     # Toggle the current focus between tiling and floating mode
    171     bindsym $mod+Shift+space floating toggle
    172 
    173     # Swap focus between the tiling area and the floating area
    174     bindsym $mod+space focus mode_toggle
    175 
    176     # Move focus to the parent container
    177     bindsym $mod+a focus parent
    178 #
    179 # Scratchpad:
    180 #
    181     # Sway has a "scratchpad", which is a bag of holding for windows.
    182     # You can send windows there and get them back later.
    183 
    184     # Move the currently focused window to the scratchpad
    185     bindsym $mod+Shift+minus move scratchpad
    186 
    187     # Show the next scratchpad window or hide the focused scratchpad window.
    188     # If there are multiple scratchpad windows, this command cycles through them.
    189     bindsym $mod+minus scratchpad show
    190 #
    191 # Resizing containers:
    192 #
    193 mode "resize" {
    194     # left will shrink the containers width
    195     # right will grow the containers width
    196     # up will shrink the containers height
    197     # down will grow the containers height
    198     bindsym $left resize shrink width 10px
    199     bindsym $down resize grow height 10px
    200     bindsym $up resize shrink height 10px
    201     bindsym $right resize grow width 10px
    202 
    203     # Ditto, with arrow keys
    204     bindsym Left resize shrink width 10px
    205     bindsym Down resize grow height 10px
    206     bindsym Up resize shrink height 10px
    207     bindsym Right resize grow width 10px
    208 
    209     # Return to default mode
    210     bindsym Return mode "default"
    211     bindsym Escape mode "default"
    212 }
    213 bindsym $mod+r mode "resize"
    214 #
    215 # Utilities:
    216 #
    217     # Special keys to adjust volume via PulseAudio
    218     bindsym --locked XF86AudioMute exec wpctl set-mute \@DEFAULT_SINK@ toggle
    219     bindsym --locked XF86AudioLowerVolume exec wpctl set-volume \@DEFAULT_SINK@ 2%-
    220     bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume \@DEFAULT_SINK@ 2%+
    221     # Special keys to adjust brightness via brightnessctl
    222     bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
    223     bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
    224     # Special key to take a screenshot with grim
    225     bindsym Print exec grim
    226 
    227 #
    228 # Status Bar:
    229 #
    230 # Read `man 5 sway-bar` for more information about this section.
    231 # bar {
    232 #     position bottom
    233 #
    234 #     # When the status_command prints a new line to stdout, swaybar updates.
    235 #     # The default just shows the current date and time.
    236 #     status_command while date +'%Y-%m-%d %X'; do sleep 1; done
    237 #
    238 #     colors {
    239 #         statusline #ffffff
    240 #         background #000000
    241 #         inactive_workspace #32323200 #32323200 #5c5c5c
    242 #     }
    243 # }
    244 
    245 include /etc/sway/config.d/*
    246 include ~/.config/sway/config.d/*
    247 
    248 input type:keyboard {
    249 	xkb_layout jp
    250 }
    251 
    252 input type:touchpad {
    253     tap enabled
    254     natural_scroll enabled
    255 }
    256 exec fcitx5 -d
    257 
    258 xwayland enable
    259 
    260 font "Moralerspace Neon" 11