Compare commits

..

2 commits

Author SHA1 Message Date
Tobias Reisinger 2fbed7c001
Improve configs 2024-08-24 13:39:59 +02:00
Tobias Reisinger cb3ea5254e
Add sway config 2024-08-21 16:34:57 +02:00
25 changed files with 353 additions and 6 deletions

View file

@ -25,6 +25,8 @@ declare -A mapper=(
["rclone"]="$HOME/.config/rclone/rclone.conf"
["ssh"]="$HOME/.ssh/config"
["starship"]="$HOME/.config/starship.toml"
["sway"]="$HOME/.config/sway/config"
["sway.d"]="$HOME/.config/sway/config.d"
["sxhkd"]="$HOME/.config/sxhkd/sxhkdrc"
["vim"]="$HOME/.config/vim/vimrc"
["wakatime"]="$HOME/.config/wakatime/.wakatime.cfg##template"
@ -51,6 +53,8 @@ declare -A directory=(
declare -A hooks=(
["qutebrowser"]="qutebrowser :config-source"
["qutebrowser-kiosk"]="qutebrowser-kiosk :config-source" # broken due to qutebrowser-kiosk being an alias
["sway"]="sway reload"
["sway.d"]="sway reload"
["waybar"]="killall -SIGUSR2 waybar"
["yadm"]="yadm alt"
)

View file

@ -12,6 +12,8 @@ portalo_mode_monitor () {
if [ -n "$1" ]; then
yadm config --add local.class "$1"
fi
swaymsg reload
}
portalo_mode_zellij () {

View file

@ -1,5 +1,10 @@
[hosts.portalo]
groups = ['common', 'wayland', 'chat', 'messenger']
groups = ['common', 'wayland', 'chat', 'messenger', 'hyprland']
[apps.autotiling]
command = 'autotiling'
hosts = []
group = 'sway'
[apps.ckb-next]
command = 'ckb-next --background'
@ -127,4 +132,4 @@ group = 'x11'
[apps.waybar]
command = 'waybar'
hosts = []
group = 'wayland'
group = 'hyprland'

View file

@ -54,6 +54,7 @@ export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npmrc"
export QT_QPA_PLATFORMTHEME="qt5ct"
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
export PSQL_HISTORY="$XDG_STATE_HOME/psql_history"
export PYTHON_HISTORY="$XDG_STATE_HOME/python_history"

View file

@ -52,7 +52,7 @@ decoration {
}
animations {
enabled = true
enabled = false
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

View file

@ -30,6 +30,7 @@ def init(c):
'ddg': 'https://duckduckgo.com/?q={}',
'kagi': 'https://kagi.com/search?q={}',
'lh': 'http://localhost:{}/',
'12ft': 'http://12ft.io/proxy?q={}/',
}
c.url.start_pages = [
'https://rss.serguzim.me/',

View file

@ -1,7 +1,8 @@
[global]
# Your Spotify account name.
username = "serguzim"
password_cmd = "pass spotifyd"
username_cmd = "jq -r .username $HOME/.cache/spotfyd/credentials.json"
password_cmd = "jq -r .auth_data $HOME/.cache/spotfyd/credentials.json"
cache_path = "/home/serguzim/.cache/spotfyd"
use_mpris = true

5
.config/sway/config Normal file
View file

@ -0,0 +1,5 @@
include ~/.config/sway/config.d/*.conf
bar swaybar_command waybar
exec_always autostart-manage run-wayland

1
.config/sway/config.d/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
10-host.conf

View file

@ -0,0 +1,17 @@
set $ws_01 01
set $ws_02 02
set $ws_03 03
set $ws_04 04
set $ws_05 05
set $ws_06 06
set $ws_07 07
set $ws_08 08
set $ws_09 09
set $ws_10 10
set $ws_web $ws_01
set $ws_terminal $ws_02
set $ws_focus $ws_07
set $ws_media $ws_08
set $ws_chat $ws_09
set $ws_messenger $ws_10

View file

@ -0,0 +1 @@
exec "systemctl --user import-environment {,WAYLAND_}DISPLAY SWAYSOCK; systemctl --user start sway-session.target"

View file

@ -0,0 +1,12 @@
# monitors
set $monitor_primary DP-1
set $monitor_secondary HDMI-A-1
set $monitor $monitor_primary
output $monitor_primary enable
output $monitor_secondary disable
#output $monitor_primary pos 1920 0 res 2560x1440@144Hz
output $monitor_primary pos 1920 0 res 1920x1080@60Hz
include ~/.config/sway/lib/layout-10.conf

View file

@ -0,0 +1,11 @@
# monitors
set $monitor_primary DP-1
set $monitor_secondary HDMI-A-1
set $monitor $monitor_secondary
output $monitor_primary disable
output $monitor_secondary enable
output $monitor_secondary pos 0 0 res 1920x1080
include ~/.config/sway/lib/layout-10.conf

View file

@ -0,0 +1,12 @@
# monitors
set $monitor_primary DP-1
set $monitor_secondary HDMI-A-1
output $monitor_primary enable
output $monitor_secondary enable
#output $monitor_primary pos 1920 0 res 2560x1440@144Hz
output $monitor_primary pos 1920 0 res 1920x1080@60Hz
output $monitor_secondary pos 0 0 res 1920x1080
include ~/.config/sway/lib/layout-7-3.conf

View file

@ -0,0 +1,40 @@
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu j4-dmenu-desktop --dmenu="$DMENU" | xargs swaymsg exec --
output * bg #1E1F29 solid_color
### Idle configuration
exec swayidle -w \
timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
timeout 600 'swaylock -f -c 000000' \
before-sleep 'swaylock -f -c 000000'
### Input configuration
# 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.
input * {
xkb_layout "de"
xkb_numlock enable
xkb_options "caps:none"
accel_profile flat
}
mouse_warping none
focus_follows_mouse always
default_border pixel 1
default_floating_border pixel 1
smart_borders on
smart_gaps on
gaps inner 10

View file

@ -0,0 +1,145 @@
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $TERMINAL
bindsym $mod+Shift+Return exec $TERMINAL --class term-floating
# Close focused window
bindsym $mod+q kill
# Kill focused window
bindsym $mod+Shift+q exec swaymsg -t get_tree | \
jq 'recurse(.nodes[], .floating_nodes[]) | select(.focused).pid' | \
xargs -L 1 kill -9
# Start your launcher
bindsym $mod+d exec $menu
# 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.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+r reload
bindsym $mod+Pause exec menu-shutdown
bindsym $mod+Print exec screenshot
bindsym $mod+Ctrl+Print exec screenshot no_upload
bindsym $mod+t exec ts-control
bindsym $mod+m exec host-mode
bindsym $mod+c exec $TERMINAL --class term-floating -e python
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace $ws_01
bindsym $mod+2 workspace $ws_02
bindsym $mod+3 workspace $ws_03
bindsym $mod+4 workspace $ws_04
bindsym $mod+5 workspace $ws_05
bindsym $mod+6 workspace $ws_06
bindsym $mod+7 workspace $ws_07
bindsym $mod+8 workspace $ws_08
bindsym $mod+9 workspace $ws_09
bindsym $mod+0 workspace $ws_10
## Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws_01
bindsym $mod+Shift+2 move container to workspace $ws_02
bindsym $mod+Shift+3 move container to workspace $ws_03
bindsym $mod+Shift+4 move container to workspace $ws_04
bindsym $mod+Shift+5 move container to workspace $ws_05
bindsym $mod+Shift+6 move container to workspace $ws_06
bindsym $mod+Shift+7 move container to workspace $ws_07
bindsym $mod+Shift+8 move container to workspace $ws_08
bindsym $mod+Shift+9 move container to workspace $ws_09
bindsym $mod+Shift+0 move container to workspace $ws_10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
bindsym $mod+dead_circumflex workspace $ws_focus
bindsym $mod+Shift+dead_circumflex move container to workspace $ws_focus
#
# 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
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+s floating toggle
#
# 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 $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 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"

View file

@ -0,0 +1,44 @@
for_window [app_id="term-floating"] floating enable
assign [app_id="org.qutebrowser.qutebrowser"] $ws_web
assign [class="firefox"] $ws_web
for_window [class="jetbrains-*"] {
move container to workspace $ws_focus
focus
}
for_window [class="jetbrains-*" title="win0"] floating enable
for_window [app_id="(mpv|vlc|org.qutebrowser.qutebrowser-kiosk)"] {
move container to workspace $ws_media
fullscreen enable
focus
}
for_window [class="(FreeTube|[Cc]hromium|Brave-browser)"] {
move container to workspace $ws_media
focus
}
assign [class="TeamSpeak 3"] $ws_chat
assign [class="discord"] $ws_chat
assign [class="Element"] $ws_chat
assign [class="(Signal)"] $ws_messenger
assign [app_id="([Tt]hunderbird)"] $ws_messenger
for_window [class="(xdg-desktop-portal-gtk|Pinentry-gtk*)"] {
floating enable
}
for_window [class="steam" title="Friends List"] {
move container to workspace $ws_chat
}
for_window [class="zenity" title="Progress"] {
floating enable
}
for_window [class="(steam_app_*|^cs2$)"] {
move container to workspace $ws_focus
fullscreen enable
}

View file

@ -0,0 +1,8 @@
# class border bground text indicator child_border
client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36
client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
client.background #F8F8F2

View file

@ -0,0 +1,10 @@
workspace $ws_01 output $monitor
workspace $ws_02 output $monitor
workspace $ws_03 output $monitor
workspace $ws_04 output $monitor
workspace $ws_05 output $monitor
workspace $ws_06 output $monitor
workspace $ws_07 output $monitor
workspace $ws_08 output $monitor
workspace $ws_09 output $monitor
workspace $ws_10 output $monitor

View file

@ -0,0 +1,11 @@
workspace $ws_01 output $monitor_primary
workspace $ws_02 output $monitor_primary
workspace $ws_03 output $monitor_primary
workspace $ws_04 output $monitor_primary
workspace $ws_05 output $monitor_primary
workspace $ws_06 output $monitor_primary
workspace $ws_07 output $monitor_primary
workspace $ws_08 output $monitor_secondary
workspace $ws_09 output $monitor_secondary
workspace $ws_10 output $monitor_secondary

View file

@ -0,0 +1,6 @@
[Unit]
Description=sway compositor session
Documentation=man:systemd.special(7)
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target

View file

@ -4,7 +4,8 @@
"height": 28,
"spacing": 6,
"modules-left": [
"hyprland/workspaces"
"hyprland/workspaces",
"sway/workspaces"
],
"modules-center": [
"mpris"

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
ts-control "status-icon"

View file

@ -7,6 +7,11 @@
"hyprland/window": {
"max-length": 128
},
"sway/workspaces": {
"on-click": "activate",
"all-outputs": true,
"disable-scroll": true
},
"clock": {
"interval": 1,
"format": " {:%Y-%m-%d %H:%M:%S}",

View file

@ -40,6 +40,7 @@ window#waybar {
}
#workspaces button {
padding: 0 10px;
background: none;
border-bottom: solid 2px @background;
}