diff --git a/sway/.config/sway/conf.d/window.conf b/sway/.config/sway/conf.d/window.conf new file mode 100644 index 0000000..c087a2b --- /dev/null +++ b/sway/.config/sway/conf.d/window.conf @@ -0,0 +1,15 @@ +### Window configurations + +gaps inner 5 +gaps outer 5 + +# No gaps when there is a single window +#smart_gaps on + +# Remove title bar +default_border pixel 2 + +for_window [window_type="dialog"] floating enable +for_window [window_role="dialog"] floating enable +for_window [shell="xwayland"] title_format "[XWayland] %title" + diff --git a/sway/.config/sway/conf.d/workspaces.conf b/sway/.config/sway/conf.d/workspaces.conf new file mode 100644 index 0000000..474cf04 --- /dev/null +++ b/sway/.config/sway/conf.d/workspaces.conf @@ -0,0 +1,12 @@ +# Sway workspace +# +# In this file there are all workspace specific configurations +# + +#set $ws1 "" +#set $ws2 "" +#set $ws3 "" +#set $ws4 "" +#set $ws5 "" + +#assign [app_id="foot"] $ws1 diff --git a/sway/.config/sway/config b/sway/.config/sway/config index d437a25..52dc207 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -21,9 +21,6 @@ set $browser 'firefox' # Your preferred notification daemon set $notification 'mako' -# Your preferred status bar -set $bar 'waybar' - # Set theme include themes/catppuccin-mocha @@ -35,10 +32,14 @@ client.urgent $peach $base $peach $overlay0 $peach client.placeholder $overlay0 $base $text $overlay0 $overlay0 client.background $base +# Setting cursor +seat seat0 xcursor_theme catppuccin-mocha-lavender-cursors 25 + ### Output configuration # # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) # output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill + output * bg ~/.config/background.jpg fill # @@ -49,10 +50,11 @@ output * bg ~/.config/background.jpg fill # You can get the names of your outputs by running: swaymsg -t get_outputs ### Idle configuration +set $lockman exec bash ~/.config/sway/lockman.sh exec swayidle -w \ - timeout 300 'swaylock -f -c 000000' \ + timeout 300 'swaylock -f' \ timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ - before-sleep 'swaylock -f -c 000000' + before-sleep 'swaylock -f' # This will lock your screen after 300 seconds of inactivity, then turn off # your displays after another 300 seconds, and turn your screens back on when @@ -61,12 +63,15 @@ exec swayidle -w \ ### Run notification daemon exec $notification -### Run status bar -exec $bar - ### Start Pipewire session exec pipewire +# Run clipboard manager +exec wl-paste -t text --watch clipman store --no-persist + +# OSD server +exec swayosd-server + ### Input configuration # # Example configuration: @@ -85,6 +90,17 @@ exec pipewire # You can also configure each device individually. # Read `man 5 sway-input` for more information about this section. + input type:touchpad { + dwt enabled + tap enabled + natural_scroll enabled + middle_emulation enabled + } + + input type:keyboard { + xkb_layout "us(intl)" + xkb_options "grp:win_space_toggle" + } ### Key bindings # # Basics: @@ -112,7 +128,11 @@ exec pipewire bindsym $mod+Shift+c reload # Exit sway (logs you out of your Wayland session) - 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' + #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' + bindsym $mod+Shift+e exec wlogout + + # Waybar toggle + bindsym $mod+o exec killall -SIGUSR1 waybar # # Moving around: @@ -166,6 +186,9 @@ exec pipewire bindsym $mod+Shift+9 move container to workspace number 9 bindsym $mod+Shift+0 move container to workspace number 10 + bindsym $mod+period workspace next + bindsym $mod+comma workspace prev + # # Layout stuff: # @@ -235,43 +258,43 @@ bindsym $mod+r mode "resize" # Utilities: # # Special keys to adjust volume via PulseAudio - bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle - bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% - bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% - bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle + # bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle + # bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% + # bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% + # bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle # Special keys to adjust brightness via brightnessctl - bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- - bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ + # bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- + # bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ + + # Client commands for SwayOSD + # For enable this service start systemd service swayosd-libinput-backend.service + + # Sink volume toggle mute + bindsym XF86AudioMute exec swayosd-client --output-volume mute-toggle + # Source volume toggle mute + bindsym XF86AudioMicMute exec swayosd-client --input-volume mute-toggle + # Volume raise with custom value + bindsym XF86AudioRaiseVolume exec swayosd-client --output-volume 5 + # Volume lower with custom value + bindsym XF86AudioLowerVolume exec swayosd-client --output-volume -5 + # Capslock (If you don't want to use the backend) + bindsym --release Caps_Lock exec swayosd-client --caps-lock + # Brightness raise with custom value('+' sign needed) + bindsym XF86MonBrightnessUp exec swayosd-client --brightness +5 + # Brightness lower with custom value('-' sign needed) + bindsym XF86MonBrightnessDown exec swayosd-client --brightness -5 # Special key to take a screenshot with grim bindsym Print exec grim + # Lock the screen + bindsym $mod+Alt+l exec $lockman # # Status Bar: # # Read `man 5 sway-bar` for more information about this section. -#bar { -# position top -# -# # When the status_command prints a new line to stdout, swaybar updates. -# # The default just shows the current date and time. -# status_command while date +'%Y-%m-%d %X'; do sleep 1; done -# -# colors { -# statusline #ffffff -# background #323232 -# inactive_workspace #32323200 #32323200 #5c5c5c -# } -#} - -### Window configurations - -gaps inner 10 -gaps outer 10 - -# No gaps when there is a single window -#smart_gaps on - -# Remove title bar -default_border pixel 2 +bar { + swaybar_command waybar +} +include $HOME/.config/sway/conf.d/*.conf include /etc/sway/config.d/* diff --git a/sway/.config/sway/lockman.sh b/sway/.config/sway/lockman.sh new file mode 100755 index 0000000..85ef098 --- /dev/null +++ b/sway/.config/sway/lockman.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Times the screen off and puts it to background +swayidle \ + timeout 10 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' & +# Locks the screen immediately +swaylock -f +# Kills last background task so idle timer doesn't keep running +kill %% diff --git a/sway/.config/swaylock/config b/sway/.config/swaylock/config new file mode 100644 index 0000000..2f465a1 --- /dev/null +++ b/sway/.config/swaylock/config @@ -0,0 +1,30 @@ +image=~/.config/swaylock/current_bg +color=1e1e2e +bs-hl-color=f5e0dc +caps-lock-bs-hl-color=f5e0dc +caps-lock-key-hl-color=a6e3a1 +inside-color=00000000 +inside-clear-color=00000000 +inside-caps-lock-color=00000000 +inside-ver-color=00000000 +inside-wrong-color=00000000 +key-hl-color=a6e3a1 +layout-bg-color=00000000 +layout-border-color=00000000 +layout-text-color=cdd6f4 +line-color=00000000 +line-clear-color=00000000 +line-caps-lock-color=00000000 +line-ver-color=00000000 +line-wrong-color=00000000 +ring-color=b4befe +ring-clear-color=f5e0dc +ring-caps-lock-color=fab387 +ring-ver-color=89b4fa +ring-wrong-color=eba0ac +separator-color=00000000 +text-color=cdd6f4 +text-clear-color=f5e0dc +text-caps-lock-color=fab387 +text-ver-color=89b4fa +text-wrong-color=eba0ac diff --git a/sway/.config/swaylock/current_bg b/sway/.config/swaylock/current_bg new file mode 100644 index 0000000..2243141 Binary files /dev/null and b/sway/.config/swaylock/current_bg differ diff --git a/sway/.config/swayosd/style.css b/sway/.config/swayosd/style.css new file mode 100644 index 0000000..5002ac5 --- /dev/null +++ b/sway/.config/swayosd/style.css @@ -0,0 +1,38 @@ +window#osd { + border-radius: 999px; + border: none; + background: #{"alpha(@theme_bg_color, 0.8)"}; + + #container { + margin: 16px; + } + + image, + label { + color: #{"@theme_fg_color"}; + } + + progressbar:disabled, + image:disabled { + opacity: 0.5; + } + + progressbar { + min-height: 6px; + border-radius: 999px; + background: transparent; + border: none; + } + trough { + min-height: inherit; + border-radius: inherit; + border: none; + background: #{"alpha(@theme_fg_color, 0.5)"}; + } + progress { + min-height: inherit; + border-radius: inherit; + border: none; + background: #{"@theme_fg_color"}; + } +} diff --git a/sway/.config/wlogout/icons/hibernate.svg b/sway/.config/wlogout/icons/hibernate.svg new file mode 100644 index 0000000..26f2364 --- /dev/null +++ b/sway/.config/wlogout/icons/hibernate.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + diff --git a/sway/.config/wlogout/icons/lock.svg b/sway/.config/wlogout/icons/lock.svg new file mode 100644 index 0000000..581af6b --- /dev/null +++ b/sway/.config/wlogout/icons/lock.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + diff --git a/sway/.config/wlogout/icons/logout.svg b/sway/.config/wlogout/icons/logout.svg new file mode 100644 index 0000000..3459f51 --- /dev/null +++ b/sway/.config/wlogout/icons/logout.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + diff --git a/sway/.config/wlogout/icons/reboot.svg b/sway/.config/wlogout/icons/reboot.svg new file mode 100644 index 0000000..f128c6b --- /dev/null +++ b/sway/.config/wlogout/icons/reboot.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + diff --git a/sway/.config/wlogout/icons/shutdown.svg b/sway/.config/wlogout/icons/shutdown.svg new file mode 100644 index 0000000..2892505 --- /dev/null +++ b/sway/.config/wlogout/icons/shutdown.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + diff --git a/sway/.config/wlogout/icons/suspend.svg b/sway/.config/wlogout/icons/suspend.svg new file mode 100644 index 0000000..a52433c --- /dev/null +++ b/sway/.config/wlogout/icons/suspend.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + diff --git a/sway/.config/wlogout/style.css b/sway/.config/wlogout/style.css new file mode 100644 index 0000000..4130c0c --- /dev/null +++ b/sway/.config/wlogout/style.css @@ -0,0 +1,51 @@ +* { + background-image: none; + box-shadow: none; +} + +window { + background-color: rgba(30, 30, 46, 0.90); +} + +button { + border-radius: 0; + border-color: #89b4fa; + text-decoration-color: #cdd6f4; + color: #cdd6f4; + background-color: #181825; + border-style: solid; + border-width: 1px; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; +} + +button:focus, button:active, button:hover { + /* 20% Overlay 2, 80% mantle */ + background-color: rgb(48, 50, 66); + outline-style: none; +} + +#lock { + background-image: url("/home/fscotto/.config/wlogout/icons/lock.svg"); +} + +#logout { + background-image: url("/home/fscotto/.config/wlogout/icons/logout.svg"); +} + +#suspend { + background-image: url("/home/fscotto/.config/wlogout/icons/suspend.svg"); +} + +#hibernate { + background-image: url("/home/fscotto/.config/wlogout/icons/hibernate.svg"); +} + +#shutdown { + background-image: url("/home/fscotto/.config/wlogout/icons/shutdown.svg"); +} + +#reboot { + background-image: url("/home/fscotto/.config/wlogout/icons/reboot.svg"); +}