From 73af89d935df5a8166114c9257f9f247f29850bf Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Fri, 26 Apr 2024 18:21:56 +0200 Subject: Migrate from stumpwm to sway and from manifests to home-services. --- .config/guix/manifests/desktop.scm | 73 ------------- .config/guix/manifests/emacs.scm | 126 ----------------------- .config/sway/config | 193 ++++++++++++++++++++++++++++++++++ .config/waybar/config | 159 ++++++++++++++++++++++++++++ .config/waybar/style.css | 205 +++++++++++++++++++++++++++++++++++++ 5 files changed, 557 insertions(+), 199 deletions(-) delete mode 100644 .config/guix/manifests/desktop.scm delete mode 100644 .config/guix/manifests/emacs.scm create mode 100644 .config/sway/config create mode 100644 .config/waybar/config create mode 100644 .config/waybar/style.css (limited to '.config') diff --git a/.config/guix/manifests/desktop.scm b/.config/guix/manifests/desktop.scm deleted file mode 100644 index f238951..0000000 --- a/.config/guix/manifests/desktop.scm +++ /dev/null @@ -1,73 +0,0 @@ -(specifications->manifest - '("qutebrowser" - "ungoogled-chromium" - "firefox" - "tor-client" - - "pulsemixer" - "pavucontrol" - "alsa-utils" - - "virt-manager" - - "flatpak" - "redshift" - "fontmanager" - - "polybar" - - "blueman" - - "xdg-utils" - "xdg-dbus-proxy" - "xdg-desktop-portal-gtk" - "glib:bin" - "gtk+:bin" - "gnome-keyring" - "shared-mime-info" - "libnotify" - "dconf" - "hicolor-icon-theme" - - "dunst" - - "gimp" - "inkscape" - - "mpv" - "youtube-dl" - - "pamixer" - "playerctl" - "scrot" - "brightnessctl" - "upower" - "tlp" - "feh" - "alacritty" - - "curl" - "wget" - "zip" - "unzip" - "qrencode" - "trash-cli" - "pandoc" - "password-store" - "pinentry" - - "syncthing" - "syncthing-gtk" - - "xmodmap" - "xrandr" - "arandr" - "xss-lock" - "libinput" - "xinput" - "xprop" - "rlwrap" - - "nheko" - "quassel" - )) diff --git a/.config/guix/manifests/emacs.scm b/.config/guix/manifests/emacs.scm deleted file mode 100644 index db809eb..0000000 --- a/.config/guix/manifests/emacs.scm +++ /dev/null @@ -1,126 +0,0 @@ -;; This file is auto-generated by Emacs function: jd/manifest-generate-to-file -(use-modules (gnu packages emacs-xyz) - (gnu packages) - (guix packages) - (guix git-download) - (guix build-system emacs) - ((guix licenses) #:prefix license:)) - - -(define-public emacs-org-roam-ui - (let ((commit "9474a254390b1e42488a1801fed5826b32a8030b") - (revision "0")) - (package - (name "emacs-org-roam-ui") - (version (git-version "0" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/org-roam/org-roam-ui") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0v54vxh95izch74wz2dl2dkdqicbvshra55l6qvd4xl5qmfhpjdc")))) - (build-system emacs-build-system) - (arguments - `(#:include (cons "^out" %default-include))) - (propagated-inputs - (list emacs-org-roam emacs-websocket emacs-simple-httpd emacs-f)) - (home-page "https://github.com/org-roam/org-roam-ui") - (synopsis "A graphical frontend for your org-roam Zettelkasten") - (description " Org-Roam-UI is a frontend for exploring and interacting -with your @code{org-roam} notes. It is meant a successor of -@code{org-roam-server} that extends functionality of org-roam with a Web app -that runs side-by-side with Emacs.") - (license license:gpl3+)))) - - - -(define emacs-lsp-mode--new - (let ((commit "808c4d0ab9f19bb92c56716cf59df89432b63f5d") - (revision "1")) - (package - (inherit emacs-lsp-mode) - (name "emacs-lsp-mode") - (version (git-version "8.0.1" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/emacs-lsp/lsp-mode") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0ridjhzndwjj8947vabq05njgnns74hi69x77axgcbv1c4nasz2y"))))))) - - -(define emacs-packages - (specifications->manifest - '("emacs-ytdl" - "emacs-desktop-environment" - "emacs-exwm" - "emacs-perspective" - "emacs-mu4e-alert" - "mu" - "isync" - "emacs-htmlize" - "emacs-bluetooth" - "emacs-nov-el" - "emacs-password-store" - "emacs-mastodon" - "emacs-elfeed" - "emacs-pdf-tools" - "emacs-emms" - "emacs-all-the-icons-dired" - "emacs-vterm" - "emacs-restclient" - "emacs-magit" - "emacs-neotree" - "emacs-projectile" - "emacs-company-box" - "emacs-company" - "emacs-docker" - "emacs-yaml-mode" - "emacs-web-mode" - "emacs-flycheck" - "emacs-tide" - "emacs-cider" - "emacs-typescript-mode" - "emacs-pyvenv" - "emacs-geiser-guile" - "emacs-racket-mode" - "emacs-geiser-racket" - "emacs-geiser" - "emacs-sly" - "emacs-rainbow-delimiters" - "emacs-paredit" - ;; "emacs-lsp-ivy" - ;; "emacs-lsp-mode" - "emacs-org-roam" - "emacs-org-roam-bibtex" - "emacs-org-superstar" - "emacs-org" - "emacs-ox-pandoc" - "emacs-beacon" - "emacs-all-the-icons" - "emacs-which-key" - "emacs-counsel" - "emacs-ivy" - "emacs-hl-todo" - "emacs-diminish" - "emacs-solarized-theme" - "font-terminus" - "emacs-undo-tree" - "emacs-hydra" - "emacs-general" - "emacs-guix" - "emacs" - "emacs-use-package" - ))) - - -(concatenate-manifests - (list emacs-packages - (packages->manifest (list emacs-lsp-mode--new - emacs-org-roam-ui)))) diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..2807f08 --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,193 @@ +set $mod Mod4 + +set $left h +set $down j +set $up k +set $right l + +set $term alacritty +set $emacs emacsclient -c +set $menu fuzzel -r0 -b 282828f2 -C 458588f2 -B 3 -s 458588f2 -S 282828FF --font "Terminus:size=12" -p "run: " + +set $laptop-display eDP-1 +set $generic-display HDMI-A-1 +set $primary-home-display 'Iiyama North America PLE2407HDSD 0x01010101' +set $secondary-home-display 'Dell Inc. DELL E190S M8VPV186CELI' + +set $primary-display-layout $primary-home-display $generic-display $laptop-display +set $secondary-display-layout $secondary-home-display $laptop-display + +output * bg SPOILER_33.png fill + +output $laptop-display resolution 1920x1080 position 1920,0 +output $generic-display resolution 1920x1080 position 0,0 +output $primary-home-display resolution 1920x1080 position 0,0 +output $secondary-home-display resolution 1280x1024 position 1920,0 +set $opacity 0.9 + +client.focused #002b36 #586e75 #eee8d5 #268bd2 +client.focused_inactive #002b36 #073642 #93a1a1 #268bd2 +client.unfocused #002b36 #073642 #93a1a1 #268bd2 +client.urgent #002b36 #dc322f #fdf6e3 #002b36 + +input type:keyboard { + xkb_layout pl,us +} + +input type:touchpad { + tap enabled + middle_emulation enabled +} + +bindsym $mod+Shift+s output $laptop-display toggle + +set $swaylock 'swaylock -f -c 000000 --font "Terminus"' +exec swayidle -w \ + timeout 280 $swaylock \ + timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ + before-sleep $swaylock + +# inhibit_idle fullscreen + +bindsym $mod+Escape exec $swaylock + +bindsym XF86MonBrightnessUp exec brightnessctl set 5%+ +bindsym XF86MonBrightnessDown exec brightnessctl set 5%- + +bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% + +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioPause exec playerctl pause + +bindsym print exec grimshot --notify copy area +bindsym $mod+print exec grimshot --notify copy output + +bindsym $mod+Return exec $term + +bindsym $mod+Shift+q kill + +floating_modifier $mod normal + +bindsym $mod+Shift+c reload +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+$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 + +workspace 1 output $primary-display-layout +workspace 2 output $primary-display-layout +workspace 3 output $secondary-display-layout +workspace 4 output $secondary-display-layout +workspace 9 output $primary-display-layout +workspace 10 output $secondary-display-layout + +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 + +assign [app_id="(firefox-default|qutebrowser|Chromium-browser)"] 2 +assign [instance="(chromium-browser)"] 2 +assign [instance="(spotify)"] 3 +assign [app_id=".blueman-manager-real"] 3 +assign [app_id="pavucontrol"] 3 +assign [app_id="(org.telegram.desktop)"] 4 +assign [app_id="vesktop"] 4 +assign [app_id="com.ktechpit.whatsie"] 4 +assign [instance="(discord)"] 4 + +for_window [app_id="vesktop"] opacity $opacity + + +bindsym $mod+b splith +bindsym $mod+v splitv + +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +bindsym $mod+f fullscreen +bindsym $mod+Shift+space floating toggle +bindsym $mod+space focus mode_toggle +bindsym $mod+a focus parent + +bindsym $mod+Shift+minus move scratchpad +bindsym $mod+minus scratchpad show + +mode "resize" { + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + bindsym Return mode "default" + bindsym Control+g mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +set $default swaymsg mode default +mode "menu" { + bindsym --no-repeat e exec '$default; $emacs;' + bindsym --no-repeat w exec "$default; whois-at-hsp -n" + + bindsym Return mode "default" + bindsym Control+g mode "default" + bindsym Escape mode "default" + +} +bindsym $mod+o mode "menu" + + +workspace_layout tabbed + +default_border normal 3 +gaps outer 0 +gaps inner 6 +font Terminus (TTF) 12 +corner_radius 4 +blur_xray disable +blur enable +layer_effects "waybar" blur enable +bindsym $mod+p exec $menu + + +# Taken from dawivil dotfiles. +exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + +# exec udiskie -t +exec mako --font "Terminus (TTF)" --outer-margin=5 --margin=3 --border-size=3 --default-timeout=7000 --background="#282828e0" + +exec nm-applet --indicator +exec blueman-applet +exec waybar +exec udiskie -t +exec wlsunset -l 51.919438 -L 19.145136 diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..5ebee30 --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,159 @@ +{ + "layer": "top", + "position": "top", + + "modules-left": [ + "sway/workspaces", + "sway/mode" + ], + + "modules-right": [ +// "custom/whois", + "pulseaudio", + "network", + "memory", + "cpu", + "temperature", + "battery", + "sway/language", + "clock#date", + "clock#time", + "idle_inhibitor", + "tray" + ], + + // Modules + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + + "battery": { + "interval": 10, + "states": { + "warning": 30, + "critical": 15 + }, + "format-time": "{H}:{M:02}", + "format": "{icon} {capacity}% ({time})", + "format-charging": " {capacity}% ({time})", + "format-charging-full": " {capacity}%", + "format-full": "{icon} {capacity}%", + "format-alt": "{icon} {power}W", + "format-icons": [ + "", + "", + "", + "", + "" + ], + "tooltip": false + }, + + "clock#time": { + "interval": 10, + "format": "{:%H:%M}", + "tooltip": false + }, + + "clock#date": { + "interval": 20, + "format": " {:%e %b %Y}", + "tooltip": false + //"tooltip-format": "{:%e %B %Y}" + }, + + "cpu": { + "interval": 5, + "tooltip": false, + "format": " {usage}%", + "format-alt": " {load}", + "states": { + "warning": 70, + "critical": 90 + } + }, + + "sway/language": { + "format": " {}", + "min-length": 5, + "on-click": "swaymsg 'input * xkb_switch_layout next'", + "tooltip": false + }, + + "memory": { + "interval": 5, + "format": " {used:0.1f}G/{total:0.1f}G", + "states": { + "warning": 70, + "critical": 90 + }, + "tooltip": false + }, + + "network": { + "interval": 5, + "format-wifi": " {essid} ({signalStrength}%)", + "format-ethernet": " {ifname}", + "format-disconnected": "No connection", + "format-alt": " {ipaddr}/{cidr}", + "tooltip": false + }, + + "sway/mode": { + "format": "{}", + "tooltip": false + }, + + "sway/window": { + "format": "{}", + "max-length": 30, + "tooltip": false + }, + + "sway/workspaces": { + "disable-scroll-wraparound": true, + "smooth-scrolling-threshold": 4, + "enable-bar-scroll": true, + "format": "{name}" + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}%", + "format-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", ""] + }, + "scroll-step": 1, + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "tooltip": false + }, + + "temperature": { + "critical-threshold": 90, + "interval": 5, + "format": "{icon} {temperatureC}°", + "format-icons": [ + "", + "", + "", + "", + "" + ], + "tooltip": false + }, + + "tray": { + "icon-size": 18, + } +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..53d732b --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,205 @@ +/* Keyframes */ + +@keyframes blink-critical { + to { + /*color: @white;*/ + background-color: @critical; + } +} + + +/* Styles */ + +/* Colors (gruvbox) */ +@define-color black #073642; +@define-color red #dc322f; +@define-color green #859900; +@define-color yellow #b58900; +@define-color blue #268bd2; +@define-color purple #d33682; +@define-color aqua #00afaf; +@define-color gray #1c1c1c; +@define-color brgray #928374; +@define-color brred #cb4b16; +@define-color brgreen #586e75; +@define-color bryellow #657b83; +@define-color brblue #839496; +@define-color brpurple #6c71c4; +@define-color braqua #93a1a1; +@define-color white #eee8d5; +@define-color bg1 #073642; +@define-color bg2 #002b36; + + +@define-color warning @bryellow; +@define-color critical @red; +@define-color mode @bg2; +@define-color unfocused @bg2; +@define-color focused @blue; +@define-color inactive @purple; +@define-color sound @green; +@define-color network @yellow; +@define-color memory @aqua; +@define-color cpu @blue; +@define-color temp @brpurple; +@define-color layout @green; +@define-color battery @yellow; +@define-color date @aqua; +@define-color time @bg2; +@define-color tray @bg2; + +/* Reset all styles */ +* { + border: none; + border-radius: 0; + min-height: 0; + margin: 0; + padding: 0; + box-shadow: none; + text-shadow: none; + icon-shadow: none; +} + +/* The whole bar */ +#waybar { + background: @bg2; + color: @white; + font-family: "Terminus (TTF)", FontAwesome; + font-size: 12pt; +} + +/* Each module */ +#battery, +#clock, +#cpu, +#language, +#memory, +#mode, +#network, +#pulseaudio, +#temperature, +#tray, +#backlight, +#idle_inhibitor, +#disk, +#user, +#mpris { + padding-left: 8pt; + padding-right: 8pt; +} + +/* Each critical module */ +#memory.critical, +#cpu.critical, +#temperature.critical, +#battery.critical.discharging { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; + animation-name: blink-critical; + animation-duration: 1s; +} + +/* Each warning */ +#network.disconnected, +#memory.warning, +#cpu.warning, +#temperature.warning, +#battery.warning.discharging { + color: @warning; +} + +/* And now modules themselves in their respective order */ + +/* Current sway mode (resize etc) */ +#mode { + color: @white; + background: @mode; +} + +/* Workspaces stuff */ +#workspaces button { + /*font-weight: bold;*/ + padding-left: 2pt; + padding-right: 2pt; + color: @white; + background: @unfocused; +} + +/* Inactive (on unfocused output) */ +#workspaces button.visible { + color: @white; + background: @inactive; +} + +/* Active (on focused output) */ +#workspaces button.focused { + color: @black; + background: @focused; +} + +/* Contains an urgent window */ +#workspaces button.urgent { + color: @black; + background: @warning; +} + +/* Style when cursor is on the button */ +#workspaces button:hover { + background: @black; + color: @white; +} + +#window { + margin-right: 35pt; + margin-left: 35pt; +} + +#pulseaudio { + background: @sound; + color: @black; +} + +#network { + background: @network; + color: @white; +} + +#memory { + background: @memory; + color: @black; +} + +#cpu { + background: @cpu; + color: @white; +} + +#temperature { + background: @temp; + color: @black; +} + +#language { + background: @layout; + color: @black; +} + +#battery { + background: @battery; + color: @white; +} + +#tray { + background: @tray; +} + +#clock.date { + background: @date; + color: @black; +} + +#clock.time { + background: @time; + color: @white; +} -- cgit v1.2.3