Skip to content

Commit

Permalink
sway: initial config
Browse files Browse the repository at this point in the history
  • Loading branch information
FredeEB committed Feb 1, 2024
1 parent 5315191 commit 05e6a1a
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 9 deletions.
96 changes: 96 additions & 0 deletions configs/sway/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@

font Iosevka Nerd Font 12

set $up k
set $down j
set $left h
set $right l
set $mod Mod4
set $browser firefox
set $term wezterm

floating_modifier $mod

bindsym $mod+Shift+q kill

bindsym $mod+Shift+p exec betterlockscreen -l

bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec $term -e bash
bindsym $mod+r exec rofi -show run
bindsym $mod+w exec rofi -show windowcd
bindsym $mod+q exec $editor
bindsym $mod+b exec $browser

bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound

bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 9 # decrease screen brightness

bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right

bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right

bindsym $mod+g fullscreen toggle

bindsym $mod+Shift+space floating toggle

bindsym $mod+space focus mode_toggle

bindsym $mod+Shift+minus move scratchpad

bindsym $mod+minus scratchpad show

bindsym $mod+a workspace 1
bindsym $mod+s workspace 2
bindsym $mod+d workspace 3
bindsym $mod+f workspace 4
bindsym $mod+z workspace 5
bindsym $mod+x workspace 6
bindsym $mod+c workspace 7
bindsym $mod+v workspace 8

bindsym $mod+Shift+a move container to workspace 1
bindsym $mod+Shift+s move container to workspace 2
bindsym $mod+Shift+d move container to workspace 3
bindsym $mod+Shift+f move container to workspace 4
bindsym $mod+Shift+z move container to workspace 5
bindsym $mod+Shift+x move container to workspace 6
bindsym $mod+Shift+c move container to workspace 7
bindsym $mod+Shift+v move container to workspace 8

bindsym $mod+Shift+r reload
bindsym $mod+Shift+e exit

bindsym $mod+y resize shrink width 10 px or 10 ppt
bindsym $mod+u resize grow height 10 px or 10 ppt
bindsym $mod+i resize shrink height 10 px or 10 ppt
bindsym $mod+o resize grow width 10 px or 10 ppt

exec_always feh --bg-center ~/desktop.*

client.focused #555500 #1c1e1f #fafafa #338f5f #2a2e2f
client.unfocused #1c1e1f #1c1e1f #aaaaaa #338f5f #1c1e1f
default_border none
default_floating_border none
font pango:monospace 0
titlebar_padding 1
titlebar_border_thickness 0

input type:keyboard {
repeat_delay 200
repeat_rate 50

xkb_options "caps:escape"
}

exec_always --no-startup-id waybar
exec_always --no-startup-id swaybg -i ~/desktop.jpg
20 changes: 11 additions & 9 deletions modules/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,24 @@ let
in
{
environment.systemPackages = with pkgs; [
bemenu
configure-gtk
dbus
dbus-sway-environment
configure-gtk
wayland
xdg-utils
glib
tokyo-night-gtk
gnome3.adwaita-icon-theme # default gnome cursors
swaylock
swayidle
grim # screenshot functionality
slurp
wl-clipboard
bemenu
mako
slurp
swaybg
swayidle
swaylock
tokyo-night-gtk
waybar
wayland
wdisplays
wl-clipboard
xdg-utils
];

services.dbus.enable = true;
Expand Down
1 change: 1 addition & 0 deletions systems/nixos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

imports = [
inputs.home-manager.nixosModules.default
../modules/sway.nix
];

users.users.bun = {
Expand Down
1 change: 1 addition & 0 deletions users/bun.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
".config/dunst".source = mkSymlink ../configs/dunst;
".config/nvim".source = mkSymlink ../configs/nvim;
".config/rofi".source = mkSymlink ../configs/rofi;
".config/sway".source = mkSymlink ../configs/sway;
".config/wezterm".source = mkSymlink ../configs/wezterm;

".config/gdb/gdbinit".source = pkgs.writeText "gdbinit" ''
Expand Down

0 comments on commit 05e6a1a

Please sign in to comment.