This commit is contained in:
coast 2025-08-07 22:12:32 +03:30
parent d586f9e278
commit 0b58373828
10 changed files with 391 additions and 351 deletions

View file

@ -1,5 +1,3 @@
source ~/.config/nvim/plugged/plug.vim
set nocompatible
filetype plugin indent on
syntax enable
@ -23,24 +21,23 @@ set statusline+=\ %f\ %m\ %r\ %y
set statusline+=%=
set statusline+=\ Ln:%l/%L\ Col:%c\ \[%p%%]
hi Normal guibg=NONE ctermbg=NONE guifg=#dcdfe4 ctermfg=245
hi NormalNC guibg=NONE ctermbg=NONE guifg=#b0b3b8 ctermfg=245
hi LineNr guibg=NONE ctermbg=NONE guifg=#a6a8ab ctermfg=245
hi CursorLine guibg=#3c3f41 ctermbg=59 guifg=NONE ctermfg=NONE
hi VertSplit guibg=NONE ctermbg=NONE guifg=#a6a8ab ctermfg=245
hi StatusLine guibg=#3c3f41 guifg=#dcdfe4 ctermbg=59 ctermfg=245
hi StatusLineMode guibg=#5a7f9a guifg=#3c3f41 ctermbg=66 ctermfg=33 gui=bold
hi Visual guibg=#4a545c guifg=NONE ctermbg=67 ctermfg=67
hi VisualNOS guibg=#4a545c guifg=NONE ctermbg=67 ctermfg=67
hi VisualSB guibg=#4a545c guifg=NONE ctermbg=67 ctermfg=67
hi Search guibg=NONE ctermbg=NONE guifg=#5c8cba ctermfg=66
hi IncSearch guibg=NONE ctermbg=NONE guifg=#7fb3c8 ctermfg=32
hi Pmenu guibg=NONE ctermbg=NONE guifg=#dcdfe4 ctermfg=245
hi PmenuSel guibg=NONE ctermbg=NONE guifg=#3c3f41 ctermbg=59
hi WildMenu guibg=NONE ctermbg=NONE guifg=#5c8cba ctermfg=66
hi Folded guibg=NONE ctermbg=NONE guifg=#a6a8ab ctermfg=245
hi SignColumn guibg=NONE ctermbg=NONE guifg=#b0b3b8 ctermfg=245
hi Normal guibg=NONE ctermbg=NONE guifg=#eeeeee ctermfg=254
hi NormalNC guibg=NONE ctermbg=NONE guifg=#888888 ctermfg=240
hi LineNr guibg=NONE ctermbg=NONE guifg=#555555 ctermfg=242
hi CursorLine guibg=NONE ctermbg=NONE guifg=NONE ctermfg=NONE
hi VertSplit guibg=NONE ctermbg=NONE guifg=#444444 ctermfg=240
hi StatusLine guibg=NONE guifg=#cccccc ctermbg=NONE ctermfg=250
hi StatusLineMode guibg=NONE guifg=#bbbbbb ctermbg=NONE ctermfg=247 gui=bold
hi Visual guibg=#222222 guifg=NONE ctermbg=234 ctermfg=NONE
hi VisualNOS guibg=#222222 guifg=NONE ctermbg=234 ctermfg=NONE
hi VisualSB guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE
hi Search guibg=NONE guifg=#bbbbbb ctermbg=NONE ctermfg=247
hi IncSearch guibg=NONE guifg=#ffffff ctermbg=NONE ctermfg=255
hi Pmenu guibg=NONE guifg=#dddddd ctermbg=NONE ctermfg=254
hi PmenuSel guibg=NONE guifg=#000000 ctermbg=NONE ctermfg=16
hi WildMenu guibg=NONE guifg=#bbbbbb ctermbg=NONE ctermfg=247
hi Folded guibg=NONE guifg=#666666 ctermbg=NONE ctermfg=242
hi SignColumn guibg=NONE guifg=#888888 ctermbg=NONE ctermfg=240
function! ModeName()
let modeval = mode()
@ -96,8 +93,9 @@ set splitright
set nobackup
set nowritebackup
set lazyredraw
set guicursor=n:hor100A,i:ver100,r:block
call plug#begin('~/.config/nvim/plugged')
call plug#begin('~/.local/share/nvim/plugged')
Plug 'tpope/vim-sensible'
Plug 'junegunn/fzf.vim'
Plug 'tpope/vim-surround'
@ -106,39 +104,17 @@ Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-repeat'
Plug 'mattn/emmet-vim'
Plug 'norcalli/nvim-colorizer.lua'
Plug 'nvim-treesitter/nvim-treesitter-textobjects'
Plug 'nvim-treesitter/nvim-treesitter-refactor'
Plug 'andweeb/presence.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'Stoozy/vimcord'
call plug#end()
lua << EOF
require'colorizer'.setup()
EOF
lua << EOF
local parsers = require'nvim-treesitter.parsers'.get_parser_configs()
local ensure_installed = {}
for lang, _ in pairs(parsers) do
if lang ~= "verilog" and lang ~= "ipkg" and lang ~= "gdshader" and
lang ~= "latex" and lang ~= "swift" and lang ~= "mlir" and
lang ~= "ocamllex" and lang ~= "unison" and lang ~= "teal" and
lang ~= "scfg" then
table.insert(ensure_installed, lang)
end
end
require'nvim-treesitter.configs'.setup {
ensure_installed = ensure_installed,
ensure_installed = { "c", "cpp", "python", "lua", "javascript", "typescript", "bash" },
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
},
}
EOF
set guicursor=n:hor100A,i:ver100,r:block

View file

@ -0,0 +1,232 @@
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# 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 terminal emulator
set $term foot
# Your preferred application launcher
set $menu wmenu-run
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
#
# Example configuration:
#
# 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'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
# input type:touchpad {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# input type:keyboard {
# xkb_layout "eu"
# }
#
# You can also configure each device individually.
# 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+Shift+q kill
# 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+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'
#
# 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 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+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
#
# 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"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %X'; do sleep 1; done
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
}
include /etc/sway/config.d/*

View file

@ -1,6 +1,13 @@
exec stacki3
exec waybar
#touchpad
input "1267:12448:ELAN0709:00_04F3:30A0_Touchpad" {
dwt enabled
tap enabled
middle_emulation enabled
}
#cursor
seat * xcursor_theme Adwaita 24
@ -25,7 +32,7 @@ set $menu dmenu_run
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /home/coast/files/pics/wallhaven-vm5l58_1920x1080.png fill
output * bg /home/coast/files/pics/flowers.png stretch
#
# Example configuration:
#
@ -98,7 +105,7 @@ client.urgent #ff0000 #000000 #ffffff #ff0000 #ff0000
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+q 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+q exec 'swaymsg exit'
#
# Moving around:
#
@ -168,10 +175,10 @@ client.urgent #ff0000 #000000 #ffffff #ff0000 #ff0000
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
bindsym $mod+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
bindsym $mod+Shift+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
@ -223,7 +230,7 @@ bindsym $mod+Shift+p mode "resize"
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym Print exec screenie-wl
#
# Status Bar:

View file

@ -1,57 +1,44 @@
{
"position": "bottom", // Waybar position (top|bottom|left|right)
"height": 40, // Waybar height (to be removed for auto height)
"modules-left": ["niri/workspaces"],
"modules-center": ["niri/window"],
"modules-right": ["pulseaudio", "network", "battery", "battery#bat2", "clock", "tray"],
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
"format": "T: {:%H:%M}",
"format-alt": "{:%Y-%m-%d}"
"layer": "top",
"position": "top",
},
"battery": {
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "B: {capacity}%",
"format-charging": "{capacity}%",
"format-plugged": "{capacity}%",
"format-alt": "{time} ",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "WiFi",
"format-ethernet": "{ifname}: Ethernet",
"format-linked": "{ifname} (No IP)",
"format-disconnected": "Disconnected",
"format-alt": "{ifname}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "V: {volume}%",
"format-bluetooth": "{volume}% {format_source}",
"format-bluetooth-muted": "{format_source}",
"format-muted": "{format_source}",
"format-source": "{volume}%",
"format-source-muted": "[MUTED]",
"on-click": "pavucontrol"
"modules-left": ["sway/workspaces", "custom/sway-layout"],
"modules-center": ["sway/window"],
"modules-right": ["custom/dwmstatus"],
"sway/workspaces": {
"format": "{name}",
"format-focused": "[{name}]",
"format-unfocused": "{name}",
"format-visible": "{name}",
"format-urgent": "<{name}>",
"disable-scroll": true,
"persistent-workspaces": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"6": [],
"7": [],
"8": [],
"9": []
}
},
"sway/window": {
"max-length": 80,
"tooltip": false
},
"custom/sway-layout": {
"exec": "~/.config/waybar/sway-layout.sh",
"interval": 1
},
"custom/dwmstatus": {
"exec": "~/.config/waybar/dwmbar.sh",
"interval": 1
}
}

22
config/waybar/dwmbar.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/bash
cpu() {
awk '/^cpu / {
usage = ($2 + $4) * 100 / ($2 + $4 + $5)
printf "CPU: %.1f%%", usage
}' /proc/stat
}
mem() {
free | awk '/Mem:/ {
used = $3 / $2 * 100
printf "MEM: %.1f%%", used
}'
}
get_time() {
date '+%I:%M-%p'
}
echo "$(cpu) | $(mem) | $(get_time)"

View file

@ -1,266 +1,43 @@
* {
border: none;
/*border-radius: 4px;*/
/* `ttf-font-awesome` is required to be installed for icons */
font-family: "inter", sans-serif;
/* adjust font-size value to your liking: */
font-size: 12px;
min-height: 0;
font-family: "Departure Mono";
font-size: 19px;
padding: 0;
margin: 0;
border: none;
box-shadow: none;
background: #000000;
color: #ffffff;
}
window#waybar {
background-color: #212426;
/* border-bottom: 3px solid rgba(100, 114, 125, 0.5); */
color: #ffffff;
/* transition-property: background-color; */
/* transition-duration: .5s; */
/* border-radius: 0; */
background: #000000;
color: #ffffff;
}
/* window#waybar.hidden {
* opacity: 0.2;
} * */
/*
w *indow#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
/* window#waybar.termite {
* background-color: #000000;
} *
window#waybar.chromium {
background-color: #000000;
border: none;
} */
#workspaces button {
padding: 0 10px;
background-color: #393d40;
color: #ffffff;
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
border-radius: 4px;
margin: 6px 3px;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
background: #393d40;
box-shadow: inset 0 -3px #ffffff;
border-radius: 4px;
background: #000000;
color: #888888;
padding: 0 4px;
margin: 0 1px;
}
#workspaces button.focused {
background-color: #464A4E;
border-radius: 4px;
/* box-shadow: inset 0 -3px #ffffff; */
}
#workspaces button.urgent {
background-color: #eb4d4b;
border-radius: 4px;
}
#mode {
background-color: #64727D;
/* border-bottom: 3px solid #ffffff; */
}
#clock,
#battery,
#cpu,
#memory,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#mpd {
padding: 0 10px;
margin: 6px 3px;
color: #212426;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
background-color: #393d40;
color: white;
border-radius: 4px;
}
#battery {
border-radius: 4px;
background-color: #393d40;
color: white;
}
#battery.charging {
border-radius: 4px;
color: #ffffff;
background-color: #393d40;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #212426;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
border-radius: 4px;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #000000;
color: #ffffff;
border-radius: 4px;
}
#memory {
border-radius: 4px;
background-color: #000000;
color: white;
}
#backlight {
border-radius: 4px;
background-color: #000000;
color:white;
}
#network {
border-radius: 4px;
background-color: #393d40;
color:white;
}
#network.disconnected {
border-radius: 4px;
background-color: #f53c3c;
}
#pulseaudio {
border-radius: 4px;
background-color: #393d40;
color: #ffffff;
}
#pulseaudio.muted {
border-radius: 4px;
background-color: #393d40;
color: #ffffff;
}
#custom-media {
border-radius: 4px;
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
border-radius: 4px;
background-color: #66cc99;
}
#custom-media.custom-vlc {
border-radius: 4px;
background-color: #ffa000;
}
#temperature {
border-radius: 4px;
background-color: #f0932b;
}
#temperature.critical {
border-radius: 4px;
background-color: #eb4d4b;
}
#tray {
border-radius: 4px;
background-color: #8A6887;
}
#idle_inhibitor {
border-radius: 4px;
background-color: #2d3436;
}
#idle_inhibitor.activated {
border-radius: 4px;
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
border-radius: 4px;
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
border-radius: 4px;
background-color: #f53c3c;
color: #ffffff;
font-weight: bold;
}
#mpd.stopped {
border-radius: 4px;
background-color: #90b1b1;
#sway-layout {
margin-left: 8px;
margin-right: 8px;
min-width: 20px;
}
#mpd.paused {
border-radius: 4px;
background-color: #51a37a;
#sway-window {
font-style: italic;
color: #cccccc;
}
#language {
border-radius: 4px;
background: #bbccdd;
color: #333333;
padding: 0 5px;
margin: 6px 3px;
min-width: 16px;
#custom-dwmstatus {
margin-right: 10px;
}

21
config/waybar/sway-layout.sh Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
layout=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused) | .layout')
case "$layout" in
splith|splitv)
echo " []="
;;
tabbed)
echo " |||"
;;
stacked)
echo " TTT"
;;
floating)
echo " ><>"
;;
*)
echo "$layout"
;;
esac

BIN
local/bin/htop Executable file

Binary file not shown.

16
local/bin/screenie-wl Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env python3
import subprocess, datetime, os
d = os.path.expanduser("~/files/pics/screenies")
os.makedirs(d, exist_ok=True)
f = f"screenshot_{datetime.datetime.now():%Y-%m-%d_%H-%M-%S}.png"
p = os.path.join(d, f)
r = subprocess.run(["slurp"], capture_output=True, text=True)
if r.returncode: exit(1)
subprocess.run(["grim", "-g", r.stdout.strip(), p])
with open(p, "rb") as image_file:
subprocess.run(["wl-copy"], stdin=image_file)
subprocess.run(["notify-send", "Screenshot saved", p])
print(p)

2
local/bin/startw Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
dbus-run-session sway