diff --git a/config b/config new file mode 100644 index 0000000..7e9905d --- /dev/null +++ b/config @@ -0,0 +1,248 @@ +# Input +input * xkb_options compose:ralt +input "1452:656:Apple_Inc._Apple_Internal_Keyboard_/_Trackpad" { + click_method button_areas + xkb_layout us +} + +# Autostarts + exec thunderbird + exec firefox + exec swaybg -i /coffin/kasiandra/Pictures/wallpaper.png + exec waybar -c ~/.config/waybar/config-default.conf -s ~/.config/waybar/style-default.css + exec /usr/bin/waybar --config ~/.config/waybar/config.jsonc --style ~/.config/waybar/style.css + exec env RUST_BACKTRACE=1 RUST_LOG=swayr=debug swayrd > /tmp/swayrd.log 2>&1 + exec swayidle -w \ + timeout 300 'swaylock -f -c 000000' \ + timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ + before-sleep 'swaylock -f -c 000000' + +############################################################################################ +# Needed Enviroments And Starts +## Start swayr daemon for alt+tab service +## Start Idle Service to autolock Screen +## Set Theme + exec_always { + /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + gsettings set $gnome-schema gtk-theme 'Kascha-Dracula' + gsettings set $gnome-schema icon-theme 'Dracula-icons' + gsettings set $gnome-schema font-name 'Input Nerd Font' + set $my_cursor 'Xcursor-breeze' + set $my_cursor_size 24 + set $gnome-schema org.gnome.desktop.interface + set $kvantum-theme 'Kascha-Dracula' + } +## Set Trackpoint Speed + input 2:10:TPPS/2_IBM_TrackPoint { + pointer_accel 0.6 + } + +## Set Wallpaper path + output * bg /coffin/kasiandra/Pictures/wallpaper.jpeg fill +## Set Display Positions + # output HDMI-A-1 pos 0 0 + # output LVDS-1 pos 1920 0 +# output LVDS-1 pos 0 0 res 800x600 +default_orientation auto +workspace_layout default + +############################################################################################ +# Sway Window seetings +## Start all windows in floating mode and default apps in maximize size + for_window [title=".*"] focus_follows_mouse always + for_window [title="Thunderbird"] resize set 1366 748 px +# for_window [title="Firefox*"] move container to workspace 2 resize set 1366 748 px normal + for_window [title="mpv"] focus floating, inhibit_idle open +## Set default start Virtual Desktops + assign '[title="^Tor Browser$"]' 4 + assign '[title="^Chromium*"]' 4 + for_window [title="Chromium*"] workspace 4 + assign '[title="^Thunderbird$"]' 1 +############################################################################################ +# Set variables +## Logo key. Use Mod1 for Alt. + set $mod Mod4 +## Set Terminal Emulator + set $term alacritty +############################################################################################# +# Key bindings +## Starter + bindsym $mod+t exec $term + bindsym $mod+f exec firefox-nightly + bindsym $mod+m exec thunderbird + bindsym $mod+n exec nautilus + bindsym $mod+l exec swaylock -c 000000 --indicator-thickness 25 --ring-color f8f8f250 -s fill --indicator-radius 20 --line-color f8f8f2 --font-size 10 --ring-ver-color E3C3FA --key-hl-color E3C3FA --indicator-x-position 681 --inside-color f8f8f2 --separator-color f8f8f2 --ring-wrong-color ED6B32 +# Container +## Window control +focus_wrapping workspace + bindsym alt+tab focus next + bindsym alt+shift+tab focus prev +# bindsym Mod1+Shift+tab exec swayr prev-window current-workspace +# bindsym $mod+tab exec swayr switch-window + bindsym Mod1+grave exec swaymsg [con_id=$(/home/elektroll/bin/sway_altgrave.sh)] focus + bindsym Mod1+Shift+grave exec swaymsg [con_id=396] focus next +## Multimedia + bindsym XF86AudioPlay exec /bin/bash /home/elektroll/bin/snapclient.sh + bindsym XF86AudioNext exec mpc -h cloud.eta next + bindsym XF86AudioPrev exec mpc -h cloud.eta prev + bindsym $mod+Delete exec mpc -h cloud.eta del 0 + bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- + bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ + bindsym XF86AudioMicMute exec amixer set Capture toggle +## Record and Screenshots + bindsym $mod+Shift+r exec /bin/bash $HOME/bin/desktop-arearecorder.sh + bindsym $mod+r exec /bin/bash $HOME/bin/desktop-recorder.sh + bindsym Print exec grim $(xdg-user-dir PICTURES)/$(date +'screenshot_%Y-%m-%d-%H%M%S.png') + bindsym Shift+Print exec "slurp | grim -g - $(xdg-user-dir PICTURES)/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')" +## Kill focus + bindsym Alt+f4 kill +## Launcher + bindsym Mod1+f2 exec wofi -s ~/.config/hikari/wofi.css -H 200 -W 500 --exec-search --show drun --hide-scroll --normal-window --allow-images +## Reload the configuration file + bindsym $mod+Ctrl+Mod1+R reload +## Window Control +### Drag floating windows by holding down $mod and left mouse button. + floating_modifier $mod normal +### focus mouse on focus + focus_follows_mouse always + mouse_warping container +### Maximize Window + bindsym $mod+f11 resize set 1366 748 px, move position 0 0 +### Minimize Window + bindsym $mod+f12 resize set 700 400 px, move position center +### Snap Left + bindsym $mod+Shift+Left exec /bin/bash /home/elektroll/.config/sway/wm_snap_window left +### Snap Right + bindsym $mod+Shift+Right exec /bin/bash /home/elektroll/.config/sway/wm_snap_window right +### Snap Up + bindsym $mod+Shift+Up exec /bin/bash /home/elektroll/.config/sway/wm_snap_window up +### Snap Down + bindsym $mod+Shift+Down exec /bin/bash /home/elektroll/.config/sway/wm_snap_window down +### toggle sticky mpv +# bindsym $mod+f1 focus [app_id="mpv"] +# Exit Sway + bindsym CTRL+Mod1+Backspace 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' +# +# Moving around: +# + bindsym $mod+Left move left + bindsym $mod+Down move down + bindsym $mod+Up move up + bindsym $mod+Right move right +# +# 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 + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. +# +# Layout stuff: +# + # You can "split" the current object of your focus with + # $mod+b or $mod+v, for horizontal and vertical splits + # respectively. +# bindsym $mod+b splith +# bindsym $mod+v splitv + + # Switch the current container between different layout styles + bindsym $mod+s layout stacking + bindsym $mod+w layout tabbed + bindsym $mod+e layout toggle split + + # Make the current focus fullscreen + bindsym $mod+shift+f11 fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym $mod+v 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 +# +# 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: +# +#mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym $mod+Mod1+Left resize shrink width 10px + bindsym $mod+Mod1+Right resize grow width 10px + bindsym $mod+Mod1+Up resize grow height 10px + bindsym $mod+Mod1+Down resize shrink height 10px + + # Ditto, with arrow keys +# bindsym Left resize shrink width 10px +# bindsym Down resize grow height 10px +# bindsym Up resize shrink height 10px +# bindsym Right resize grow width 10px + + # Return to default mode +# 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 top +# height 20 +# status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done +# status_command while ~/.config/sway/status.sh; do sleep 1; done +# +# colors { +# statusline #f8f8f2 +# background #15161c +# focused_workspace #282a36 #bd93f9 #282a36 +# inactive_workspace #15161c #44475a #15161c +# } +#} + +client.focused #282a36 #282a36 #f8f8f2 #bd93f9 #bd93f9 +client.unfocused #282a36 #50fa7b #000000 #50fa7b #44475a +font Input Nerd Font 14px +gaps inner 2 + +default_border pixel 1 + +include /etc/sway/config.d/* +