From 8d296dd1ad0a124252d914d0904c04a515c3ed69 Mon Sep 17 00:00:00 2001 From: ElKowar Date: Wed, 20 Dec 2023 14:05:52 +0100 Subject: [PATCH] setup --- sway/.config/sway/config | 184 ++++++++++++---------------- sway/.config/sway/config.d/swaysome | 45 +++++++ sway/.config/sway/swaysome.conf | 45 +++++++ 3 files changed, 167 insertions(+), 107 deletions(-) create mode 100644 sway/.config/sway/config.d/swaysome create mode 100644 sway/.config/sway/swaysome.conf diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 62a58be..55e606d 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -4,9 +4,12 @@ set $down j set $up k set $right l set $term foot -set $menu dmenu_path | dmenu | xargs swaymsg exec -- +# set $menu dmenu_path | dmenu | xargs swaymsg exec -- +set $rofi_cmd rofi -terminal '$term' +set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi -output * bg /home/leon/Pictures/green_leaves.jpg fill +set $out-vert HDMI-A-1 +set $out-main DP-2 exec swayidle -w \ timeout 300 'swaylock -f -c 000000' \ @@ -24,7 +27,19 @@ exec mkfifo $WOBSOCK && tail -f $WOBSOCK | wob exec_always import-gsettings -# brightness and volume popup +output * bg /usr/share/backgrounds/default-dark.png fill + +output HDMI-A-1 { + resolution 2560x1440@99.982Hz + position 0,0 + transform 90 +} +output DP-2 { + resolution 3440x1440 + position 1440,0 +} + + bindsym XF86AudioRaiseVolume exec pamixer -ui 2 && pamixer --get-volume > $WOBSOCK bindsym XF86AudioLowerVolume exec pamixer -ud 2 && pamixer --get-volume > $WOBSOCK bindsym XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK @@ -45,11 +60,7 @@ client.unfocused "#1d2021" "#1d2021" "#ebdbb2" "#00000000" client.focused_inactive "#282828" "#282828" "#8ec07c" "#00000000" hide_edge_borders smart - - - - - +tiling_drag enable @@ -62,42 +73,21 @@ input "type:touchpad" { input "type:keyboard" { xkb_options compose:ralt + xkb_layout "us" + xkb_options "compose:ralt" + repeat_delay 250 + repeat_rate 40 } - -# -# You can get the names of your inputs by running: swaymsg -t get_inputs -# Read `man 5 sway-input` for more information about this section. - -### Key bindings -# -# Basics: -# - # Start a terminal - bindsym $mod+Return exec $term - - # Kill focused window - bindsym $mod+q kill - - # Drag floating windows by holding down $mod and left mouse button. - # Resize them with right mouse button + $mod. - # Despite the name, also works for non-floating windows. - # Change normal to inverse to use left mouse button for resizing and right - # mouse button for dragging. + bindsym $mod+t exec $term + bindsym $mod+Shift+q kill floating_modifier $mod normal - - # Reload the configuration file 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+p exec rofi -show drun -theme sidebar - #bindsym $mod+Shift+p exec ~/.config/rofi/bin/launcher_ribbon -# -# Moving around: -# + # Move your focus around bindsym $mod+$left focus left bindsym $mod+$down focus down @@ -123,27 +113,27 @@ input "type:keyboard" { # Workspaces: # # Switch to workspace - 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 - # Move focused container to workspace - 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+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 +# # Move focused container to workspace +# 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 # Note: workspaces can have any name you want, not just numbers. # We just use 1-10 as the default. # @@ -160,45 +150,19 @@ input "type:keyboard" { bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split - # Make the current focus fullscreen bindsym $mod+f fullscreen - - # Toggle the current focus between tiling and floating mode bindsym $mod+Shift+space floating toggle - - # Swap focus between the tiling area and the floating area bindsym $mod+space focus mode_toggle - - # Move focus to the parent container bindsym $mod+a focus parent +bindsym $mod+Shift+S exec flameshot gui +bindsym $mod+Shift+b exec google-chrome --enable-features=TouchpadOverscrollHistoryNavigation -#bindsym --locked XF86MonBrightnessUp exec brightnessctl -e set 50+ -#bindsym --locked XF86MonBrightnessDown exec brightnessctl -e set 50- +bindsym $mod+Shift+minus move scratchpad +bindsym $mod+minus scratchpad show -#bindsym --locked XF86AudioRaiseVolume exec pamixer -i 5 -#bindsym --locked XF86AudioLowerVolume exec pamixer -d 5 - -bindsym $mod+Shift+S exec grimshot copy area -bindsym $mod+Shift+b exec google-chrome-stable --enable-features=TouchpadOverscrollHistoryNavigation - - -# -# Scratchpad: -# - # Sway has a "scratchpad", which is a bag of holding for windows. - # You can send windows there and get them back later. - - # Move the currently focused window to the scratchpad - bindsym $mod+Shift+minus move scratchpad - - # Show the next scratchpad window or hide the focused scratchpad window. - # If there are multiple scratchpad windows, this command cycles through them. - bindsym $mod+minus scratchpad show -# -# Resizing containers: -# +bindsym $mod+r mode "resize" mode "resize" { bindsym $left resize shrink width 10px bindsym $down resize grow height 10px @@ -209,30 +173,36 @@ mode "resize" { bindsym Return mode "default" bindsym Escape mode "default" } -bindsym $mod+r mode "resize" # # Status Bar: # # Read `man 5 sway-bar` for more information about this section. -bar { - position bottom +# bar { +# position bottom +# +# # When the status_command prints a new line to stdout, swaybar updates. +# # The default just shows the current date and time. +# status_command while echo "$(/home/leon/scripts/battery_indicator.sh) // $(date +'%Y-%m-%d - %H:%M:%S %p')"; do sleep 1; done +# font "cozette 8" +# #font "Terminus (TTF)" +# height 20 +# +# +# colors { +# statusline #ebdbb2 +# background #1d202100 +# inactive_workspace #1d202100 #1d202100 #ebdbb2 +# focused_workspace #282828 #83c07c #282828 +# active_workspace #28282800 #83c07c #282828 +# } +# } - # When the status_command prints a new line to stdout, swaybar updates. - # The default just shows the current date and time. - status_command while echo "$(/home/leon/scripts/battery_indicator.sh) // $(date +'%Y-%m-%d - %H:%M:%S %p')"; do sleep 1; done - font "cozette 8" - #font "Terminus (TTF)" - height 20 +include ~/.config/sway/config.d/* +# required for flameshot +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK +exec hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK +for_window [app_id="flameshot"] border pixel 0, floating enable, fullscreen disable, move absolute position 0 0 - colors { - statusline #ebdbb2 - background #1d202100 - inactive_workspace #1d202100 #1d202100 #ebdbb2 - focused_workspace #282828 #83c07c #282828 - active_workspace #28282800 #83c07c #282828 - } -} - -include /etc/sway/config.d/* +exec eww -c ~/.config/eww-bar open bar_1 & diff --git a/sway/.config/sway/config.d/swaysome b/sway/.config/sway/config.d/swaysome new file mode 100644 index 0000000..3d8e74c --- /dev/null +++ b/sway/.config/sway/config.d/swaysome @@ -0,0 +1,45 @@ +# Change focus between workspaces +bindsym --no-warn $mod+1 exec "swaysome focus 1" +bindsym --no-warn $mod+2 exec "swaysome focus 2" +bindsym --no-warn $mod+3 exec "swaysome focus 3" +bindsym --no-warn $mod+4 exec "swaysome focus 4" +bindsym --no-warn $mod+5 exec "swaysome focus 5" +bindsym --no-warn $mod+6 exec "swaysome focus 6" +bindsym --no-warn $mod+7 exec "swaysome focus 7" +bindsym --no-warn $mod+8 exec "swaysome focus 8" +bindsym --no-warn $mod+9 exec "swaysome focus 9" +bindsym --no-warn $mod+0 exec "swaysome focus 0" + +# Move containers between workspaces +bindsym --no-warn $mod+Shift+1 exec "swaysome move 1" +bindsym --no-warn $mod+Shift+2 exec "swaysome move 2" +bindsym --no-warn $mod+Shift+3 exec "swaysome move 3" +bindsym --no-warn $mod+Shift+4 exec "swaysome move 4" +bindsym --no-warn $mod+Shift+5 exec "swaysome move 5" +bindsym --no-warn $mod+Shift+6 exec "swaysome move 6" +bindsym --no-warn $mod+Shift+7 exec "swaysome move 7" +bindsym --no-warn $mod+Shift+8 exec "swaysome move 8" +bindsym --no-warn $mod+Shift+9 exec "swaysome move 9" +bindsym --no-warn $mod+Shift+0 exec "swaysome move 0" + +# Focus workspace groups +bindsym $mod+Ctrl+l exec "swaysome focus-group 1" +bindsym $mod+Ctrl+h exec "swaysome focus-group 2" + +# Move containers to other workspace groups +bindsym $mod+Ctrl+Shift+l exec "swaysome move-to-group 1" +bindsym $mod+Ctrl+Shift+h exec "swaysome move-to-group 2" + +# Move focused container to next output +bindsym $mod+o exec "swaysome next-output" +# Move focused container to previous output +bindsym $mod+Shift+o exec "swaysome prev-output" + +# Move focused workspace group to next output +bindsym $mod+Alt+o exec "swaysome workspace-group-next-output" +# Move focused workspace group to previous output +bindsym $mod+Alt+Shift+o exec "swaysome workspace-group-prev-output" + +# Init workspaces for every screen +exec "swaysome init 1" +exec "swaysome init 2" diff --git a/sway/.config/sway/swaysome.conf b/sway/.config/sway/swaysome.conf new file mode 100644 index 0000000..42f8473 --- /dev/null +++ b/sway/.config/sway/swaysome.conf @@ -0,0 +1,45 @@ +# Change focus between workspaces +bindsym --no-warn $mod+1 exec "swaysome focus 1" +bindsym --no-warn $mod+2 exec "swaysome focus 2" +bindsym --no-warn $mod+3 exec "swaysome focus 3" +bindsym --no-warn $mod+4 exec "swaysome focus 4" +bindsym --no-warn $mod+5 exec "swaysome focus 5" +bindsym --no-warn $mod+6 exec "swaysome focus 6" +bindsym --no-warn $mod+7 exec "swaysome focus 7" +bindsym --no-warn $mod+8 exec "swaysome focus 8" +bindsym --no-warn $mod+9 exec "swaysome focus 9" +bindsym --no-warn $mod+0 exec "swaysome focus 0" + +# Move containers between workspaces +bindsym --no-warn $mod+Shift+1 exec "swaysome move 1" +bindsym --no-warn $mod+Shift+2 exec "swaysome move 2" +bindsym --no-warn $mod+Shift+3 exec "swaysome move 3" +bindsym --no-warn $mod+Shift+4 exec "swaysome move 4" +bindsym --no-warn $mod+Shift+5 exec "swaysome move 5" +bindsym --no-warn $mod+Shift+6 exec "swaysome move 6" +bindsym --no-warn $mod+Shift+7 exec "swaysome move 7" +bindsym --no-warn $mod+Shift+8 exec "swaysome move 8" +bindsym --no-warn $mod+Shift+9 exec "swaysome move 9" +bindsym --no-warn $mod+Shift+0 exec "swaysome move 0" + +# Focus workspace groups +bindsym $mod+Alt+1 exec "swaysome focus-group 1" +bindsym $mod+Alt+2 exec "swaysome focus-group 2" + +# Move containers to other workspace groups +bindsym $mod+Alt+Shift+1 exec "swaysome move-to-group 1" +bindsym $mod+Alt+Shift+2 exec "swaysome move-to-group 2" + +# Move focused container to next output +bindsym $mod+o exec "swaysome next-output" +# Move focused container to previous output +bindsym $mod+Shift+o exec "swaysome prev-output" + +# Move focused workspace group to next output +bindsym $mod+Alt+o exec "swaysome workspace-group-next-output" +# Move focused workspace group to previous output +bindsym $mod+Alt+Shift+o exec "swaysome workspace-group-prev-output" + +# Init workspaces for every screen +exec "swaysome init 1" +exec "swaysome init 2"