From 0ea7c9210869e3cbfcd3ac2aca8cbb4e18a8f832 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Wed, 11 Feb 2026 05:44:52 +0300 Subject: add wm --- dot_config/mako/config | 14 +++ dot_config/sway/config | 183 ++++++++++++++++++++++++++++++++++++++ dot_config/swayidle/config | 5 ++ dot_config/swaylock/config | 5 ++ dot_config/waybar/config | 210 ++++++++++++++++++++++++++++++++++++++++++++ dot_config/waybar/style.css | 140 +++++++++++++++++++++++++++++ 6 files changed, 557 insertions(+) create mode 100644 dot_config/mako/config create mode 100644 dot_config/sway/config create mode 100644 dot_config/swayidle/config create mode 100644 dot_config/swaylock/config create mode 100644 dot_config/waybar/config create mode 100644 dot_config/waybar/style.css (limited to 'dot_config') diff --git a/dot_config/mako/config b/dot_config/mako/config new file mode 100644 index 0000000..3fe814d --- /dev/null +++ b/dot_config/mako/config @@ -0,0 +1,14 @@ +border-color=#AAAAAA + +[urgency=low] +background-color=#222222 +text-color=#888888 + +[urgency=normal] +background-color=#285577 +text-color=#FFFFFF + +[urgency=high] +background-color=#900000 +text-color=#FFFFFF +border-color=#FF0000 diff --git a/dot_config/sway/config b/dot_config/sway/config new file mode 100644 index 0000000..bdb65bd --- /dev/null +++ b/dot_config/sway/config @@ -0,0 +1,183 @@ +xwayland enable + + +# Layout configuration +input * { + xkb_layout us,ru + xkb_variant altgr-intl, + xkb_options grp:shifts_toggle,ctrl:nocaps +} + + +# General settings: +set $mod Mod4 +floating_modifier $mod normal +bindsym --to-code $mod+Shift+r reload + + +# Launching external applications: +set $pass passmenu +bindsym --to-code $mod+p exec $pass -ip "Copy pass: " -l 10 +bindsym --to-code $mod+Shift+p exec $pass --name -ip "Copy name: " -l 10 +bindsym --to-code $mod+Alt+p exec $pass --type -ip "Type pass: " -l 10 +bindsym --to-code $mod+Alt+Shift+p exec $pass --type --name -ip "Type name: " -l 10 + +set $power-menu powermenu -ip "Power: " +bindsym --to-code $mod+Shift+q exec $power-menu +bindsym --to-code $mod+Control+q exec $power-menu + +set $term emacsclient --create-frame --quiet +set $emacs emacs --background black +set $backup-term foot +bindsym $mod+Return exec $term +bindsym $mod+Shift+Return exec $emacs +bindsym $mod+Control+Shift+Return exec $backup-term + +set $menu menu-drun -ip "Run: " +set $lock lock +bindsym --to-code $mod+Shift+d exec $menu +bindsym --to-code $mod+Shift+l exec $lock +bindsym --to-code $mod+Control+d exec $menu +bindsym --to-code $mod+Control+l exec $lock + +bindsym --to-code $mod+Control+n exec menu-network + + +# Manipulating windows: +bindsym --to-code $mod+Shift+c kill +bindsym --to-code $mod+Shift+f fullscreen +bindsym --to-code $mod+Control+c kill + +bindsym $mod+Shift+space floating toggle +bindsym $mod+Ctrl+space focus mode_toggle + +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+Control+b focus left +bindsym $mod+Control+n focus down +bindsym $mod+Control+p focus up +bindsym $mod+Control+f focus right + +bindsym $mod+Control+Shift+b move left +bindsym $mod+Control+Shift+n move down +bindsym $mod+Control+Shift+p move up +bindsym $mod+Control+Shift+f move right + + +# Moving around workspaces: + +bindsym $mod+tab workspace back_and_forth +bindsym $mod+Control+i workspace back_and_forth + +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 + +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 + + +# Scratchpad settings: +bindsym --to-code $mod+Shift+minus move scratchpad +bindsym --to-code $mod+minus scratchpad show + + +# Other: + +bindsym $mod+Control+t exec emacsclient -e "(modus-themes-toggle)" + +default_border pixel +default_floating_border pixel +gaps inner 4 +exec gpg-connect-agent updatestartuptty /bye >/dev/null +# exec pipewire +exec --no-startup-id udiskie -s +exec --no-startup-id $emacs +exec --no-startup-id swayidle -w +exec_always --no-startup-id mako + +# toggle waybar +# bindsym $mod+o exec killall -SIGUSR1 waybar + +bindsym --locked XF86AudioRaiseVolume \ + exec pactl set-sink-mute @DEFAULT_SINK@ false; \ + exec pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym --locked XF86AudioLowerVolume \ + exec pactl set-sink-mute @DEFAULT_SINK@ false; \ + exec pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym --locked XF86AudioMicMute \ + exec pactl set-source-mute @DEFAULT_SOURCE@ toggle +bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ +bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- + +output LVDS-1 pos 0 0 res 1366x768 +output VGA-1 pos 1366 0 res 1024x768 +# output * adaptive_sync on # this may be good, test it +bindswitch --reload --locked lid:on exec swaylock +bindsym $mod+Shift+o [floating] kill +input 6700:66:SEMICCHIP_Usb_Mouse { + pointer_accel 0.0 + accel_profile flat +} +input 6127:24647:Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint { + pointer_accel -0.6 + repeat_delay 150 + repeat_rate 60 +} +input type:keyboard { + repeat_delay 150 + repeat_rate 60 +} +input type:touchpad { + natural_scroll enabled + tap enabled +} + +bindsym $mod+Alt+s exec sway-swappy-clipboard +bindsym $mod+Shift+s exec sway-shot-window-or-selection + +bindsym $mod+Print exec sway-shot-output +bindsym $mod+Alt+Print exec sway-swappy-clipboard +bindsym XF86SelectiveScreenshot exec sway-shot-window-or-selection +bindsym $mod+Shift+Print exec sway-shot-window-or-selection +bindsym $mod+Control+Print exec toggle-screen-capture output +bindsym $mod+Shift+Control+Print exec toggle-screen-capture window + +bindsym $mod+Control+s exec spotlight + +# bindsym --to-code XF86NotificationCenter exec toggle dunst + +bar swaybar_command waybar + +for_window [title=".* - Emacs Client"] floating enable +for_window [title="cmatrix"] floating enable +for_window [app_id="wdisplays"] floating enable +for_window [app_id="iwgtk"] floating enable +for_window [app_id="mpv"] floating enable + +smart_borders on +smart_gaps on diff --git a/dot_config/swayidle/config b/dot_config/swayidle/config new file mode 100644 index 0000000..729fd60 --- /dev/null +++ b/dot_config/swayidle/config @@ -0,0 +1,5 @@ +lock 'swaylock' +before-sleep 'swaylock' +timeout 240 'swaylock' +timeout 270 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' +timeout 600 'sudo zzz' diff --git a/dot_config/swaylock/config b/dot_config/swaylock/config new file mode 100644 index 0000000..31956f0 --- /dev/null +++ b/dot_config/swaylock/config @@ -0,0 +1,5 @@ +show-failed-attempts +daemonize +show-keyboard-layout +color=0x000000 +indicator-caps-lock diff --git a/dot_config/waybar/config b/dot_config/waybar/config new file mode 100644 index 0000000..a1c11d5 --- /dev/null +++ b/dot_config/waybar/config @@ -0,0 +1,210 @@ +[ + { + "position": "top", + "name": "main", + "layer": "top", + + "modules-left": [ + "temperature", + "cpu", + "memory", + "disk#root", + "battery", + "sway/workspaces" + ], + "modules-center": [ + "sway/window" + ], + "modules-right": [ + "tray", + "custom/recorder", + "custom/inbox", + "custom/sunset", + "custom/vpn", + // "custom/notification", + "idle_inhibitor", + "pulseaudio#source", + "pulseaudio#sink", + "sway/language", + "network", + "clock" + ], + + "temperature": { + "format": "🌡{temperatureC}°C" + }, + + "cpu": { + "interval": 2, + "format": "\uf2db {usage:2}%" + }, + + "memory": { + "interval": 30, + "format": "\uf1c0 {percentage:2}%" + }, + + "disk#root": { + "interval": 30, + "format": "\uf0c7 {percentage_used:2}%", + "path": "/" + }, + + "network": { + "format-ethernet": "🔌", + "format-wifi": "📡", + "format-disconnected": "🚫", + "format-disabled": "⚠", + "on-click": "iwgtk" + }, + + "sway/workspaces": { + "disable-scroll": true, + "format": "{icon}", + "format-icons": { + "default": "", + "focused": "", + "urgent": "" + } + }, + + "sway/window": {}, + + "tray": {}, + + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "\uf06e", + "deactivated": "\uf070" + }, + "tooltip-format-activated": "Idle inhibitor {status}. It prevents automatic screen locking and hibernation.", + "tooltip-format-deactivated": "Idle inhibitor {status}." + }, + + "sway/language": { + "format": "{flag}" + }, + + "pulseaudio#source": { + "format": "{format_source}", + "format-source": "\uf130", + "format-source-muted": "\uf131", + "tooltip-format": "{source_desc} is on {source_volume}%", + "on-click": "pavucontrol --tab=4", + "on-click-middle": "pactl set-source-mute @DEFAULT_SOURCE@ toggle", + "scroll-step": 0 + }, + + "pulseaudio#sink": { + "format": "{icon}", + "format-muted": "🔇", + "format-bluetooth": "{icon} \uf294", + "tooltip-format": "{desc} is on {volume}%", + "format-icons": { + "default": [ + "🔈", + "🔉", + "🔊", + "📢" + ] + }, + "on-click": "pavucontrol --tab=3", + "on-click-middle": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "scroll-step": 5 + }, + + "battery": { + "format": "{icon} {capacity}%", + "format-charging": "{icon} {capacity}⚡", + "tooltip-format": "Current capacity: {capacity}%\n\n{timeTo}", + "states": { + "empty": 10, + "low": 20, + "half-low": 40, + "half": 60, + "high": 90, + "full": 100 + }, + "format-icons": { + "empty": "\uf244", + "low": "\uf243", + "half-low": "\uf243", + "half": "\uf242", + "high": "\uf241", + "full": "\uf240" + } + }, + + "clock": { + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": "{:%Y-%m-%d %H:%M}", + "on-click": "emacsclient --eval \"(world-clock)\"", + "on-click-right": "emacsclient --eval \"(calendar)\"", + "interval": 60 + }, + + "custom/recorder": { + "format": "{}", + "return-type": "json", + "exec-on-event": true, + "interval": "once", + "signal": 8, + "exec": "waybar-screen-recorder", + "on-click": "toggle-screen-capture" + }, + + "custom/inbox": { + "format": "{} 📥", + "interval": 60, + "exec": "notmuch count tag:inbox", + "on-click": "sync-mail" + }, + + "custom/sunset": { + "format": "{icon}", + "format-icons": { + "off": "🌞", + "on": "🌛" + }, + "return-type": "json", + "interval": "once", + "signal": 10, + "exec": "waybar-sunset", + "on-click": "waybar-sunset toggle", + "on-click-right": "waybar-sunset rotate", + "exec-if": "waybar-sunset check" + }, + + "custom/vpn": { + "format": "{}", + "return-type": "json", + "exec-on-event": true, + "interval": "once", + "signal": 9, + "exec": "waybar-vpn", + "on-click": "toggle-vpn" + }, + + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "none": "🔔", + "notification": "🔔", + "inhibited-none": "🔔", + "inhibited-notification": "🔔", + "dnd-none": "🔕", + "dnd-notification": "🔕", + "dnd-inhibited-none": "🔕", + "dnd-inhibited-notification": "🔕" + }, + "return-type": "json", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "on-click-middle": "swaync-client -C -sw", + "escape": true + } + } +] diff --git a/dot_config/waybar/style.css b/dot_config/waybar/style.css new file mode 100644 index 0000000..fc35942 --- /dev/null +++ b/dot_config/waybar/style.css @@ -0,0 +1,140 @@ +@define-color base00 #181818; +@define-color base01 #282828; +@define-color base02 #383838; +@define-color base03 #585858; +@define-color base04 #b8b8b8; +@define-color base05 #d8d8d8; +@define-color base06 #e8e8e8; +@define-color base07 #f8f8f8; +@define-color base08 #ab4642; +@define-color base09 #dc9656; +@define-color base0A #f7ca88; +@define-color base0B #a1b56c; +@define-color base0C #86c1b9; +@define-color base0D #7cafc2; +@define-color base0E #ba8baf; +@define-color base0F #a16946; + +* { + font-family: Aporetic Serif Mono, Noto Emoji, Symbols Nerd Font Mono; + transition: none; + box-shadow: none; + text-shadow: none; + min-height: 0; +} + +tooltip { + border: solid @base02; + background: @base01; + opacity: 0.9; +} + +tooltip label { + color: @base05; + padding: 0; +} + +#waybar { + color: @base04; + background: @base01; +} + +.modules-right label, +.modules-right image { + margin: 0.4em 0.2em; + padding: 0 0.4em; + background: @base02; + border-radius: 0.2em; +} + +.modules-left { + margin-left: 0.2em; +} + +.modules-right { + margin-right: 0.2em; +} + +#custom-recorder { + color: @base08; +} + +#custom-notification.notification, +#custom-notification.dnd-notification, +#custom-notification.dnd-inhibited-notification { + color: @base07; + background: @base02; +} + +#temperature, +#cpu, +#memory, +#disk, +#battery { + margin: 0.4em 0.2em; + padding: 0 0.4em; + background: @base02; + border-radius: 0.2em; +} + +#workspaces button { + background: none; + border-radius: 0.2em; + margin: 0.4em 0.2em; + padding: 0.2em 0.2em; + color: @base05; +} + +#workspaces button:hover { + background: none; + border-color: @base07; +} + +#workspaces button.focused { + background: none; + color: @base07; +} + +#workspaces button.urgent { + color: @base08; +} + +#window { + margin-left: 1em; + margin-right: 1em; +} + +#tray menu { + color: @base05; + background: @base01; + border: solid 1px; + border-color: @base02; +} + +#tray menu menuitem { + padding-top: 0px; + padding-bottom: 0px; + margin-top: 0.1em; + margin-bottom: 0em; +} + +#tray menu menuitem:hover { + background: none; +} + +#tray menu separator { + background: @base03; + padding-top: 1px; + margin-top: 0.2em; + margin-bottom: 0.2em; +} + +#battery.discharging.empty { + color: @base02; + background: @base08; +} + +#battery.discharging.low { + color: @base02; + background: @base09; +} -- cgit v1.3