Skip to content

Commit

Permalink
updated sway configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
itsManjeet committed Jul 16, 2024
1 parent 4b12c39 commit 142cee6
Show file tree
Hide file tree
Showing 13 changed files with 176 additions and 407 deletions.
410 changes: 4 additions & 406 deletions elements/components/desktop-shell.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions elements/system/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ depends:
- components/network-manager-applet.yml
- components/blueman.yml
- components/ntfs-3g.yml
- components/srclang.yml

- components/desktop-shell.yml
- components/initial-setup.yml
Expand Down
22 changes: 22 additions & 0 deletions files/sway/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
include /etc/sway/config.d/color-scheme.conf
include /etc/sway/config.d/fonts.conf
include /etc/sway/config.d/defaults.conf
include /etc/sway/config.d/devices.conf
include /etc/sway/config.d/background.conf
include /etc/sway/config.d/bindings.conf
include /etc/sway/config.d/statusbar.conf
include /etc/sway/config.d/autostart.conf

titlebar_border_thickness 2
titlebar_padding 5
title_align center
default_border pixel 3

floating_modifier $Mod normal

# class border background foreground indicator child_border
client.focused $BackgroundColor $BackgroundColor $ForegroundColor $HighlightColor $BorderColor
client.focused_inactive $BackgroundSecondaryColor $BackgroundSecondaryColor $ForegroundSecondaryColor $HighlightColor $BackgroundSecondaryColor
client.unfocused $BackgroundSecondaryColor $BackgroundSecondaryColor $ForegroundSecondaryColor $HighlightColor $BackgroundSecondaryColor
client.urgent $BackgroundSecondaryColor $BackgroundSecondaryColor $ForegroundSecondaryColor $HighlightColor $BackgroundSecondaryColor
client.placeholder $BackgroundSecondaryColor $BackgroundSecondaryColor $ForegroundSecondaryColor $HighlightColor $BackgroundSecondaryColor
22 changes: 22 additions & 0 deletions files/sway/config.d/autostart.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
exec swayidle -w \
timeout 300 'swaylock -f' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f'

set $schema org.gnome.desktop.interface
exec_always {
gsettings set org.gtk.Settings.FileChooser window-size "(1000, 500)"
gsettings set $schema gtk-theme "Qogir-Light"
gsettings set $schema.wm.preferences theme "Qogir-Light"
gsettings set $schema icon-theme "Qogir"
gsettings set $schema cursor-theme "Qogir"
gsettings set $schema font-name "IBM Plex 12"
}

exec_always foot --server

exec_always mako --config /etc/xdg/mako/config

exec dbus-update-activation-environment --systemd --all
exec /usr/lib/xdg-desktop-portal --replace
1 change: 1 addition & 0 deletions files/sway/config.d/background.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
output * bg "/usr/share/backgrounds/default.jpg" fill
84 changes: 84 additions & 0 deletions files/sway/config.d/bindings.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
set $Mod Mod4

bindswitch --reload --locked lid:on output * disabled
bindswitch --reload --locked lid:off output * enabled

bindswitch tablet:on exec TabletMode on
bindswitch tablet:off exec TabletMode off

bindsym $Mod+Return exec $Terminal
bindsym $Mod+d exec $QuickLauncher
bindsym $Mod+a exec $ApplicationLauncher

bindsym $Mod+Shift+q kill
bindsym $Mod+Shift+c reload

bindsym $Mod+Shift+e exec $Powermenu

bindsym $Mod+Left focus left
bindsym $Mod+Right focus right
bindsym $Mod+Up focus up
bindsym $Mod+Down focus down

bindsym $Mod+1 workspace number 1
bindsym $Mod+2 workspace number 2
bindsym $Mod+3 workspace number 3
bindsym $Mod+4 workspace number 4
bindsym $Mod+5 workspace number 5
bindsym $Mod+6 workspace number 6
bindsym $Mod+7 workspace number 7
bindsym $Mod+8 workspace number 8
bindsym $Mod+9 workspace number 9
bindsym $Mod+0 workspace number 10

bindsym $Mod+Shift+1 move container to workspace number 1
bindsym $Mod+Shift+2 move container to workspace number 2
bindsym $Mod+Shift+3 move container to workspace number 3
bindsym $Mod+Shift+4 move container to workspace number 4
bindsym $Mod+Shift+5 move container to workspace number 5
bindsym $Mod+Shift+6 move container to workspace number 6
bindsym $Mod+Shift+7 move container to workspace number 7
bindsym $Mod+Shift+8 move container to workspace number 8
bindsym $Mod+Shift+9 move container to workspace number 9
bindsym $Mod+Shift+0 move container to workspace number 10

bindsym $Mod+b splith
bindsym $Mod+v splitv

bindsym $Mod+s layout stacking
bindsym $Mod+w layout tabbed
bindsym $Mod+e layout toggle split

bindsym $Mod+f fullscreen
bindsym $Mod+Shift+space floating toggle
bindsym $Mod+space focus mode_toggle

bindsym XF86AudioMute exec --no-startup-id "amixer -q set Master toggle"
bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer -q set Master 5%+ unmute && pkill -SIGRTMIN+10 i3blocks"
bindsym XF86AudioLowerVolume exec --no-startup-id "amixer -q set Master 5%- unmute && pkill -SIGRTMIN+10 i3blocks"

bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next

bindsym XF86MonBrightnessUp exec brightnessctl s +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p'
bindsym XF86MonBrightnessDown exec brightnessctl s 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p'

bindsym Print exec grimshot save screen ~/Pictures/$(date '+%Y-%m-%d-%T')-screenshot.png
bindsym Shift+Print exec grimshot save area ~/Pictures/$(date '+%Y-%m-%d-%T')-screenshot.png

bindsym $Mod+Shift+minus move scratchpad
bindsym $Mod+minus scratchpad show

bindgesture swipe:3:up exec $ApplicationLauncher

bindgesture swipe:3:right workspace prev
bindgesture swipe:3:left workspace next

mode "resize" {
bindsym Left resize shrink width 10px
bindsym Right resize grow width 10px
bindsym Up resize shrink height 10px
bindsym Down resize grow height 10px
}
bindsym $Mod+r mode "resize"
6 changes: 6 additions & 0 deletions files/sway/config.d/color-scheme.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set $BackgroundColor #EEF1FF
set $BackgroundSecondaryColor #D2DAFF
set $ForegroundColor #344C64
set $ForegroundSecondaryColor #577B8D
set $BorderColor #B1B2FF
set $HighlightColor #B1B2FF
7 changes: 7 additions & 0 deletions files/sway/config.d/defaults.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set $Menu bemenu-run --fn "IBM Plex Sans 12"
set $Terminal footclient
set $QuickLauncher $Menu | xargs swaymsg exec --
set $Powermenu $Menu | xargs swaymsg exec --
set $ApplicationLauncher $QuickLauncher

seat seat0 xcursor_theme Qogir 24
6 changes: 6 additions & 0 deletions files/sway/config.d/devices.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
input "type:touchpad" {
dwt enabled
tap enabled
middle_emulation enabled
natural_scroll enabled
}
1 change: 1 addition & 0 deletions files/sway/config.d/fonts.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
font pango: Liberation Sans Regular 12
12 changes: 12 additions & 0 deletions files/sway/config.d/statusbar.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
bar {
position top
status_command i3blocks

colors {
statusline $ForegroundColor
background $BackgroundColor
focused_workspace $BackgroundSecondaryColor $BackgroundSecondaryColor $ForegroundSecondaryColor
active_workspace $BackgroundSecondaryColor $BackgroundSecondaryColor $ForegroundSecondaryColor
inactive_workspace $BackgroundColor $BackgroundColor $ForegroundColor
}
}
9 changes: 9 additions & 0 deletions files/swaylock/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
image="/usr/share/backgrounds/default_blur.jpg"
scaling=fill

indicator-caps-lock
indicator-idle-visible
indicator-thickness=4

font="Liberation Sans"
font-size=14
2 changes: 1 addition & 1 deletion src/srclang

0 comments on commit 142cee6

Please sign in to comment.