Compare commits

...

49 Commits

Author SHA1 Message Date
rostyhn 795c0d5330 add kernel config 2026-08-12 18:40:17 -07:00
rostyhn 950ac94dae cleanup hyprland conf, add hy3 layout, add nvim as editor in zshrc 2026-08-10 21:41:55 -07:00
rostyhn 4e9d21e5e1 add float rule to screenshare dialog, change fs behavior, change size of borders 2026-08-10 19:37:22 -07:00
rostyhn 57ff1ad019 cleanup zshrc 2026-08-10 19:36:49 -07:00
rostyhn b1c54ef973 blur fuzzel, sort workspace icons by position 2026-08-09 16:01:53 -07:00
rostyhn 73822f700f slopped up a calendar 2026-08-09 15:45:35 -07:00
rostyhn 6f14b52262 add workspace window icons, right click menus on systrays 2026-08-09 15:28:16 -07:00
rostyhn a93def8e12 fix qt_qpa_platformtheme, add volume OSD, adjust CPU and memory display 2026-08-08 20:21:48 -07:00
rostyhn a0b1248d1e add fuzzel, hyprland, qmlls to lspconfig, blur to quickshell bar 2026-08-05 23:37:42 -07:00
rostyhn 379404a90c add quickshell 2026-08-05 21:47:45 -07:00
rostyhn 8ab9788208 disable illuminate, add spell checker 2026-06-17 23:57:40 -07:00
rostyhn 5f01172523 add svelte to lspconfig 2026-06-11 10:13:21 -07:00
rostyhn 05dfddd04b adjust volume by 5's instead of 10's 2026-06-11 10:11:43 -07:00
rostyhn e0ec649da6 force niri to import gnome settings 2026-06-09 22:32:44 -07:00
rostyhn c12e815cce add vicinae 2026-06-09 05:09:27 -07:00
rostyhn e29f8b2fc1 add swaync 2026-06-09 04:39:31 -07:00
rostyhn c459c66d3f have systemd manage nextcloud, add scratchpad 2026-06-09 04:23:46 -07:00
rostyhn 194b680c13 update readme, fix screenshots 2026-06-08 17:01:59 -07:00
rostyhn d776d43ef2 setup waybar for niri 2026-06-08 16:49:35 -07:00
rostyhn 830436f44c manage systemd user scripts, set wallpaper in niri 2026-06-08 16:47:42 -07:00
rostyhn 1c42274ced add niri, clean up sway 2026-06-08 15:40:45 -07:00
rostyhn 07eb59bf2a add waybar eww and sway 2026-06-08 15:09:08 -07:00
rostyhn 050d923644 add clangd to lspconfig 2025-11-30 16:11:27 -07:00
rostyhn ca3f573ffc remove old init.lua 2025-09-30 17:42:54 -07:00
rostyhn e19e5d2c10 update ncspot notification 2025-09-23 18:21:37 -07:00
rostyhn f2fa6a95d3 update lspconfig 2025-09-23 18:21:26 -07:00
rostyhn a9cc6f0889 add ncspot config + workaround for wired to show album covers 2025-09-15 22:16:19 -07:00
rostyhn b9bfd9cc51 fix xinitrc 2025-09-15 22:14:21 -07:00
rostyhn a96fffb78c switch from dunst to wired 2025-09-15 22:14:12 -07:00
rostyhn c16abd979b fix lspconfig in nvim 2025-09-15 22:13:36 -07:00
rostyhn c77e3abf65 update neovim config to use lazy, fix some issues with screens in general 2025-09-13 04:48:53 -07:00
rostyhn cfcea95348 finished big nvim overhaul 2024-09-25 01:25:00 -07:00
rostyhn 4111f31ce6 update readme 2024-09-20 20:51:01 -07:00
rostyhn 74f4738519 add readme 2024-09-20 20:47:24 -07:00
rostyhn e9fab54ab0 declutter xresources and i3 2024-09-20 20:36:36 -07:00
rostyhn ef0b087591 remove urxvt and picom 2024-09-20 20:33:55 -07:00
rostyhn 313fefe29d declutter zshrc more 2024-09-20 20:31:22 -07:00
rostyhn ae00575ede add alacritty settings 2024-09-20 20:25:37 -07:00
rostyhn 2e50372c0e update i3 config 2024-09-20 20:22:32 -07:00
rostyhn e62df20a33 add p10k config, declutter zshrc a bit 2024-09-20 20:22:26 -07:00
rostyhn f0ac725054 delete emacs 2024-09-20 20:22:07 -07:00
rostyhn bdc1e38871 add screenshot scripts 2024-09-20 20:22:03 -07:00
rostyhn 5ff2e4ae5d update ranger config 2024-09-20 14:40:10 -07:00
rostyhn 2d1957bc2e improve clipboard in nvim 2024-09-20 14:39:57 -07:00
rostyhn a5f3fe65b0 add outline + way to open float diagnostic 2024-09-12 03:35:08 -07:00
rostyhn d4f42e8858 add spellcheck, tag and luasnip completion 2024-09-08 00:18:53 -07:00
rostyhn a94cd9350d fix null_ls and ts_ls issues 2024-09-08 00:00:15 -07:00
rostyhn 87f624ac3c update nvim + urxvt 2024-05-16 20:54:24 -07:00
rostyhn 4b33912ad1 switch to nvim-cmp 2023-08-31 23:43:35 -07:00
66 changed files with 14736 additions and 1083 deletions
+8
View File
@@ -46,5 +46,13 @@ flycheck_*.el
# network security
/network-security.data
# nvim files
nvim/env
nvim/plugin
# alacritty themes
alacritty/themes
myzsh
ncspot/userstate.cbor
+11
View File
@@ -0,0 +1,11 @@
# Dotfiles
Set of dotfiles I use for my desktop. I run Arch linux (btw) and use `niri` as my window manager, `alacritty` as my terminal emulator and `neovim` as my text editor. I also like to manage my notes using `obsidian`. I spend 99% of my time on my computer using those 4 programs plus `firefox`.
<p align="center">
<img src="desktop.png" width="1000"/>
</p>
People will likely find the `nvim`, `alacritty`, and `zshrc` / `p10k.zsh` configs useful.
# Installation
If you want to just use my entire setup as-is, you can run `install.sh`. This will symlink all of the files in this directory to your home directory. Folders get linked to `~/.config` and files get linked as hidden versions of their names under `$HOME` (e.g. `zshrc` -> `~/.zshrc`).
+3 -17
View File
@@ -1,24 +1,10 @@
!! URxvt Appearance
urxvt*termName: rxvt-256color
urxvt*font: xft:TerminessTTF Nerd Font:style=Medium:size=12, xft:IosevkaTerm Nerd Font:style=Regular:size=6:minspace=1
urxvt*skipBuiltinGlyphs: 1
Xcursor.size: 16
Xft.dpi: 96
Xft.autohint: 1
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
URxvt.font: xft:Hack Nerd Font:size=16
rofi.color-enabled: true
urxvt*letterSpace: 0
urxvt*lineSpace: 1
urxvt*geometry: 80x-1
urxvt.internalBorder: 12
urxvt.saveline: 2048
urxvt.scrollBar: false
urxvt.scrollBar_right: false
urxvt.urgentOnBell: true
urxvt.depth: 32
urxvt.cursorUnderline: true
urxvt.cursorBlink: true
urxvt*scrollTtyOutput: false
+30
View File
@@ -0,0 +1,30 @@
[env]
TERM = "alacritty"
[terminal.shell]
program = "/bin/zsh"
[window]
padding = { x = 5, y = 5}
dynamic_padding = true
decorations = "Full"
startup_mode = "Windowed"
[selection]
save_to_clipboard = true
[font]
size = 16
normal = { family = "Iosevka" }
[cursor]
style = {shape = "underline", blinking = "Always"}
[general]
live_config_reload = true
import = [
"~/.config/alacritty/my_theme.toml"
]
+23
View File
@@ -0,0 +1,23 @@
[colors.primary]
background = "#0C0C0C"
foreground = "#CCCCCC"
[colors.normal]
black = "#000000"
red = "#d6181b"
green = "#6A9955"
yellow = "#e4d201"
blue = "#569cd6"
magenta = "#bc3fbc"
cyan = "#4EC9B0"
white = "#e5e5e5"
[colors.bright]
black = "#666666"
red = "#ce9178"
green = "#b5cea8"
yellow = "#DCDCAA"
blue = "#9cdcfe"
magenta = "#d670d6"
cyan = "#9cdcfe"
white = "#e5e5e5"
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

+3 -3
View File
@@ -27,7 +27,7 @@
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 0
transparency = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
@@ -67,7 +67,7 @@
### Text ###
font = Iosevka 12
font = Hack Nerd Font 14
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
@@ -233,7 +233,7 @@
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
per_monitor_dpi = false
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
killall -q dunst
dunst --startup-notification true &
dunst -startup_notification &
-228
View File
@@ -1,228 +0,0 @@
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(setq-default cursor-type 'bar)
(global-hl-line-mode 1)
(toggle-scroll-bar -1)
(scroll-bar-mode -1)
(menu-bar-mode -1)
(tool-bar-mode -1)
(column-number-mode t)
(set-fringe-mode 5)
(setq doc-view-scale-internally nil)
(setq visible-bell t)
(setq vc-handled-backends nil)
(fset 'yes-or-no-p 'y-or-n-p)
(show-paren-mode t)
(setq show-paren-style 'expression)
(save-place-mode t)
(setq-default indent-tabs-mode nil
tab-width 4)
(setq custom-file (concat user-emacs-directory "custom.el"))
(load custom-file 'noerror)
(setq interprogram-cut-function nil)
(setq backup-directory-alist '(("" . "~/.emacs.d/backup")))
; lets you move windows with shift
(when (fboundp 'windmove-default-keybindings)
(windmove-default-keybindings))
(setq package-check-signature nil)
(defun ensure-package-installed (&rest packages)
"Assure every package is installed, ask for installation if its not.
Return a list of installed packages or nil for every skipped package."
(mapcar
(lambda (package)
;; (package-installed-p 'evil)
(if (package-installed-p package)
nil
(if (y-or-n-p (format "Package %s is missing. Install it? " package))
(package-install package)
package)))
packages))
(ensure-package-installed 'use-package 'ivy 'centaur-tabs 'company 'all-the-icons 'smex 'counsel 'swiper 'dashboard 'org-super-agenda 'origami 'verb 'org-roam'kaolin-themes)
(eval-when-compile
(require 'use-package))
(use-package all-the-icons)
(use-package company
:custom
(company-minimum-prefix-length 1)
(company-idle-delay 0.0)
(company-tooltip-align-annotations t)
:config
(global-company-mode)
)
(use-package ivy :ensure t
:diminish ivy-mode
:config
(ivy-mode 1)
(setq ivy-height 13)
(setq ivy-wrap t)
(setq ivy-use-virtual-buffers t)
(setq ivy-count-format "(%d/%d) "))
(use-package counsel
:ensure t
:bind*
(("M-x" . counsel-M-x)
("C-c d d" . counsel-descbinds)
("C-x C-f" . counsel-find-file)
("C-x r f" . counsel-recentf)
("C-c g g" . counsel-git)
("C-c g G" . counsel-git-grep)
("C-x l" . counsel-locate)
("C-c g s" . counsel-grep-or-swiper)
("C-M-y" . counsel-yank-pop)
("C-c C-r" . ivy-resume)
("C-c i m" . counsel-imenu)
("C-c i M" . ivy-imenu-anywhere)
("C-c d s" . describe-symbol)))
(use-package swiper
:bind*
(("C-s" . swiper)))
(setq search-default-mode #'char-fold-to-regexp)
(use-package centaur-tabs
:init
(setq centaur-tabs-enable-key-bindings t
centaur-tabs-set-icons t
centaur-tabs-set-modified-marker t
centaur-tabs-style "chamfer"
centaur-tabs-gray-out-icons 'buffer)
:config
(centaur-tabs-group-by-projectile-project)
(centaur-tabs-headline-match)
(centaur-tabs-mode 1))
(use-package dashboard
:after org
:init
(setq dashboard-set-footer nil
dashboard-org-agenda-categories '("Tasks" "appointments")
dashboard-center-content t
dashboard-set-heading-icons t
dashboard-set-file-icons t
initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
:ensure t
:config (dashboard-setup-startup-hook))
(use-package org
:mode ("\\.org\\'" . org-mode)
:bind
(:map org-mode-map
("C-c C-r" . verb-command-map))
(:map global-map
("C-c a" . org-agenda)
("C-c l" . org-store-link))
:config
(setq org-replace-disputed-keys t
org-enforce-todo-dependencies t
org-enforce-todo-checkbox-dependencies t
org-log-done nil
org-clock-idle-time 10
org-startup-with-inline-images t
org-startup-folded t
org-pretty-entities t
org-hide-leading-stars t
org-hide-emphasis-markers t
org-fontify-whole-heading-line t
org-fontify-done-headline t
org-fontify-quote-and-verse-blocks t
org-startup-with-latex-preview t
org-src-tab-acts-natively t
org-src-fontify-natively t
org-confirm-elisp-link-function nil
org-display-custom-times t
org-time-stamp-custom-formats '("<%a %b %e %Y>" . "<%a %b %e %Y %H:%M>")
org-tag-alist '(("bug" . ?b) ("feature" . ?f) ("polish" . ?p) ("optimization" . ?o) ("devops" . ?d) ("reading" . ?r) ("writing" . ?w))
org-agenda-custom-commands
'(("p" "Projects" todo "TODO"
((org-agenda-files '("~/Documents/org-mode/projects.org"))
(org-agenda-sorting-strategy '(priority-down)))
))
org-agenda-skip-scheduled-if-done t
org-agenda-skip-deadline-if-done t
org-agenda-todo-ignore-deadlines t
org-agenda-todo-ignore-with-date t
org-agenda-todo-ignore-scheduled t
org-agenda-start-on-weekday nil
org-agenda-skip-additional-timestamps-same-entry nil
org-agenda-compact-blocks t
org-agenda-block-separator nil
org-agenda-start-day "+0d")
:hook
(org-agenda-mode . origami-mode)
)
(use-package org-alert
:ensure t
:config
(org-alert-enable)
(setq alert-default-style 'libnotify
org-alert-notify-cutoff 300
))
(setq org-agenda-files
(list
"~/Documents/org-mode/school.org"
"~/Documents/org-mode/personal.org"
"~/Documents/org-mode/tweaking.org"
"~/Documents/org-mode/projects.org"
)
)
(use-package org-super-agenda
:after org
:ensure t
:config
(setq org-super-agenda-groups
'(
(:auto-category t)
)
)
)
;;(use-package org-roam
;; :ensure t
;; :after org
;; :init
;; (setq org-roam-v2-ack t)
;; :bind* (("C-c n l" . org-roam-buffer-toggle)
;; ("C-c n f" . org-roam-node-find)
;; ("C-c n c" . org-roam-dailies-capture-today))
;; :bind (:map org-mode-map
;; ("C-c n i" . org-roam-node-insert))
;; :custom
;; (org-roam-directory "~/Documents/slipbox")
;; (org-roam-capture-templates
;; '(("d" "default" plain
;; "%?"
;; :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
;; :unnarrowed t)
;; ("e" "encrypted" plain "%?"
;; :target (file+head "${slug}.org.gpg"
;; "#+title: ${title}\n")
;; :unnarrowed t)
;; )
;; )
;; (org-roam-completion-everywhere t)
;; (org-roam-completion-system 'default)
;; (org-roam-dailies-directory "daily/")
;; :config
;; (use-package org-roam-dailies)
;; (org-roam-setup)
;; (org-roam-db-autosync-mode))
(add-hook 'org-mode-hook 'flyspell-mode)
+377
View File
@@ -0,0 +1,377 @@
/** Global *******************************************/
*{
all: unset;
font-family: feather;
font-family: Iosevka;
}
/** Background **************************************
.bg {
background-image: url("images/bg.png");
background-color: #474D59;
opacity: 1;
} */
/** Generic window ***********************************/
.genwin {
background-color: #15161E;
border-radius: 16px;
}
/** Profile ******************************************/
.face {
background-size: 200px;
min-height: 200px;
min-width: 200px;
margin: 65px 0px 0px 0px;
border-radius: 100%;
}
.fullname {
color: #ef596f;
font-size : 30px;
font-weight : bold;
}
.username {
color: #6BB2C0;
font-size : 22px;
font-weight : bold;
margin : -15px 0px 0px 0px;
}
/** System ********************************************/
.iconcpu, .iconmem, .iconbright, .iconbat {
font-size : 32px;
font-weight : normal;
}
.iconcpu {
color: #f7768e;
}
.iconmem {
color: #9ece6a;
}
.iconbright {
color: #e0af68;
}
.iconbat {
color: #7aa2f7;
}
.cpu_bar, .mem_bar, .bright_bar, .bat_bar, scale trough {
all: unset;
background-color: #282C34;
border-radius: 16px;
min-height: 28px;
min-width: 240px;
}
.cpu_bar, .mem_bar, .bright_bar, .bat_bar, scale trough highlight {
all: unset;
border-radius: 16px;
}
.cpu_bar scale trough highlight {
background-color: #f7768e;
}
.mem_bar scale trough highlight {
background-color: #9ece6a;
}
.bright_bar scale trough highlight {
background-color: #e0af68;
}
.bat_bar scale trough highlight {
background-color: #7aa2f7;
}
/** Clock ********************************************/
.time_hour, .time_min {
color: #7dcfff;
font-size : 70px;
font-weight : bold;
}
.time_hour {
margin : 15px 0px 0px 20px;
}
.time_min {
margin : 0px 0px 10px 0px;
}
.time_mer {
color: #9ece6a;
font-size : 40px;
font-weight : bold;
margin : 20px 0px 0px 0px;
}
.time_day {
color: #e0af68;
font-size : 30px;
font-weight : normal;
margin : 0px 0px 20px -20px;
}
/** Uptime ********************************************/
.icontimer {
color: #bb9af7;
font-size : 90px;
font-weight : normal;
}
.uphour {
color: #c0caf5;
font-size : 42px;
font-weight : bold;
}
.upmin {
color: #c0caf5;
font-size : 32px;
font-weight : bold;
}
/** Music ***************************************/
.album_art {
background-size: 240px;
min-height: 240px;
min-width: 240px;
margin: 20px;
border-radius: 14px;
}
.song {
color: #6BB2C0;
font-size : 24px;
font-weight : bold;
margin : 40px 0px 0px 0px;
}
.artist {
color: #e0af68;
font-size : 16px;
font-weight : normal;
margin : 0px 0px 15px 0px;
}
.btn_prev, .btn_play, .btn_next {
font-family: Iosevka Nerd Font;
}
.btn_prev {
color: #e0af68;
font-size : 32px;
font-weight : normal;
}
.btn_play {
color: #9ece6a;
font-size : 48px;
font-weight : bold;
}
.btn_next {
color: #e0af68;
font-size : 32px;
font-weight : normal;
}
.music_bar scale trough highlight {
all: unset;
background-color: #bb9af7;
border-radius: 8px;
}
.music_bar scale trough {
all: unset;
background-color: #282C34;
border-radius: 8px;
min-height: 20px;
min-width: 310px;
margin : 10px 0px 0px 0px;
}
/** Weather ***************************************/
.iconweather {
font-family: Iosevka Nerd Font;
font-size : 120px;
font-weight : normal;
margin : 15px 0px 0px 30px;
}
.label_temp {
color : #7dcfff;
font-size : 80px;
font-weight : bold;
margin : -15px 30px 0px 0px;
}
.label_stat {
color : #f7768e;
font-size : 38px;
font-weight : bold;
}
.label_quote {
color : #a9b1d6;
font-size : 18px;
font-weight : normal;
}
/** Applications ***************************************/
.appbox {
margin : 15px 0px 0px 25px;
}
.app_fox, .app_telegram, .app_discord, .app_terminal,
.app_files, .app_geany, .app_code, .app_gimp, .app_vbox {
background-repeat: no-repeat;
background-size: 64px;
min-height: 64px;
min-width: 64px;
margin: 8px 8px 0px 8px;
}
.app_fox {}
.app_telegram {}
.app_discord {}
.app_terminal {}
.app_files {}
.app_geany {}
.app_code {}
.app_gimp {}
.app_vbox {}
/** Links ***************************************/
.iconweb, .iconmail {
color: #FFFFFF;
font-family: Iosevka Nerd Font;
font-size : 70px;
font-weight : normal;
}
.iconmail {
color: #DF584E;
}
.github {
background-color: #24292E;
border-radius: 16px;
}
.reddit {
background-color: #E46231;
border-radius: 16px;
}
.twitter {
background-color: #61AAD6;
border-radius: 16px;
}
.youtube {
background-color: #DF584E;
border-radius: 16px;
}
.mail {
background-color: #FFFFFF;
border-radius: 16px;
}
.mailbox {
background-color: #E5E5E5;
border-radius: 10px;
margin: 48px 0px 48px 0px;
}
.label_mails {
color: #404040;
font-size : 32px;
font-weight : bold;
margin: 0px 12px 0px 12px;
}
/** Power buttons ***************************************/
.btn_logout, .btn_sleep, .btn_reboot, .btn_poweroff {
font-size : 48px;
font-weight : bold;
}
.btn_logout {
color: #f7768e;
}
.btn_sleep {
color: #9ece6a;
}
.btn_reboot {
color: #e0af68;
}
.btn_poweroff {
color: #7aa2f7;
}
/** Home folders ***************************************/
.hddbox {
background-color: #282C34;
border-radius: 10px;
margin : 15px;
}
.hddicon {
color: #7dcfff;
font-family: Iosevka Nerd Font;
font-size : 70px;
font-weight : normal;
margin : 25px 20px 25px 40px;
}
.hdd_label {
color: #c0caf5;
font-size : 48px;
font-weight : bold;
margin : 0px 0px 0px 15px;
}
.fs_sep {
color: #15161E;
font-size : 36px;
font-weight : bold;
}
.iconfolder1, .iconfolder2, .iconfolder3, .iconfolder4, .iconfolder5, .iconfolder6 {
font-family: Iosevka Nerd Font;
font-size : 32px;
font-weight : normal;
margin : 0px 0px 0px 75px;
}
.iconfolder1 {
color: #f7768e;
}
.iconfolder2 {
color: #9ece6a;
}
.iconfolder3 {
color: #e0af68;
}
.iconfolder4 {
color: #7dcfff;
}
.iconfolder5 {
color: #bb9af7;
}
.iconfolder6 {
color: #7aa2f7;
}
.label_folder1, .label_folder2, .label_folder3, .label_folder4, .label_folder5, .label_folder6 {
font-size : 22px;
font-weight : normal;
margin : 0px 0px 0px 30px;
}
.label_folder1 {
color: #f7768e;
}
.label_folder2 {
color: #9ece6a;
}
.label_folder3 {
color: #e0af68;
}
.label_folder4 {
color: #7dcfff;
}
.label_folder5 {
color: #bb9af7;
}
.label_folder6 {
color: #7aa2f7;
}
/** EOF *************************************************/}
+61
View File
@@ -0,0 +1,61 @@
(defpoll calendar_day :interval "20h" "date '+%d'")
(defpoll calendar_year :interval "20h" "date '+%Y'")
(defpoll HOUR :interval "5s" `date +\"%I\"`)
(defpoll MIN :interval "5s" `date +\"%M\"`)
(defpoll MER :interval "5s" `date +\"%p\"`)
(defpoll DAY :interval "5s" `date +\"%A\"`)
(defwindow example
:monitor 0
:geometry (geometry :width "100%"
:anchor "top left")
(cal)
)
(defwidget cal []
(box :class "cal" :orientation "v"
(box :class "cal-in"
(calendar :class "cal"
:day calendar_day
:year calendar_year))))
(defwindow quote
:wm-ignore true
:monitor 0
:windowtype "dock"
:geometry (geometry :x "200px"
:y "65px"
:width "170px"
:height "200px"
:anchor "top left")
(clock))
;(defwindow searchapps
; :wm-ignore: true
; :monitor 0
; :windowtype "normal"
; :geometry (geometry :x "40%"
; :y "30%"
; :width "20%"
; :height "50%"
; :anchor "top left")
;(searchapps))
(defpoll quote_text :interval "3600s" `curl ifconfig.me`)
(defwidget clock []
(box :class "genwin" :orientation "h" :spacing 50 :space-evenly false :vexpand "false" :hexpand "false"
(box :orientation "h" :spacing 0
(label :class "time_hour" :valign "start" :wrap "true" :limit-width 25 :text HOUR)
(label :class "time_min" :valign "end" :wrap "true" :limit-width 25 :text MIN))
(box :orientation "v" :spacing 0
(label :class "time_mer" :valign "start" :halign "end" :wrap "true" :limit-width 25 :text MER)
(label :class "time_day" :valign "end" :halign "end" :wrap "true" :limit-width 25 :text DAY))))
(defwidget quote[]
(box :class "quote" :orientation "v" :space-evenly false :halign "center" :valign "center"
(label :class "quote-text" :text "${quote_text}" :wrap true)))
+124
View File
@@ -0,0 +1,124 @@
# output=<not set>
# font=monospace
# dpi-aware=auto
use-bold=yes
# message=
# message-mode=wrap
# prompt="> "
placeholder="Choose an application from the list"
icon-theme=kora-grey
icons-enabled=yes
# hide-before-typing=no
# fields=filename,name,generic
# password-character=*
# filter-desktop=no
# match-mode=fzf
# sort-result=yes
# match-counter=no
# delayed-filter-ms=300
# delayed-filter-limit=20000
show-actions=no
# terminal=$TERMINAL -e # Note: you cannot actually use environment variables here
# launch-prefix=<not set>
# list-executables-in-path=no
anchor=center
# x-margin=0
# y-margin=0
# lines=15
# minimal-lines=no
width=45
tabs=2
# horizontal-pad=40
# vertical-pad=8
# inner-pad=0
# scaling-filter=box
# image-size-ratio=0.5
# gamma-correct-blending=no
# line-height=<use font metrics>
# letter-spacing=0
# layer=overlay
# keyboard-focus=exclusive
# exit-on-keyboard-focus-loss=yes
# cache=<not set>
# render-workers=<number of logical CPUs>
# match-workers=<number of logical CPUs>
# enable-mouse=yes
[colors]
background=1e1e2edd
text=cdd6f4ff
prompt=bac2deff
placeholder=7f849cff
input=cdd6f4ff
match=f38ba8ff
selection-text=ff2400
selection-match=f38ba8ff
counter=7f849cff
border=f38ba8ff
[border]
width=0
radius=10
[dmenu]
# mode=text # text|index
# exit-immediately-if-empty=no
[key-bindings]
# cancel=Escape Control+g Control+c Control+bracketleft
# execute=Return KP_Enter Control+y
# execute-or-next=Tab
# execute-input=Shift+Return Shift+KP_Enter
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-line=Control+Shift+BackSpace
# delete-prev=BackSpace Control+h
# delete-prev-word=Mod1+BackSpace Control+BackSpace Control+w
# delete-line-backward=Control+u
# delete-next=Delete KP_Delete Control+d
# delete-next-word=Mod1+d Control+Delete Control+KP_Delete
# delete-line-forward=Control+k
# prev=Up Control+p
# prev-with-wrap=ISO_Left_Tab
# prev-page=Page_Up KP_Page_Up
# next=Down Control+n
# next-with-wrap=none
# next-page=Page_Down KP_Page_Down
# expunge=Shift+Delete
# clipboard-paste=Control+v XF86Paste
# primary-paste=Shift+Insert Shift+KP_Insert
# custom-N: *dmenu mode only*. Like execute, but with a non-zero
# exit-code; custom-1 exits with code 10, custom-2 with 11, custom-3
# with 12, and so on.
# custom-1=Mod1+1
# custom-2=Mod1+2
# custom-3=Mod1+3
# custom-4=Mod1+4
# custom-5=Mod1+5
# custom-6=Mod1+6
# custom-7=Mod1+7
# custom-8=Mod1+8
# custom-9=Mod1+9
# custom-10=Mod1+0
# custom-11=Mod1+exclam
# custom-12=Mod1+at
# custom-13=Mod1+numbersign
# custom-14=Mod1+dollar
# custom-15=Mod1+percent
# custom-16=Mod1+dead_circumflex
# custom-17=Mod1+ampersand
# custom-18=Mod1+asterix
# custom-19=Mod1+parentleft
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -1,2 +1,4 @@
enable_selector = false
selector = "rofi -dmenu -p 'Open With: '"
selector = "rofi -dmenu -i -p 'Open With: '"
term_exec_args = '-e'
expand_wildcards = false
+28
View File
@@ -0,0 +1,28 @@
#!/bin/sh
# Changes the wallpaper to a randomly chosen image in a given directory
# at a set interval.
DEFAULT_INTERVAL=300 # In seconds
if [ $# -lt 1 ] || [ ! -d "$1" ]; then
printf "Usage:\n\t\e[1m%s\e[0m \e[4mDIRECTORY\e[0m [\e[4mINTERVAL\e[0m]\n" "$0"
printf "\tChanges the wallpaper to a randomly chosen image in DIRECTORY every\n\tINTERVAL seconds (or every %d seconds if unspecified)." "$DEFAULT_INTERVAL"
exit 1
fi
# See awww-img(1)
RESIZE_TYPE="stretch"
export AWWW_TRANSITION_FPS="${AWWW_TRANSITION_FPS:-144}"
export AWWW_TRANSITION_STEP="${AWWW_TRANSITION_STEP:-2}"
while true; do
find "$1" -type f \
| while read -r img; do
echo "$(</dev/urandom tr -dc a-zA-Z0-9 | head -c 8):$img"
done \
| sort -n | cut -d':' -f2- \
| while read -r img; do
awww img --resize="$RESIZE_TYPE" "$img"
sleep "${2:-$DEFAULT_INTERVAL}"
done
done
+251
View File
@@ -0,0 +1,251 @@
-- env vars
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
hl.env("XDG_SESSION_TYPE", "wayland")
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
hl.env("LIBVA_DRIVER_NAME", "nvidia")
hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
hl.env("QT_QPA_PLATFORM", "wayland;xcb")
hl.env("QT_QPA_PLATFORMTHEME", "gtk3")
hl.env("XCURSOR_SIZE", "24")
hl.env("HYPRCURSOR_SIZE", "24")
hl.env("DISPLAY", ":0")
hl.env("USE_X11", "false")
-- monitors
hl.monitor({
output = "HDMI-A-2",
mode = "2560x1440@143.99899",
position = "1920x0",
scale = "1.25",
})
hl.monitor({
output = "DP-4",
mode = "1920x1080@143.99",
position = "0x0",
scale = "auto",
})
local home = os.getenv("HOME")
hl.on("hyprland.start", function ()
-- gentoo specific
hl.exec_cmd("/usr/libexec/hyprpolkitagent")
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
hl.exec_cmd("hyprpm reload") -- set up plugins
hl.exec_cmd("hyprctl setcursor Adwaita 24") -- set cursor to be normal
hl.exec_cmd("wl-paste --watch cliphist store")
hl.exec_cmd("mako")
hl.exec_cmd("awww-daemon")
hl.exec_cmd(home .. "/.config/hypr/awww_randomize.sh " .. home .. "/.wallpapers/2k")
hl.exec_cmd("qs -d -p " .. home .. "/.config/quickshell/shell.qml")
end)
-- Refer to https://wiki.hypr.land/Configuring/Basics/Variables/
hl.config({
general = {
gaps_in = 4,
gaps_out = 5,
border_size = 2,
col = {
active_border = "rgba(0DB7D455)",
inactive_border = "rgba(595959aa)",
},
resize_on_border = true,
no_focus_fallback = true,
allow_tearing = true,
layout = "scrolling",
},
decoration = {
rounding = 10,
rounding_power = 2.5,
shadow = {
enabled = false,
range = 4,
render_power = 3,
color = 0xee1a1a1a,
},
blur = {
enabled = true,
xray = true,
size = 6,
passes = 1,
vibrancy = 0.1696,
},
dim_inactive=true,
dim_strength=0.1,
dim_special=0.2,
},
input = {
kb_layout = "us",
follow_mouse = 2,
off_window_axis_events = 2,
},
animations = {
enabled = true,
},
misc = {
force_default_wallpaper = 0,
vrr = 0,
disable_hyprland_logo = true,
disable_splash_rendering = true,
mouse_move_enables_dpms = true,
key_press_enables_dpms = true
},
dwindle = {
preserve_split = true, -- You probably want this
},
master = {
new_status = "master",
},
scrolling = {
fullscreen_on_one_column = false,
},
})
-- Default curves and animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/
hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1} } })
hl.curve("easeInOutCubic", { type = "bezier", points = { {0.65, 0.05}, {0.36, 1} } })
hl.curve("linear", { type = "bezier", points = { {0, 0}, {1, 1} } })
hl.curve("almostLinear", { type = "bezier", points = { {0.5, 0.5}, {0.75, 1} } })
hl.curve("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } })
-- Default springs
hl.curve("easy", { type = "spring", mass = 1, stiffness = 238.1191, dampening = 24.21279333 })
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
hl.animation({ leaf = "windows", enabled = true, speed = 4.79, spring = "easy" })
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, spring = "easy", style = "popin 87%" })
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" })
hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" })
hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" })
hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" })
hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" })
hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" })
hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" })
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
hl.animation({ leaf = "workspaces", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" })
hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" })
local terminal = "alacritty"
local fileManager = "thunar"
local menu = "fuzzel"
local mainMod = "SUPER" -- Sets "Windows" key as main modifier
-- Example binds, see https://wiki.hypr.land/Configuring/Basics/Binds/ for more
hl.bind(mainMod .. " + RETURN", hl.dsp.exec_cmd(terminal))
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd(menu))
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'"))
hl.bind(mainMod .. " + SPACE", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen_state({ internal="1", client="1", layout_aware=true, action = "toggle"}))
hl.bind(mainMod .. " + SHIFT + Q", hl.dsp.window.close())
-- change focus
hl.bind(mainMod .. " + LEFT", hl.dsp.focus({ direction = "left" }))
hl.bind(mainMod .. " + RIGHT", hl.dsp.focus({ direction = "right" }))
hl.bind(mainMod .. " + UP", hl.dsp.focus({ direction = "up" }))
hl.bind(mainMod .. " + DOWN", hl.dsp.focus({ direction = "down" }))
-- move workspaces
hl.bind(mainMod .. " + SHIFT + LEFT", hl.dsp.window.swap({ direction = "left"}))
hl.bind(mainMod .. " + SHIFT + RIGHT", hl.dsp.window.swap({ direction = "right"}))
hl.bind(mainMod .. " + SHIFT + UP", hl.dsp.window.swap({ direction = "up"}))
hl.bind(mainMod .. " + SHIFT + DOWN", hl.dsp.window.swap({ direction = "down"}))
-- screenshots
hl.bind("Print", hl.dsp.exec_cmd("grim -g \"$(slurp)\" ~/$(date + '%Y%m%d-%H%M%S').png")) -- dump to home
hl.bind("SUPER + Print", hl.dsp.exec_cmd(
"grim -g \"$(slurp)\" - | wl-copy"
)) -- copy to clipboard
-- hy3 settings
local hy3 = hl.plugin.hy3
hl.bind(mainMod .. " + V", hy3.make_group("v"))
hl.bind(mainMod .. " + H", hy3.make_group("h"))
hl.bind(mainMod .. " + T", hy3.make_group("tab"))
hl.bind(mainMod .. " + CTRL + LEFT", hy3.focus_tab({ direction = "left" }))
hl.bind(mainMod .. " + CTRL + RIGHT", hy3.focus_tab({ direction = "right" }))
-- Switch workspaces with mainMod + [0-9]
-- Move active window to a workspace with mainMod + SHIFT + [0-9]
for i = 1, 10 do
local key = i % 10 -- 10 maps to key 0
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i}))
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
end
-- scratchpad
hl.bind(mainMod .. " + MINUS", hl.dsp.workspace.toggle_special("magic"))
hl.bind(mainMod .. " + SHIFT + MINUS", hl.dsp.window.move({ workspace = "special:magic" }))
-- Scroll through existing workspaces with mainMod + scroll
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
-- Move/resize windows with mainMod + LMB/RMB and dragging
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
-- Laptop multimedia keys for volume and LCD brightness
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true })
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true })
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true })
-- Requires playerctl
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
local suppressMaximizeRule = hl.window_rule({
-- Ignore maximize requests from all apps. You'll probably like this.
name = "suppress-maximize-events",
match = { class = ".*" },
suppress_event = "maximize",
})
suppressMaximizeRule:set_enabled(true)
hl.window_rule({
-- Fix some dragging issues with XWayland
name = "fix-xwayland-drags",
match = {
class = "^$",
title = "^$",
xwayland = true,
float = true,
fullscreen = false,
pin = false,
},
no_focus = true,
})
require("rules")
+34
View File
@@ -0,0 +1,34 @@
-- floating
hl.window_rule({match = {title = "^(Open File)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Open File)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Select a File)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Select a File)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Choose wallpaper)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Choose wallpaper)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Choose wallpaper)(.*)$" }, size = {"(monitor_w*0.60)", "(monitor_h*0.65)"} })
hl.window_rule({match = {title = "^(Open Folder)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Open Folder)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Save As)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Save As)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(Library)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(Library)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(File Upload)(.*)$" }, center = true})
hl.window_rule({match = {title = "^(File Upload)(.*)$" }, float = true})
hl.window_rule({match = {title = "^(.*)(wants to save)$" }, center = true})
hl.window_rule({match = {title = "^(.*)(wants to save)$" }, float = true})
hl.window_rule({match = {title = "^(.*)(wants to open)$" }, center = true})
hl.window_rule({match = {title = "^(.*)(wants to open)$" }, float = true})
hl.window_rule({match = {class = "hyprland-share-picker" }, float = true})
hl.window_rule({match = {title = "(.*)(Settings)(.*)$" },float = true})
-- aesthetics
hl.layer_rule({
match = {namespace = "quickshell"},
blur = true,
blur_popups = true
})
hl.layer_rule({
match = { class = "fuzzel"},
blur = true,
})
+15 -32
View File
@@ -15,25 +15,6 @@ set $mod Mod4
# is used in the bar {} block below.
font pango:Dejavu Sans Mono 12
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
#exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
#exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
@@ -46,7 +27,7 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec prime-run alacritty
# kill focused window
bindsym $mod+Shift+q kill
@@ -54,10 +35,9 @@ bindsym $mod+Shift+q kill
# custom bindings
# start dmenu (a program launcher)
bindsym $mod+d exec "rofi -combi-modi window,drun -show combi -modi combi -show-icons"
bindsym $mod+p exec rofi-pass
bindsym --release Print exec --no-startup-id /home/frosty/.scripts/screenshot-to-clipboard.sh
bindsym $mod+Print exec --no-startup-id /home/frosty/.scripts/screenshot-to-file.sh
bindsym $mod+Shift+c exec --no-startup-id ~/Programs/Rust/UnifiedCopyPaste/scripts/rofi-clipboard-selector.sh
bindsym $mod+p exec bwmenu
bindsym --release Print exec --no-startup-id ~/.config/scripts/screenshot-to-clipboard.sh
bindsym $mod+Print exec --no-startup-id ~/.config/scripts/screenshot-to-file.sh
bindsym $mod+x [urgent=latest] focus
bindsym $mod+c exec "rofi -show calc -modi calc -no-show-match -no-sort"
# Make the currently focused window a scratchpad
@@ -104,7 +84,7 @@ bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+Home exec /home/frosty/.config/i3/lock.sh
bindsym $mod+Home exec ~/.config/i3/lock.sh
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
@@ -189,12 +169,12 @@ mode "resize" {
bindsym $mod+r mode "resize"
focus_follows_mouse no
set_from_resource $FOCUS iw3m.color2
set_from_resource $URGENT iw3m.color1
set_from_resource $UNFOCUS iw3m.color7
#set_from_resource $FOCUS iw3m.color2
#set_from_resource $URGENT iw3m.color1
#set_from_resource $UNFOCUS iw3m.color7
client.focused $FOCUS $FOCUS "#FFFFFF" $FOCUS $FOCUS
client.urgent $URGENT $URGENT "#FFFFFF" $URGENT $URGENT
#client.focused $FOCUS $FOCUS "#FFFFFF" $FOCUS $FOCUS
#client.urgent $URGENT $URGENT "#FFFFFF" $URGENT $URGENT
# default colors
client.focused_inactive #333333 #222222 #888888 #292d2e #222222
@@ -214,5 +194,8 @@ hide_edge_borders none
gaps inner 0
gaps outer 0
exec_always --no-startup-id /home/frosty/.config/dunst/start.sh
exec_always --no-startup-id /home/frosty/.config/polybar/launch.sh
exec_always --no-startup-id ~/.config/wired/start.sh
exec_always --no-startup-id feh --bg-scale --randomize ~/.wallpapers/
# wal -i ~/.wallpapers
#exec_always --no-startup-id ~/.config/dunst/start.sh
exec_always --no-startup-id ~/.config/polybar/launch.sh
+7
View File
@@ -0,0 +1,7 @@
background-color=#4A4A4A
border-size=0
font=Mononoki Nerd Font 14
default-timeout=10000
max-visible=3
layer=overlay
border-radius=5
Executable
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
trap "killall -q mako" EXIT
mako
+4
View File
@@ -0,0 +1,4 @@
notify=true
[notification_format]
body = "%album\n%artists"
+33
View File
@@ -0,0 +1,33 @@
killall -q playerctl
# delete all the copied image files first
find "$HOME/.config/ncspot/" -type f -exec sh -c 'file -b --mime-type "$0" | grep -q "^image/" && rm "$0"' {} \;
playerctl metadata --follow --format '{{ mpris:trackid }}' | while read -r line; do
title=$(playerctl metadata title)
album=$(playerctl metadata album)
artist=$(playerctl metadata artist)
art_url=$(playerctl metadata mpris:artUrl)
ap="${art_url##*/}"
if [[ -n $ap ]]; then
cfp="$HOME/.cache/ncspot/covers/$ap"
# should have a timeout
counter=0
until [ -e $cfp ]; do
sleep 1
# counter=$((counter + 1))
# if [ "$counter" -eq 60 ]; then
# break
# fi
done
MIME_TYPE=$(file -b --mime-type "$cfp")
SUB_TYPE=$(echo "$MIME_TYPE" | cut -d'/' -f2)
curr_dir="$HOME/.cache/ncspot"
nfp="$curr_dir/$ap.$SUB_TYPE"
cp $cfp $nfp
# Extract the subtype (e.g., "jpeg", "plain")
SUB_TYPE=$(echo "$MIME_TYPE" | cut -d'/' -f2)
notify-send -a ncspot "$title" "$album\n$artist" --hint=string:image-path:$nfp --icon "/usr/share/icons/Papirus-Dark/24x24/devices/audio-speakers.svg"
fi
done
+607
View File
@@ -0,0 +1,607 @@
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://niri-wm.github.io/niri/Configuration:-Introduction
// Input device configuration.
// Find the full list of options on the wiki:
// https://niri-wm.github.io/niri/Configuration:-Input
environment {
XDG_SESSION_TYPE "wayland"
MOZ_ENABLE_WAYLAND "1"
GTK_USE_PORTAL "1"
GDK_BACKEND "wayland"
QT_QPA_PLATFORM "wayland"
QT_WAYLAND_DISABLE_WINDOWDECORATION "1"
QT_QPA_PLATFORMTHEME "qt6ct"
SDL_VIDEODRIVER "wayland"
ELECTRON_OZONE_PLATFORM_HINT "wayland"
XDG_CURRENT_DESKTOP "niri"
QT_STYLE_OVERRIDE "kvantum"
}
input {
keyboard {
xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
// For example:
// layout "us,ru"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
// If this section is empty, niri will fetch xkb settings
// from org.freedesktop.locale1. You can control these using
// localectl set-x11-keymap.
}
// Enable numlock on startup, omitting this setting disables it.
numlock
}
// Next sections include libinput settings.
// Omitting settings disables them, or leaves them at their default values.
// All commented-out settings here are examples, not defaults.
touchpad {
// off
tap
// dwt
// dwtp
// drag false
// drag-lock
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "two-finger"
// disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "no-scroll"
}
trackpoint {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "on-button-down"
// scroll-button 273
// scroll-button-lock
// middle-emulation
}
// Uncomment this to make the mouse warp to the center of newly focused windows.
// warp-mouse-to-focus
// Focus windows and outputs automatically when moving the mouse into them.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
// focus-follows-mouse max-scroll-amount="0%"
}
// You can configure outputs by their name, which you can find
// by running `niri msg outputs` while inside a niri instance.
// The built-in laptop monitor is usually called "eDP-1".
// Find more information on the wiki:
// https://niri-wm.github.io/niri/Configuration:-Outputs
// Remember to uncomment the node by removing "/-"!
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://niri-wm.github.io/niri/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
gaps 16
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
// or right edge of the screen.
// - "always", the focused column will always be centered.
// - "on-overflow", focusing a column will center it if it doesn't fit
// together with the previously focused column.
center-focused-column "never"
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
proportion 0.33333
proportion 0.5
proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// fixed 1920
}
// You can also customize the heights that "switch-preset-window-height" (Mod+Ctrl+Shift+R) toggles between.
// preset-window-heights { }
// You can change the default width of the new windows.
default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
// default-column-width {}
// By default focus ring and border are rendered as a solid background rectangle
// behind windows. That is, they will show up through semitransparent windows.
// This is because windows using client-side decorations can have an arbitrary shape.
//
// If you don't like that, you should uncomment `prefer-no-csd` below.
// Niri will draw focus ring and border *around* windows that agree to omit their
// client-side decorations.
//
// Alternatively, you can override it with a window rule called
// `draw-border-with-background`.
// You can change how the focus ring looks.
focus-ring {
// Uncomment this line to disable the focus ring.
// off
// How many logical pixels the ring extends out from the windows.
width 2
// Colors can be set in a variety of ways:
// - CSS named colors: "red"
// - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
// Color of the ring on the active monitor.
active-color "#7fc8ff"
// Color of the ring on inactive monitors.
//
// The focus ring only draws around the active window, so the only place
// where you can see its inactive-color is on other monitors.
inactive-color "#505050"
// You can also use gradients. They take precedence over solid colors.
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
// The angle is the same as in linear-gradient, and is optional,
// defaulting to 180 (top-to-bottom gradient).
// You can use any CSS linear-gradient tool on the web to set these up.
// Changing the color space is also supported, check the wiki for more info.
//
// active-gradient from="#80c8ff" to="#c7ff7f" angle=45
// You can also color the gradient relative to the entire view
// of the workspace, rather than relative to just the window itself.
// To do that, set relative-to="workspace-view".
//
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// You can also add a border. It's similar to the focus ring, but always visible.
border {
// The settings are the same as for the focus ring.
// If you enable the border, you probably want to disable the focus ring.
off
width 4
active-color "#ffc87f"
inactive-color "#505050"
// Color of the border around windows that request your attention.
urgent-color "#9b0000"
// Gradients can use a few different interpolation color spaces.
// For example, this is a pastel rainbow gradient via in="oklch longer hue".
//
// active-gradient from="#e5989b" to="#ffb4a2" angle=45 relative-to="workspace-view" in="oklch longer hue"
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// You can enable drop shadows for windows.
shadow {
// Uncomment the next line to enable shadows.
on
// By default, the shadow draws only around its window, and not behind it.
// Uncomment this setting to make the shadow draw behind its window.
//
// Note that niri has no way of knowing about the CSD window corner
// radius. It has to assume that windows have square corners, leading to
// shadow artifacts inside the CSD rounded corners. This setting fixes
// those artifacts.
//
// However, instead you may want to set prefer-no-csd and/or
// geometry-corner-radius. Then, niri will know the corner radius and
// draw the shadow correctly, without having to draw it behind the
// window. These will also remove client-side shadows if the window
// draws any.
//
// draw-behind-window true
// You can change how shadows look. The values below are in logical
// pixels and match the CSS box-shadow properties.
// Softness controls the shadow blur radius.
softness 30
// Spread expands the shadow.
spread 10
// Offset moves the shadow relative to the window.
offset x=0 y=5
// You can also change the shadow color and opacity.
color "#0007"
}
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
// You can think of them as a kind of outer gaps. They are set in logical pixels.
// Left and right struts will cause the next window to the side to always be visible.
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
// layer-shell panels and regular gaps.
struts {
// left 64
// right 64
// top 64
// bottom 64
}
}
hotkey-overlay {
// Uncomment this line to disable the "Important Hotkeys" pop-up at startup.
skip-at-startup
}
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
// This option will also fix border/focus ring drawing behind some semitransparent windows.
// After enabling or disabling this, you need to restart the apps for this to take effect.
prefer-no-csd
// You can change the path where screenshots are saved.
// A ~ at the front will be expanded to the home directory.
// The path is formatted with strftime(3) to give you the screenshot date and time.
screenshot-path "~/Screenshot from %Y-%m-%d %H-%M-%S.png"
// You can also set this to null to disable saving screenshots to disk.
// screenshot-path null
// Animation settings.
// The wiki explains how to configure individual animations:
// https://niri-wm.github.io/niri/Configuration:-Animations
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
slowdown 0.5
}
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://niri-wm.github.io/niri/Configuration:-Window-Rules
// Work around WezTerm's initial configure bug
// by setting an empty default-column-width.
window-rule {
// This regular expression is intentionally made as specific as possible,
// since this is the default config, and we want no false positives.
// You can get away with just app-id="wezterm" if you want.
match app-id=r#"^org\.wezfurlong\.wezterm$"#
default-column-width {}
}
// Open the Firefox picture-in-picture player as floating by default.
window-rule {
// This app-id regular expression will work for both:
// - host Firefox (app-id is "firefox")
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
}
// Example: block out two password managers from screen capture.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
block-out-from "screen-capture"
// Use this instead if you want them visible on third-party screenshot tools.
// block-out-from "screencast"
}
// Example: enable rounded corners for all windows.
// (This example rule is commented out with a "/-" in front.)
window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
// like wev.
//
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
//
// Most actions that you can bind here can also be invoked programmatically with
// `niri msg action do-something`.
// Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; }
Mod+D { spawn "vicinae" "toggle"; }
//Mod+D hotkey-overlay-title="Run an Application: rofi" { spawn "rofi" "-combi-modi" "window,drun" "-show" "combi" "-modi" "combi" "-show-icons"; }
Mod+Shift+Home hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock" "--screenshots" "--effect-pixelate" "10" "--clock"; }
Mod+Shift+Minus { spawn "nirius" "scratchpad-toggle"; }
Mod+Minus { spawn "nirius" "scratchpad-show"; }
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
// Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`.
// For example, this is a standard bind to toggle the screen reader (orca).
Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; }
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
// Using spawn-sh allows to pass multiple arguments together with the command.
// "-l 1.0" limits the volume to 100%.
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+ -l 1.0"; }
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"; }
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
// Example media keys mapping using playerctl.
// This will work with any MPRIS-enabled media player.
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
XF86AudioPause allow-when-locked=true { spawn-sh "playerctl play-pause"; }
XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
// Example brightness key mappings for brightnessctl.
// You can use regular spawn with multiple arguments too (to avoid going through "sh"),
// but you need to manually put each argument in separate "" quotes.
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
// Open/close the Overview: a zoomed-out view of workspaces and windows.
// You can also move the mouse into the top-left hot corner,
// or do a four-finger swipe up on a touchpad.
Mod+O repeat=false { toggle-overview; }
Mod+Shift+Q repeat=false { close-window; }
Mod+Left { focus-column-left; }
Mod+Down { focus-window-down; }
Mod+Up { focus-window-up; }
Mod+Right { focus-column-right; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
Mod+Ctrl+Left { move-column-left; }
Mod+Ctrl+Down { move-window-down; }
Mod+Ctrl+Up { move-window-up; }
Mod+Ctrl+Right { move-column-right; }
Mod+Ctrl+H { move-column-left; }
Mod+Ctrl+J { move-window-down; }
Mod+Ctrl+K { move-window-up; }
Mod+Ctrl+L { move-column-right; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Shift+Left { focus-monitor-left; }
Mod+Shift+Down { focus-monitor-down; }
Mod+Shift+Up { focus-monitor-up; }
Mod+Shift+Right { focus-monitor-right; }
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
// ...
// And you can also move a whole workspace to another monitor:
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
Mod+Ctrl+U { move-column-to-workspace-down; }
Mod+Ctrl+I { move-column-to-workspace-up; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
// ...
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
// You can bind mouse wheel scroll ticks using the following syntax.
// These binds will change direction based on the natural-scroll setting.
//
// To avoid scrolling through workspaces really fast, you can use
// the cooldown-ms property. The bind will be rate-limited to this value.
// You can set a cooldown on any bind, but it's most useful for the wheel.
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
// Usually scrolling up and down with Shift in applications results in
// horizontal scrolling; these binds replicate that.
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
// discrete intervals.
// These binds are also affected by touchpad's natural-scroll, so these
// example binds are "inverted", since we have natural-scroll enabled for
// touchpads by default.
// Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; }
// Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; }
// You can refer to workspaces by index. However, keep in mind that
// niri is a dynamic workspace system, so these commands are kind of
// "best effort". Trying to refer to a workspace index bigger than
// the current workspace count will instead refer to the bottommost
// (empty) workspace.
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
// Switches focus between the current and the previous workspace.
// Mod+Tab { focus-workspace-previous; }
// The following binds move the focused window in and out of a column.
// If the window is alone, they will consume it into the nearby column to the side.
// If the window is already in a column, they will expel it out.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
// Consume one window from the right to the bottom of the focused column.
Mod+Comma { consume-window-into-column; }
// Expel the bottom window from the focused column to the right.
Mod+Period { expel-window-from-column; }
// Cycle through widths set in preset-column-widths.
Mod+R { switch-preset-column-width; }
// Cycling through the presets in reverse order is also possible.
Mod+Shift+R { switch-preset-column-width-back; }
Mod+Ctrl+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
// While maximize-column leaves gaps and borders around the window,
// maximize-window-to-edges doesn't: the window expands to the edges of the screen.
// This bind corresponds to normal window maximizing,
// e.g. by double-clicking on the titlebar.
Mod+M { maximize-window-to-edges; }
Mod+N { spawn "swaync-client" "-t" "-sw"; }
// Expand the focused column to space not taken up by other fully visible columns.
// Makes the column "fill the rest of the space".
Mod+Ctrl+F { expand-column-to-available-width; }
Mod+C { center-column; }
// Center all fully visible columns on screen.
Mod+Ctrl+C { center-visible-columns; }
//Mod+Minus { set-column-width "-10%"; }
//Mod+Equal { set-column-width "+10%"; }
// Finer height adjustments when in column with other windows.
//Mod+Shift+Minus { set-window-height "-10%"; }
//Mod+Shift+Equal { set-window-height "+10%"; }
// Move the focused window between the floating and the tiling layout.
Mod+Space { toggle-window-floating; }
Mod+Shift+Space { switch-focus-between-floating-and-tiling; }
// Toggle tabbed column display mode.
// Windows in this column will appear as vertical tabs,
// rather than stacked on top of each other.
Mod+W { toggle-column-tabbed-display; }
// Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have
// a matching layout switch hotkey configured in xkb options above.
// Having both at once on the same hotkey will break the switching,
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Space { switch-layout "next"; }
// Mod+Shift+Space { switch-layout "prev"; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
// Applications such as remote-desktop clients and software KVM switches may
// request that niri stops processing the keyboard shortcuts defined here
// so they may, for example, forward the key presses as-is to a remote machine.
// It's a good idea to bind an escape hatch to toggle the inhibitor,
// so a buggy application can't hold your session hostage.
//
// The allow-inhibiting=false property can be applied to other binds as well,
// which ensures niri always processes them, even when an inhibitor is active.
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
//Ctrl+Alt+Delete { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
}
spawn-at-startup "waybar"
spawn-at-startup "udiskie" "--tray"
spawn-at-startup "swaync"
spawn-sh-at-startup "wl-paste --watch cliphist store"
spawn-sh-at-startup "~/.config/scripts/set_wallpaper.sh"
spawn-sh-at-startup "~/.config/scripts/import_gsettings.sh"
spawn-sh-at-startup "niriusd"
spawn-sh-at-startup "vicinae server"
// forces running on nvidia card
debug {
render-drm-device "/dev/dri/renderD128"
}
+27 -2
View File
@@ -15,8 +15,33 @@ List workspace folders | <space>wl
## Gitsigns
Toggle deleted | <leader>td
Diff | <leader> hd
Preview hunk | <leader> hp
Diff | <leader>hd
Preview hunk | <leader>hp
Reset hunk | <leader>hr
## Comment
Line (normal & visual mode )| gc
Block (normal & visual mode) | gb
At the end of a line | gcA
## Surround
With () | ysiw)
With "" | ys$"
Del [] | ds]
Del HTML | dst
'' -> "" & "" -> '' | cs'"
Change HTML tag to [TAG] | cst[TAG]<CR>
Del () in fn call; fn(param) -> param | dsf
## Dial
Increment | <C-a>
Decrement | <C-x>
## Misc
Outline | <leader>o
Trouble | <leader>xx
Find in project | <leader>f
Open filetree | <leader>v
Edit luaconfig | <leader>ec
Source luaconfig | <leader>sc
Open diagnostic info in floating window |<leader>dd
-2
View File
@@ -1,2 +0,0 @@
let g:neovide_refresh_rate=140
let g:coq_settings = { 'auto_start': 'shut-up' }
+43 -317
View File
@@ -1,5 +1,11 @@
-- some basic options
local vim = vim
local fn = vim.fn
vim.g.mapleader = "\\"
vim.g.maplocalleader = "\\"
vim.g.noswapfile = true
vim.g.python3_host_prog = fn.exepath("python3")
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 2
@@ -9,30 +15,30 @@ vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.smarttab = true
vim.opt.number = true
vim.o.hidden = true
vim.o.signcolumn = 'auto'
vim.o.breakindent = true
vim.o.smarttab = true
vim.o.errorbells = true
vim.o.clipboard = "unnamedplus"
vim.g.noswapfile = true
vim.cmd [[set mouse=a]] -- enable mouse
vim.wo.cursorline = true
vim.opt.hlsearch = false
vim.opt.wrap = true
vim.opt.linebreak = true
vim.opt.showmatch = true
vim.g.python3_host_prog = '/home/frosty/.dotfiles/nvim/env/bin/python'
vim.api.nvim_create_user_command('W', 'write', {})
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
vim.opt.shortmess = vim.opt.shortmess + "c"
vim.opt.autochdir = true
vim.opt.spelllang = 'en_us'
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
-- hit zc to enable folding
vim.o.foldenable = false
vim.o.laststatus = 3
vim.o.cmdheight = 0 -- hides commandbar when not in use, looks ok
vim.o.hidden = true
vim.o.signcolumn = 'auto'
-- vim.o.breakindent = false -- I think this looks bad
vim.o.errorbells = true
vim.o.clipboard = "unnamedplus"
vim.o.mouse = 'a'
vim.o.mousemoveevent = true
vim.wo.cursorline = true
vim.g.neomake_open_list = 2
vim.api.nvim_create_user_command('W', 'write', {})
function map(mode, shortcut, command)
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
@@ -48,313 +54,33 @@ function imap(shortcut, command)
map('i', shortcut, command)
end
vim.opt.guifont = "Iosevka Nerd Font:h12"
if vim.g.neovide then
vim.g.neovide_refresh_rate = 140
-- change to whatever font you prefer
-- can check font with fc-cache on linux
vim.g.neovide_hide_mouse_when_typing = true
vim.g.neovide_refresh_rate_idle = 140
vim.g.neovide_scale_factor = 1.0
-- zoom with CTRL - and CTRL +
local change_scale_factor = function(delta)
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
end
vim.keymap.set("n", "<C-=>", function()
change_scale_factor(1.25)
end)
vim.keymap.set("n", "<C-->", function()
change_scale_factor(1 / 1.25)
end)
end
nmap("<leader>ec", ':edit ' .. vim.fn.stdpath('config') .. '/init.lua<CR>')
-- <leader> is leader key; default is \
nmap("<leader>v", "<cmd>NvimTreeToggle<cr>")
nmap("<leader>ec", "<cmd>e ~/.config/nvim/init.lua<cr>")
nmap("<leader>sc", "<cmd>source ~/.config/nvim/init.lua<cr><cmd>PackerSync<cr>")
-- buffer commands
nmap("<leader>b", "<cmd>BufferLineCyclePrev<cr>")
nmap("<leader>n", "<cmd>BufferLineCycleNext<cr>")
nmap("<leader>gb", "<cmd>BufferLinePick<cr>")
nmap("<leader>w", "<cmd>bdelete!<cr>")
nmap("<leader>f", "<cmd>Telescope live_grep<cr>")
-- toggle terminal in both modes
nmap("<leader>t", "<cmd>FloatermToggle<cr>")
map("t", "<leader>t", "<cmd>FloatermToggle<cr>")
nmap("<leader>dd", "<cmd>lua vim.diagnostic.open_float() <CR>")
local augroup = vim.api.nvim_create_augroup("Lspformatting", {})
-- lsp on_attach mappings
local on_attach = function(client, bufnr)
if (not bufnr) then
return
end
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>f', '<cmd>lua vim.lsp.buf.format({ async = true })<CR>', bufopts)
require "coq".lsp_ensure_capabilities {}
require 'illuminate'.on_attach(client)
-- format on save does not work for python for some reason
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ bufnr = bufnr })
end
})
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
local lsp = require "lspconfig"
lsp.hls.setup { on_attach = on_attach } -- haskell language server
lsp.ccls.setup { on_attach = on_attach }
lsp.pyright.setup { on_attach = on_attach }
-- https://github.com/denoland/deno - maybe switch?
lsp.tsserver.setup { on_attach = on_attach }
lsp.marksman.setup { on_attach = on_attach }
lsp.rust_analyzer.setup { on_attach = on_attach }
lsp.lua_ls.setup { on_attach = on_attach,
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
}
}
}
vim.cmd("colorscheme carbonfox")
-- kill eslint_d on exit
local on_leave_group = vim.api.nvim_create_augroup("OnLeaveGroup", {})
vim.api.nvim_create_autocmd("VimLeave", {
group = on_leave_group,
command = "silent !killall -q eslint_d",
require("lazy").setup({
spec = {
{ import = "plugins" }
},
checker = { enabled = true }
})
-- packer boilerplate
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim',
install_path })
end
-- add code actions listeners?
--lua/code_action_utils.lua
--[[local M = {}
local lsp_util = vim.lsp.util
function M.code_action_listener()
local context = { diagnostics = vim.lsp.diagnostic.get_line_diagnostics() }
local params = lsp_util.make_range_params()
params.context = context
vim.lsp.buf_request(0, 'textDocument/codeAction', params, function(err, result, ctx, config)
-- do something with result - e.g. check if empty and show some indication such as a sign
end)
end
return M]]
--
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'nvim-lua/plenary.nvim'
--[[use { "lukas-reineke/lsp-format.nvim",
config = function()
require("lsp-format").setup {
python = {
exclude = { "pyright" },
},
javascript = {
exclude = { "tsserver" }
}
}
end,
requires = { 'neovim/nvim-lspconfig' }
}]]
--
use 'neovim/nvim-lspconfig'
use {
'ms-jpq/coq_nvim',
branch = 'coq',
event = "VimEnter",
config = 'vim.cmd[[COQnow]]'
}
use { 'ms-jpq/coq.artifacts', branch = 'artifacts' }
use { 'ms-jpq/coq.thirdparty', branch = '3p' }
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate',
config = function()
require('nvim-treesitter.configs').setup {
highlight = {
enable = true
},
}
end
}
use { 'kyazdani42/nvim-tree.lua',
requires = {
'kyazdani42/nvim-web-devicons'
},
config = function() require('nvim-tree').setup {} end
}
--use { 'jose-elias-alvarez/typescript.nvim',
-- config = function() require("typescript")
use {
'jose-elias-alvarez/null-ls.nvim',
config = function()
local null_ls = require("null-ls")
local lsp_conf = require("lspconfig")
-- util.root_pattern returns a function
local find_pyproject = lsp_conf.util.root_pattern('pyproject.toml')
local find_flake8 = lsp_conf.util.root_pattern('.flake8')
local isort = null_ls.builtins.formatting.isort.with({
cwd = function(params)
return find_pyproject(params.root) or params.root
end
})
local black = null_ls.builtins.formatting.black.with({
extra_args = { "--config", "pyproject.toml" },
cwd = function(params)
return find_pyproject(params.root) or params.root
end
})
local flake8 = null_ls.builtins.diagnostics.flake8.with({
cwd = function(params)
return find_flake8(params.root) or params.root
end
})
local eslint_d_format = null_ls.builtins.formatting.eslint_d
local eslint_d_diag = null_ls.builtins.diagnostics.eslint_d
local eslint_d_code = null_ls.builtins.code_actions.eslint_d
local gitsigns = null_ls.builtins.code_actions.gitsigns
null_ls.setup {
on_attach = on_attach,
}
null_ls.register({ isort, black, flake8, gitsigns })
null_ls.register({ name = "eslint_d", sources = { eslint_d_code, eslint_d_diag, eslint_d_format } })
end,
requires = { "nvim-lua/plenary.nvim" },
}
use {
'folke/trouble.nvim',
config = function()
require("trouble").setup {
nmap("<leader>xx", "<cmd>TroubleToggle<cr>"),
}
end
}
use {
'akinsho/bufferline.nvim',
tag = "v2.*",
requires = 'kyazdani42/nvim-web-devicons',
config = function()
require("bufferline").setup {
options = {
diagnostics = "nvim_lsp",
}
}
end
}
use { "EdenEast/nightfox.nvim",
config = function()
require("nightfox").setup {}
end
}
use {
"nvim-lualine/lualine.nvim",
event = "VimEnter",
config = function()
require("lualine").setup {
options = { theme = 'auto', globalstatus = true },
sections = { lualine_x = { 'filetype' } }
}
end,
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
use {
"startup-nvim/startup.nvim",
requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
config = function()
require "startup".setup()
end
}
use 'RRethy/vim-illuminate'
use {
'nvim-telescope/telescope.nvim',
requires = { 'nvim-lua/plenary.nvim' },
config = function()
require("telescope").setup {}
end
}
use {
'j-hui/fidget.nvim',
config = function()
require('fidget').setup {}
end
}
use 'voldikss/vim-floaterm'
use {
'kkoomen/vim-doge',
run = ':call doge#install()'
}
use { 'norcalli/nvim-colorizer.lua',
config = function()
require('colorizer').setup {
'css',
'javascript',
}
end,
}
use { 'lewis6991/gitsigns.nvim',
config = function()
require('gitsigns').setup {
on_attach = function()
nmap('<leader>hd', '<cmd>Gitsigns diffthis<cr>')
nmap('<leader>hp', '<cmd>Gitsigns preview_hunk<cr>')
nmap('<leader>td', '<cmd>Gitsigns toggle_deleted<cr>')
end
}
end
}
use { 'sudormrfbin/cheatsheet.nvim',
-- default toggle is <leader>?
requires = {
{ 'nvim-telescope/telescope.nvim' },
{ 'nvim-lua/popup.nvim' },
{ 'nvim-lua/plenary.nvim' },
}
}
if packer_bootstrap then
require('packer').sync()
end
end)
+40
View File
@@ -0,0 +1,40 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
"clangd_extensions.nvim": { "branch": "main", "commit": "78c2ecd659d54972be17aa6ba2deac3c53223b80" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"fidget.nvim": { "branch": "main", "commit": "6f793b2bcd2d35e201c09520f698bb763220908a" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "31d6fb2d618bca1482b9f274751ead5f03461408" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"mini.icons": { "branch": "main", "commit": "98faae31e9be1cc054ae63485e58ceb185efcad0" },
"neogen": { "branch": "main", "commit": "23e7e9f883d01289ebd90e98025acc860ea26366" },
"nightfox.nvim": { "branch": "main", "commit": "4dacd3f0185a2227bdf3b6c0975a8f0bf87cac9a" },
"none-ls-extras.nvim": { "branch": "main", "commit": "9a8b8a9aeb43382e5aaf49b00b7cfb5d42d32118" },
"none-ls.nvim": { "branch": "main", "commit": "c4b82bb63b13856ba4d6b971b7aad3bb38fc6fe2" },
"nvim-cmp": { "branch": "main", "commit": "2ffe79f1f021def8dd1fcd81deb16f1bb0d989f3" },
"nvim-colorizer.lua": { "branch": "master", "commit": "72a05f62c52241bc7441c820eb53946f92b2e6a4" },
"nvim-lspconfig": { "branch": "master", "commit": "4267d26e60323a45e18f8e7a63a964cc8f53ca4e" },
"nvim-surround": { "branch": "main", "commit": "8b47db616ef658b8fc27e61db2896aa2f40134de" },
"nvim-tree.lua": { "branch": "master", "commit": "b2aadda94b107480c48e548d6db51c6840b7b33c" },
"nvim-treesitter": { "branch": "main", "commit": "c9f9ed6c1892f629ea399f4ee7905f2686fa13f2" },
"nvim-web-devicons": { "branch": "master", "commit": "2ae6958df7ced50baac5035cec0c15799eedfbf7" },
"outline.nvim": { "branch": "main", "commit": "2a132953b944561d45b52e4541ebfff71934a742" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"roslyn.nvim": { "branch": "main", "commit": "7d8c166a0c70473ffa558d4d2430769d581fa8dd" },
"telescope.nvim": { "branch": "master", "commit": "427b576c16792edad01a92b89721d923c19ad60f" },
"vim-floaterm": { "branch": "master", "commit": "bb4ba7952e906408e1f83b215f55ffe57efcade6" },
"vim-illuminate": { "branch": "master", "commit": "91313e598ca62e110bc71535c49069b66b9883c9" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}
+111
View File
@@ -0,0 +1,111 @@
return {
'nvim-lua/plenary.nvim',
--{
-- 'RRethy/vim-illuminate',
-- event = 'LspAttach'
--},
{
'voldikss/vim-floaterm',
cmd = 'FloatermToggle',
},
'j-hui/fidget.nvim',
'echasnovski/mini.icons',
'nvim-tree/nvim-web-devicons',
'numToStr/Comment.nvim',
'kylechui/nvim-surround',
'stevearc/dressing.nvim',
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
highlight = {
enable = true
},
}
},
{
'nvim-tree/nvim-tree.lua',
dependencies = "nvim-tree/nvim-web-devicons",
init = function()
-- disables netrw
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
end,
opts = {
hijack_cursor = true,
disable_netrw = true,
select_prompts = true,
renderer = {
add_trailing = true,
hidden_display = "all",
highlight_opened_files = "icon"
}
},
keys = {
{ "<leader>v", "<cmd>NvimTreeToggle<cr>" }
}
},
{
"folke/which-key.nvim",
opts = { preset = "modern" }
},
{
"hedyhli/outline.nvim",
event = "LspAttach",
cmd = { "Outline", "OutlineOpen" },
keys = {
{ "<leader>o", "<cmd>Outline<CR>", desc = "Show outline" }
},
config = function()
-- https://github.com/hedyhli/outline.nvim
-- setup call required for this to work!
require("outline").setup {}
end
},
{
'nvim-telescope/telescope.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
keys = {
{ "<leader>ff", "<cmd>Telescope live_grep<cr>", desc = "Fuzzy grep across workspace" },
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Find buffer" },
{ "<leader>fp", "<cmd>lua require'telescope.builtin'.git_files{}<cr>", desc = "Find in project" },
{ "<leader>p", "<cmd>Telescope diagnostics<cr>", desc = "Show diagnostics for buffer" }
}
},
{
'catgoose/nvim-colorizer.lua',
opts = {
'css',
'scss',
'javascript',
'toml',
'python'
}
},
{
'lewis6991/gitsigns.nvim',
event = { "BufReadPre", "BufNewFile" },
keys = {
{ '<leader>hd', '<cmd>Gitsigns diffthis<cr>', desc = "Show Git diff" },
{ '<leader>hr', '<cmd>Gitsigns reset_hunk<cr>', desc = "Git reset hunk" },
{ '<leader>td', '<cmd>Gitsigns toggle_deleted<cr>', desc = 'Git toggle deleted' }
}
},
{
'sudormrfbin/cheatsheet.nvim',
dependencies = {
'nvim-telescope/telescope.nvim',
'nvim-lua/popup.nvim',
'nvim-lua/plenary.nvim',
}
},
--[[{
'pwntester/octo.nvim',
event = { "BufReadPre", "BufNewFile" },
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
'nvim-tree/nvim-web-devicons',
},
}]]
}
+38
View File
@@ -0,0 +1,38 @@
return {
'akinsho/bufferline.nvim',
version = "*",
event = { "BufReadPre", "BufNewFile" },
dependencies = 'nvim-tree/nvim-web-devicons',
config = function()
local bufferline = require('bufferline')
bufferline.setup({
options = {
style_preset = bufferline.style_preset.no_italic,
offsets = {
{
filetype = "NvimTree",
text = "Files",
highlight = "Directory",
separator = true
},
},
hover = {
enabled = true,
delay = 0,
reveal = { 'close' }
},
show_close_icon = false,
separator_style = "slope",
diagnostics = "nvim_lsp",
}
})
end
,
keys = {
{ "<leader>b", "<cmd>BufferLineCyclePrev<cr>", desc = "Go to previous tab" },
{ "<leader>n", "<cmd>BufferLineCycleNext<cr>", desc = "Go to next tab" },
{ "<leader>gb", "<cmd>BufferLinePick<cr>", desc = "Pick tab" },
{ "<leader>w", "<cmd>bdelete!<cr>", desc = "Close tab" }
}
}
+16
View File
@@ -0,0 +1,16 @@
return {
{
"EdenEast/nightfox.nvim",
priority = 1000,
config = function()
require("nightfox").setup({
palettes = {
carbonfox = {
bg1 = "#0C0C0C",
}
}
})
vim.cmd.colorscheme("carbonfox")
end
},
}
+301
View File
@@ -0,0 +1,301 @@
local fmt_group = vim.api.nvim_create_augroup("Lspformatting", { clear = true })
local on_attach = function(event)
local id = vim.tbl_get(event, 'data', 'client_id')
local client = id and vim.lsp.get_client_by_id(id)
local bufnr = event.buf
if (not bufnr) then
return
end
require 'illuminate'.on_attach(client)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>f', '<cmd>lua vim.lsp.buf.format({ async = true })<CR>', bufopts)
-- format on save does not work for python for some reason
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = fmt_group, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = fmt_group,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({
async = false,
bufnr = bufnr,
timeout_ms = 10000,
})
end
})
end
end
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('LspAttachGroup', { clear = true }),
callback = on_attach,
})
local on_leave_group = vim.api.nvim_create_augroup("OnLeaveGroup", {})
vim.api.nvim_create_autocmd("VimLeave", {
group = on_leave_group,
command = "silent !killall -q eslint_d",
})
vim.diagnostic.config({
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
[vim.diagnostic.severity.HINT] = '',
[vim.diagnostic.severity.INFO] = '»',
},
},
-- virtual_text = true,
})
return {
{
'neovim/nvim-lspconfig',
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"seblyng/roslyn.nvim",
'hrsh7th/nvim-cmp',
'RRethy/vim-illuminate',
'j-hui/fidget.nvim',
},
config = function()
local lspconfig_defaults = require('lspconfig').util.default_config
local capabilities = vim.tbl_deep_extend(
'force',
lspconfig_defaults.capabilities,
require('cmp_nvim_lsp').default_capabilities()
)
vim.lsp.config('*', {
capabilities = capabilities
})
vim.lsp.config("lua_ls", {
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
}
}
})
vim.lsp.config("svelte", {
settings = {
svelte = {
plugin = {
svelte = {
diagnostics = { enable = true },
format = { enable = true },
},
},
},
},
on_attach = function(client, bufnr)
-- svelte LS needs to be told when .js/.ts files change
-- so it can update component prop types
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = { "*.js", "*.ts" },
group = vim.api.nvim_create_augroup("svelte_ondidchangetsorjsfile", { clear = true }),
callback = function(ctx)
client:notify("$/onDidChangeTsOrJsFile", { uri = ctx.match })
end,
})
end,
})
vim.lsp.config("rust_analyzer", {
settings = {
["rust-analyzer"] = {
checkOnSave = true,
check = {
enable = true,
command = "clippy",
features = "all"
}
}
}
})
vim.lsp.config("julials", {
on_new_config = function(new_config, _)
local julia = vim.fn.expand("~/.julia/environments/nvim-lspconfig/bin/julia")
if require('lspconfig').util.path.is_file(julia) then
vim.notify("running julials")
new_config.cmd[1] = julia
end
end
})
vim.lsp.config("pyright", {
settings = {
pyright = {
disableOrganizeImports = true, -- Using Ruff
},
python = {
analysis = {
ignore = { '*' }, -- Using Ruff
},
},
},
})
vim.lsp.config("clangd", {
cmd = {
"clangd",
"--background-index",
"--clang-tidy",
"--header-insertion=iwyu",
"--completion-style=detailed",
"--function-arg-placeholders",
"--fallback-style=llvm",
},
root_markers = {
"compile_commands.json",
"compile_flags.txt",
"configure.ac", -- AutoTools
"Makefile",
"configure.ac",
"configure.in",
"config.h.in",
"meson.build",
"meson_options.txt",
"build.ninja",
".git",
},
init_options = {
usePlaceholders = true,
completeUnimported = true,
clangdFileStatus = true,
},
})
vim.lsp.config("bashls", {
cmd = { 'bash-language-server', 'start' },
filetypes = { 'bash', 'sh' }
})
-- add only to front-facing filetypes
vim.lsp.config("cspell_ls", {
cmd = { "cspell-lsp", "--stdio" },
filetypes = {
"markdown",
"html",
"svelte"
},
root_markers = { ".git" },
})
require("roslyn").setup()
vim.lsp.enable({ "lua_ls",
"cspell_ls",
"clangd",
"bashls",
"ts_ls",
"hls",
"ruff",
"svelte",
"marksman",
"tailwindcss",
"rust_analyzer",
"wgsl_analyzer",
"julials",
"pyright",
"qmlls"
})
end,
},
{
'nvimtools/none-ls.nvim',
event = { "BufReadPre", "BufNewFile" },
config = function()
local null_ls = require("null-ls")
local capabilities = require('cmp_nvim_lsp').default_capabilities()
--capabilities.offsetEncoding = { "utf-16" }
local eslint_format = require("none-ls.formatting.eslint_d").with({
})
local eslint_diag = require("none-ls.diagnostics.eslint_d").with({
})
local eslint_code_actions = require("none-ls.code_actions.eslint_d").with({
})
null_ls.setup {
capabilities = capabilities,
sources = {
eslint_format,
eslint_diag,
eslint_code_actions,
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.completion.luasnip,
null_ls.builtins.completion.tags,
}
}
end,
dependencies = { "nvim-lua/plenary.nvim",
"nvimtools/none-ls-extras.nvim",
'hrsh7th/nvim-cmp',
"L3MON4D3/LuaSnip",
},
},
{
'p00f/clangd_extensions.nvim',
dependencies = { 'nvim-lspconfig' },
keys = {
{ "<leader>ch", "<cmd>LspClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" },
},
ft = { 'c', 'cpp', 'objc', 'objcpp' },
opts = {
inlay_hints = {
inline = false,
},
ast = {
--These require codicons (https://github.com/microsoft/vscode-codicons)
role_icons = {
type = "",
declaration = "",
expression = "",
specifier = "",
statement = "",
["template argument"] = "",
},
kind_icons = {
Compound = "",
Recovery = "",
TranslationUnit = "",
PackExpansion = "",
TemplateTypeParm = "",
TemplateTemplateParm = "",
TemplateParamObject = "",
},
},
},
}
}
+36
View File
@@ -0,0 +1,36 @@
return {
"nvim-lualine/lualine.nvim",
event = "VimEnter",
dependencies = {
'nvim-tree/nvim-web-devicons',
},
opts = {
extensions = { 'nvim-tree', 'fzf', 'symbols-outline' },
options = {
component_separators = '',
section_separators = { left = '', right = '' },
theme = 'auto',
globalstatus = true,
},
sections = {
-- would be nice to open code actions but w/e
lualine_b = {
{
'branch',
'diff',
},
},
lualine_c = {
{
'diagnostics',
sources = { 'nvim_diagnostic', 'nvim_lsp' },
sections = { 'hint', 'warn', 'error' },
colored = true,
update_in_insert = true,
always_visible = false,
}
},
lualine_x = { 'filetype' },
}
}
}
+19
View File
@@ -0,0 +1,19 @@
return {
"danymat/neogen",
config = function()
require("neogen").setup({
enabled = true,
snippet_engine = "luasnip",
placeholders_hl = "None", -- fixes weird bug where the entire page gets colored with this color
languages = {
python = {
template = {
annotation_convention = "google_docstrings"
}
}
}
})
nmap('<leader>d', ":lua require('neogen').generate()<CR>")
end
}
+95
View File
@@ -0,0 +1,95 @@
return {
{
"L3MON4D3/LuaSnip",
build = "make install_jsregexp"
},
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-buffer", "hrsh7th/cmp-nvim-lsp",
"L3MON4D3/LuaSnip", "rafamadriz/friendly-snippets",
'hrsh7th/cmp-nvim-lua', 'hrsh7th/cmp-path',
'hrsh7th/cmp-calc', 'hrsh7th/cmp-cmdline', 'f3fora/cmp-spell',
},
config = function()
local cmp = require("cmp")
local luasnip = require('luasnip')
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end
},
sources = {
{ name = 'path' },
{ name = 'nvim_lsp', keyword_length = 1 },
{ name = 'buffer', keyword_length = 3 },
{ name = 'luasnip', keyword_length = 2 },
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered()
},
formatting = {
fields = { 'menu', 'abbr', 'kind' },
format = function(entry, item)
local menu_icon = {
nvim_lsp = 'λ',
luasnip = '',
buffer = 'Ω',
path = '🖫',
}
item.menu = menu_icon[entry.source.name]
return item
end,
},
mapping = {
['<Up>'] = cmp.mapping.select_prev_item(select_opts),
['<Down>'] = cmp.mapping.select_next_item(select_opts),
['<C-u>'] = cmp.mapping.scroll_docs(-4),
['<C-d>'] = cmp.mapping.scroll_docs(4),
['<C-e>'] = cmp.mapping.abort(),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
['<CR>'] = cmp.mapping.confirm({ select = false }),
['<C-f>'] = cmp.mapping(function(fallback)
if luasnip.jumpable(1) then
luasnip.jump(1)
else
fallback()
end
end, { 'i', 's' }),
['<C-b>'] = cmp.mapping(function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
}
})
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- to select something in the cmdline need to use <C-n>
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
}),
matching = { disallow_symbol_nonprefix_matching = false }
})
end,
} }
+1616
View File
File diff suppressed because it is too large Load Diff
-425
View File
@@ -1,425 +0,0 @@
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = false;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 7;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -7;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -7;
# Avoid drawing shadows on dock/panel windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dock-shadow = false
# Don't draw shadows on drag-and-drop windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dnd-shadow = false
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Do not paint shadows on shaped windows. Note shaped windows
# here means windows setting its shape through X Shape extension.
# Those using ARGB background is beyond our control.
# Deprecated, use
# shadow-exclude = 'bounding_shaped'
# or
# shadow-exclude = 'bounding_shaped && !rounded_corners'
# instead.
#
# shadow-ignore-shaped = ''
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c"
];
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = true
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.03;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.03;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10
# Specify a list of conditions of windows that should not be faded.
# fade-exclude = []
# Do not fade on window open/close.
# no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 0.8
inactive-opacity = 1;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
frame-opacity = 1;
# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
# menu-opacity = 1.0
# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
# inactive-opacity-override = true
inactive-opacity-override = false;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0
# Specify a list of conditions of windows that should always be considered focused.
# focus-exclude = []
focus-exclude = [];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
opacity-rule = [
"90:class_g = 'URxvt' && focused",
"80:class_g = 'URxvt' && !focused"
];
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
# blur-size = 12
#
# blur-deviation = false
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
# blur-background = false
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
# Specify the blur convolution kernel, with the following format:
# example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ''
blur-kern = "3x3box";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# `xrender` is the default one.
#
# backend = 'glx'
backend = "xrender";
# Enable/disable VSync.
# vsync = false
vsync = false
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = false;
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
#
detect-client-opacity = false
#detect-client-opacity = true;
# Specify refresh rate of the screen. If not specified or 0, picom will
# try detecting this with X RandR extension.
#
# refresh-rate = 60
# refresh-rate = 0
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to
# boost performance. This should not be used with
# vsync drm/opengl/opengl-oml
# as they essentially does sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#
# sw-opti =
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = false
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
# detect-transient is enabled, too.
#
# detect-client-leader = false
detect-client-leader = false
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = false
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
#
# glx-fshader-win = ''
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = '/path/to/your/log/file'
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = '/path/to/your/log/file'
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = false; opacity = 1.0; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 1.0; }
dropdown_menu = { opacity = 1.0; }
};
+214
View File
@@ -0,0 +1,214 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = ${xrdb:color0}
background-alt = #444
foreground = ${xrdb:color7}
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/default]
monitor = ${env:MONITOR:}
width = 100%
height = 2.5%
bottom = true
offset-x = 0
offset-y = 0
radius = 0.0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 0
line-color = #f00
border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 1
module-margin-left = 0
module-margin-right = 1
font-0 = Hack:style=Regular:size=11;1
font-1 = unifont:style=Regular:size=11;0
font-2 = siji:style=Regular:size=11;1
modules-left = i3 title
modules-center = date
modules-right = cpu memory wlan pulseaudio battery
tray-position = right
tray-padding = 2
tray-scale = 1.0
;tray-background = #0063ff
;tray-reparent = true
;wm-restack = bspwm
wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
#[module/title]
#type = internal/xwindow
#label-maxlen = 25
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU:"
format-prefix-foreground = ${xrdb:color7}
format-underline =
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = ""
format-prefix-foreground = ${xrdb:color7}
format-underline =
label = %gb_used% | %gb_free%
[module/wlan]
type = internal/network
interface = wlan0
interval = 3.0
format-connected = <label-connected>
format-connected-underline =
label-connected =
label-disconnected = "No connection"
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
ramp-signal-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 1
date =
date-alt = " %D"
time = %I:%M:%S %p
time-alt = %I:%M:%S %p
format-prefix =
format-prefix-foreground = ${colors.foreground-alt}
format-underline =
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume> <bar-volume>
label-volume = VOL: %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted
label-muted-foreground =
bar-volume-width = 10
bar-volume-foreground-0 = #99cc00
bar-volume-foreground-1 = #99cc00
bar-volume-foreground-2 = #99cc00
bar-volume-foreground-3 = #99cc00
bar-volume-foreground-4 = #99cc00
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = true
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill =
bar-volume-fill-font = 2
bar-volume-empty =
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT1
adapter = ADP1
full-at = 98
label-full = ""
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline =
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline =
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 =
animation-discharging-1 =
animation-discharging-2 =
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[settings]
screenchange-reload = true
;compositing-background = xor
compositing-background = screen
;compositing-foreground = source
;compositing-border = over
pseudo-transparency = false
[global/wm]
margin-top = 0
margin-bottom = 0
; vim:ft=dosini
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
killall -q polybar
#while pgrep -u $UID -x polybar >/dev/null; do
# sleep 0.5; done
for m in $(polybar --list-monitors | cut -d":" -f1); do
MONITOR=$m polybar -c ~/.config/polybar/fluxbox-config.ini --reload &
done
+354
View File
@@ -0,0 +1,354 @@
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import Quickshell.Hyprland
import QtQuick
import QtQuick.Layouts
import Quickshell.Services.SystemTray
import Quickshell.DBusMenu
import Quickshell.Widgets
Scope {
id: root
property string time
property int cpuUsage: 0
property string memUsage: "0"
property var lastCpuIdle: 0
property var lastCpuTotal: 0
SystemClock {
id: sysClock
precision: SystemClock.Seconds
}
Process {
id: cpuProc
command: ["sh", "-c", "head -1 /proc/stat"]
stdout: SplitParser {
onRead: data => {
if (!data)
return;
var p = data.trim().split(/\s+/);
var idle = parseInt(p[4]) + parseInt(p[5]);
var total = p.slice(1, 8).reduce((a, b) => a + parseInt(b), 0);
if (lastCpuTotal > 0) {
cpuUsage = Math.round(100 * (1 - (idle - lastCpuIdle) / (total - lastCpuTotal)));
}
lastCpuTotal = total;
lastCpuIdle = idle;
}
}
Component.onCompleted: running = true
}
// Read raw millidegrees value from sysfs (adjust hwmon index if needed)
// command: ["cat", "/sys/class/hwmon/hwmon0/temp1_input"]
Process {
id: memProc
command: ["sh", "-c", "free -m | grep Mem"]
stdout: SplitParser {
onRead: data => {
if (!data)
return;
var parts = data.trim().split(/\s+/);
var total = (parts[1] / 1000).toFixed(2) || 1;
var used = (parts[2] / 1000).toFixed(2) || 0;
memUsage = `${used} / ${total}`;
}
}
Component.onCompleted: running = true
}
Timer {
interval: 1000
running: true
repeat: true
onTriggered: {
cpuProc.running = true;
memProc.running = true;
}
}
Variants {
model: Quickshell.screens
PanelWindow {
id: barRoot
required property var modelData
screen: modelData
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(screen)
// Theme
property color colBg: Qt.rgba(0.0, 0.0, 0.0, 0.35)// "#150d16"
property color colFg: "#f5dbc4"
property color colMuted: "#444b6a"
property color colCyan: "#0db9d7"
property color colBlue: "#7aa2f7"
property color colYellow: "#e0af68"
property color colWhite: "#FFFFFF"
property color colRed: "#FF2400"
property string fontFamily: "Inter"
property int fontSize: 16
anchors.bottom: true
anchors.left: true
anchors.right: true
implicitHeight: 35
color: Qt.rgba(0.0, 0.0, 0.0, 0.35)
RowLayout {
anchors.fill: parent
anchors.margins: 8
spacing: 8
// Workspaces
Repeater {
model: Hyprland.workspaces
delegate: Loader {
active: modelData.monitor && modelData.monitor.name === monitor.name && modelData.id != -98
sourceComponent: Text {
property bool isActive: Hyprland.focusedWorkspace?.id === modelData.id
text: modelData.id
color: isActive ? barRoot.colRed : barRoot.colFg
font {
family: barRoot.fontFamily
pixelSize: barRoot.fontSize
bold: true
}
MouseArea {
anchors.fill: parent
onClicked: ws.activate()
}
}
}
}
Row {
id: appIconRow
spacing: 4
property var sortedTopLevels: {
const tl = barRoot.monitor?.activeWorkspace?.toplevels;
if (!tl)
return [];
return tl.values.slice().sort((a, b) => {
const ax = a.lastIpcObject?.at?.[0] ?? 0;
const bx = b.lastIpcObject?.at?.[0] ?? 0;
return ax - bx;
});
}
Repeater {
model: appIconRow.sortedTopLevels //barRoot.monitor?.activeWorkspace?.toplevels ?? null
delegate: Item {
id: appIconRoot
width: 18
height: 18
property var desktopEntry: DesktopEntries.byId(modelData.wayland.appId)
IconImage {
anchors.fill: parent
source: Quickshell.iconPath(desktopEntry.icon ?? modelData.appId, "image-missing")
opacity: modelData.activated ? 1.0 : 0.35
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
onClicked: mouse => {
if (mouse.button === Qt.LeftButton) {
modelData.wayland.activate();
} else if (mouse.button === Qt.RightButton) {
modelData.wayland.close();
}
}
}
}
}
Connections {
target: barRoot.monitor?.activeWorkspace?.toplevels ?? null
function onObjectInsertedPost() {
Hyprland.refreshToplevels();
}
function onObjectRemovedPost() {
Hyprland.refreshToplevels();
}
}
Connections {
target: Hyprland
function onRawEvent(event) {
positionRefreshDebounce.restart();
}
}
Timer {
id: positionRefreshDebounce
interval: 100
onTriggered: Hyprland.refreshToplevels()
}
}
Text {
id: clock
anchors.centerIn: parent
property var timeFmt: "h:mm:ss AP"
property var timeStr: Qt.formatDateTime(sysClock.date, timeFmt)
color: barRoot.colFg
font {
family: barRoot.fontFamily
pixelSize: barRoot.fontSize
bold: true
}
text: timeStr
Calendar {
visible: clockArea.containsMouse
anchorItem: clock
today: sysClock.date
bgColor: barRoot.colBg
fgColor: barRoot.colFg
mutedColor: barRoot.colMuted
accentColor: barRoot.colRed
fontFamily: barRoot.fontFamily
fontSize: barRoot.fontSize
}
MouseArea {
id: clockArea
hoverEnabled: true
anchors.fill: parent
onClicked: {
clock.timeFmt = (clock.timeFmt === "h:mm:ss AP") ? "dddd M/d/yyyy - h:mm:ss AP" : "h:mm:ss AP";
}
}
}
Item {
Layout.fillWidth: true
}
IconImage {
implicitSize: 20
source: Quickshell.iconPath("device_cpu")
}
// CPU
Text {
text: `${cpuUsage}%`
color: barRoot.colFg
font {
family: barRoot.fontFamily
pixelSize: barRoot.fontSize
bold: true
}
}
Rectangle {
width: 1
height: 16
color: barRoot.colMuted
}
IconImage {
implicitSize: 20
source: Quickshell.iconPath("memory")
}
// Memory
Text {
text: `${memUsage} GB`
color: barRoot.colFg
font {
family: barRoot.fontFamily
pixelSize: barRoot.fontSize
bold: true
}
}
Row {
spacing: 5
Repeater {
model: SystemTray.items
delegate: Image {
id: trayIcon
source: modelData.icon
width: 16
height: 16
QsMenuOpener {
id: menuOpener
menu: modelData.menu
}
PopupWindow {
id: tooltip
visible: trayDelegate.containsMouse
color: "transparent"
implicitWidth: tooltipText.implicitWidth + 16
implicitHeight: tooltipText.implicitHeight + 10
anchor.item: trayIcon
anchor.edges: Edges.Top | Edges.Left
anchor.gravity: Edges.Top | Edges.Right
anchor.adjustment: PopupAdjustment.SlideX | PopupAdjustment.FlipY
anchor.margins.bottom: 6
Rectangle {
anchors.fill: parent
color: barRoot.colBg
radius: 4
border.color: barRoot.colMuted
border.width: 1
Text {
id: tooltipText
anchors.centerIn: parent
text: modelData.tooltipTitle || modelData.id
color: barRoot.colFg
font {
family: barRoot.fontFamily
pixelSize: barRoot.fontSize - 2
}
}
}
}
MouseArea {
id: trayDelegate
hoverEnabled: true
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
onClicked: mouse => {
if (mouse.button === Qt.LeftButton) {
modelData.activate();
} else if (mouse.button === Qt.RightButton && modelData.hasMenu) {
let pos = trayIcon.mapToItem(null, 0, trayIcon.height);
modelData.display(barRoot, pos.x, pos.y);
}
}
}
}
}
}
}
BackgroundEffect.blurRegion: Region {
item: barRoot.contentItem
}
}
}
}
+123
View File
@@ -0,0 +1,123 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
PopupWindow {
id: calendarPopup
required property Item anchorItem
required property date today
property color bgColor: "#150d16"
property color fgColor: "#f5dbc4"
property color mutedColor: "#444b6a"
property color accentColor: "#FF2400"
property string fontFamily: "Inter"
property int fontSize: 16
property int calYear: today.getFullYear()
property int calMonth: today.getMonth()
function daysInMonth(year, month) {
return new Date(year, month + 1, 0).getDate();
}
function firstWeekday(year, month) {
return new Date(year, month, 1).getDay();
}
color: "transparent"
implicitWidth: calContent.implicitWidth + 20
implicitHeight: calContent.implicitHeight + 20
anchor.item: anchorItem
anchor.edges: Edges.Top
anchor.gravity: Edges.Top
anchor.adjustment: PopupAdjustment.SlideX | PopupAdjustment.FlipY
anchor.margins.bottom: 8
BackgroundEffect.blurRegion: Region {
item: calendarPopup.contentItem
}
Rectangle {
anchors.fill: parent
color: calendarPopup.bgColor
radius: 6
border.color: calendarPopup.mutedColor
border.width: 1
ColumnLayout {
id: calContent
anchors.centerIn: parent
spacing: 6
Text {
Layout.alignment: Qt.AlignHCenter
text: Qt.formatDate(new Date(calendarPopup.calYear, calendarPopup.calMonth, 1), "MMMM yyyy")
color: calendarPopup.fgColor
font {
family: calendarPopup.fontFamily
pixelSize: calendarPopup.fontSize
bold: true
}
}
GridLayout {
columns: 7
rowSpacing: 4
columnSpacing: 6
Repeater {
model: ["S", "M", "T", "W", "T", "F", "S"]
delegate: Text {
Layout.preferredWidth: 22
Layout.preferredHeight: 20
horizontalAlignment: Text.AlignHCenter
text: modelData
color: calendarPopup.mutedColor
font {
family: calendarPopup.fontFamily
pixelSize: calendarPopup.fontSize - 3
bold: true
}
}
}
Repeater {
model: calendarPopup.firstWeekday(calendarPopup.calYear, calendarPopup.calMonth)
delegate: Item {
Layout.preferredWidth: 22
Layout.preferredHeight: 22
}
}
Repeater {
model: calendarPopup.daysInMonth(calendarPopup.calYear, calendarPopup.calMonth)
delegate: Rectangle {
id: dayCell
Layout.preferredWidth: 22
Layout.preferredHeight: 22
radius: 4
property int dayNum: index + 1
property bool isToday: dayNum === calendarPopup.today.getDate() && calendarPopup.calMonth === calendarPopup.today.getMonth() && calendarPopup.calYear === calendarPopup.today.getFullYear()
color: isToday ? calendarPopup.accentColor : "transparent"
Text {
anchors.centerIn: parent
text: dayCell.dayNum
color: calendarPopup.fgColor
font {
family: calendarPopup.fontFamily
pixelSize: calendarPopup.fontSize
}
}
}
}
}
}
}
}
+94
View File
@@ -0,0 +1,94 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Services.Pipewire
import Quickshell.Widgets
Scope {
id: volumeOSD
// Bind the pipewire node so its volume will be tracked
PwObjectTracker {
objects: [Pipewire.defaultAudioSink]
}
Connections {
target: Pipewire.defaultAudioSink?.audio
function onVolumeChanged() {
volumeOSD.shouldShowOsd = true;
hideTimer.restart();
}
}
property bool shouldShowOsd: false
Timer {
id: hideTimer
interval: 1000
onTriggered: volumeOSD.shouldShowOsd = false
}
// The OSD window will be created and destroyed based on shouldShowOsd.
// PanelWindow.visible could be set instead of using a loader, but using
// a loader will reduce the memory overhead when the window isn't open.
LazyLoader {
active: volumeOSD.shouldShowOsd
PanelWindow {
anchors.bottom: true
margins.bottom: screen.height / 5
exclusiveZone: 0
implicitWidth: 400
implicitHeight: 50
color: "transparent"
// An empty click mask prevents the window from blocking mouse events.
mask: Region {}
Rectangle {
anchors.fill: parent
radius: height / 2
color: "#80000000"
RowLayout {
anchors {
fill: parent
leftMargin: 10
rightMargin: 15
}
IconImage {
implicitSize: 30
source: Quickshell.iconPath("audio-volume-high-symbolic")
}
Rectangle {
// Stretches to fill all left-over space
Layout.fillWidth: true
implicitHeight: 10
radius: 20
color: "#50ffffff"
Rectangle {
anchors {
left: parent.left
top: parent.top
bottom: parent.bottom
}
implicitWidth: parent.width * (Pipewire.defaultAudioSink?.audio.volume ?? 0)
radius: parent.radius
}
}
Text {
text: `${Math.round((Pipewire.defaultAudioSink?.audio.volume ?? 0) * 100)}%`
color: "white"
}
}
}
}
}
}
+7
View File
@@ -0,0 +1,7 @@
//@ pragma UseQApplication
import Quickshell
Scope {
Bar {}
VolumeOSD {}
}
+6 -1
View File
@@ -1,5 +1,10 @@
set preview_images true
set vcs_backend_git enabled
set vcs_aware true
set draw_borders separators
set line_numbers true
set hostname_in_titlebar false
set update_title true
set unicode_ellipsis true
set preview_images_method ueberzug
set preview_max_size 1048576000
+3 -2
View File
@@ -2,6 +2,7 @@
configuration {
show-icons: true;
icon-theme: "Papirus";
icon-theme: "kora";
}
@theme "/home/frosty/.config/rofi/launchers/misc/kde_krunner.rasi"
@theme "~/.config/rofi/tokyonight.rasi"
Submodule rofi/rofi-themes-collection added at c8239a45ed
+115
View File
@@ -0,0 +1,115 @@
* {
font: "Iosevka Nerd Font Medium 14";
bg0 : #1a1b26;
bg1 : #1f2335;
bg2 : #24283b;
bg3 : #414868;
fg0 : #c0caf5;
fg1 : #a9b1d6;
fg2 : #737aa2;
red : #f7768e;
green : #9ece6a;
yellow : #e0af68;
blue : #7aa2f7;
magenta : #9a7ecc;
cyan : #4abaaf;
accent: #d6181b;
urgent: @yellow;
background-color : transparent;
text-color : @fg0;
margin : 0;
padding : 0;
spacing : 0;
}
element-icon, element-text, scrollbar {
cursor: pointer;
}
window {
location : center;
width : 650px;
x-offset : 4px;
y-offset : 26px;
background-color: @bg1;
border: 1px;
border-color: @bg3;
border-radius: 6px;
}
inputbar {
spacing : 8px;
padding : 4px 8px;
children : [ icon-search, entry ];
background-color: @bg0;
}
icon-search, entry, element-icon, element-text {
vertical-align: 0.5;
}
icon-search {
expand : false;
filename : "search-symbolic";
size : 14px;
}
textbox {
padding : 4px 8px;
background-color : @bg2;
}
listview {
padding : 4px 0px;
lines : 12;
columns : 1;
scrollbar : true;
fixed-height : false;
dynamic : true;
}
element {
padding : 4px 8px;
spacing : 8px;
}
element normal urgent {
text-color: @urgent;
}
element normal active {
text-color: @accent;
}
element alternate active {
text-color: @accent;
}
element selected {
text-color : @bg1;
background-color : @accent;
}
element selected urgent {
background-color: @urgent;
}
element-icon {
size: 0.8em;
}
element-text {
text-color: inherit;
}
scrollbar {
handle-width : 4px;
handle-color : @fg2;
padding : 0 4px;
}
+200
View File
@@ -0,0 +1,200 @@
#!/bin/sh
## Grimshot: a helper for screenshots within sway
## Requirements:
## - `grim`: screenshot utility for wayland
## - `slurp`: to select an area
## - `swaymsg`: to read properties of current window
## - `wl-copy`: clipboard utility
## - `jq`: json utility to parse swaymsg output
## - `notify-send`: to show notifications
## Those are needed to be installed, if unsure, run `grimshot check`
##
## See `man 1 grimshot` or `grimshot usage` for further details.
getTargetDirectory() {
test -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" && \
. "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs"
echo "${XDG_SCREENSHOTS_DIR:-${XDG_PICTURES_DIR:-$HOME}}"
}
NOTIFY=no
CURSOR=
WAIT=no
while [ $# -gt 0 ]; do
key="$1"
case $key in
-n|--notify)
NOTIFY=yes
shift # past argument
;;
-c|--cursor)
CURSOR=yes
shift # past argument
;;
-w|--wait)
shift
WAIT="$1"
if echo "$WAIT" | grep "[^0-9]" -q; then
echo "invalid value for wait '$WAIT'" >&2
exit 3
fi
shift
;;
*) # unknown option
break # done with parsing --flags
;;
esac
done
ACTION=${1:-usage}
SUBJECT=${2:-screen}
FILE=${3:-$(getTargetDirectory)/$(date -Ins).png}
if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "savecopy" ] && [ "$ACTION" != "check" ]; then
echo "Usage:"
echo " grimshot [--notify] [--cursor] [--wait N] (copy|save) [active|screen|output|area|window|anything] [FILE|-]"
echo " grimshot check"
echo " grimshot usage"
echo ""
echo "Commands:"
echo " copy: Copy the screenshot data into the clipboard."
echo " save: Save the screenshot to a regular file or '-' to pipe to STDOUT."
echo " savecopy: Save the screenshot to a regular file and copy the data into the clipboard."
echo " check: Verify if required tools are installed and exit."
echo " usage: Show this message and exit."
echo ""
echo "Targets:"
echo " active: Currently active window."
echo " screen: All visible outputs."
echo " output: Currently active output."
echo " area: Manually select a region."
echo " window: Manually select a window."
echo " anything: Manually select an area, window, or output."
exit
fi
notify() {
notify-send -t 3000 -a grimshot "$@"
}
notifyOk() {
[ "$NOTIFY" = "no" ] && return
TITLE=${2:-"Screenshot"}
MESSAGE=${1:-"OK"}
if [ "$ACTION" = "save" ] || [ "$ACTION" = "savecopy" ]; then
notify "$TITLE" "$MESSAGE" -i "$FILE"
else
notify "$TITLE" "$MESSAGE"
fi
}
notifyError() {
if [ $NOTIFY = "yes" ]; then
TITLE=${2:-"Screenshot"}
MESSAGE=${1:-"Error taking screenshot with grim"}
notify -u critical "$TITLE" "$MESSAGE"
else
echo "$1"
fi
}
die() {
MSG=${1:-Bye}
notifyError "Error: $MSG"
exit 2
}
check() {
COMMAND=$1
if command -v "$COMMAND" > /dev/null 2>&1; then
RESULT="OK"
else
RESULT="NOT FOUND"
fi
echo " $COMMAND: $RESULT"
}
takeScreenshot() {
FILE=$1
GEOM=$2
OUTPUT=$3
if [ -n "$OUTPUT" ]; then
grim ${CURSOR:+-c} -o "$OUTPUT" "$FILE" || die "Unable to invoke grim"
elif [ -z "$GEOM" ]; then
grim ${CURSOR:+-c} "$FILE" || die "Unable to invoke grim"
else
grim ${CURSOR:+-c} -g "$GEOM" "$FILE" || die "Unable to invoke grim"
fi
}
if [ "$ACTION" = "check" ] ; then
echo "Checking if required tools are installed. If something is missing, install it to your system and make it available in PATH..."
check grim
check slurp
check swaymsg
check wl-copy
check jq
check notify-send
exit
elif [ "$SUBJECT" = "area" ] ; then
GEOM=$(slurp -d)
# Check if user exited slurp without selecting the area
if [ -z "$GEOM" ]; then
exit 1
fi
WHAT="Area"
elif [ "$SUBJECT" = "active" ] ; then
FOCUSED=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?, .floating_nodes[]?) | select(.focused)')
GEOM=$(echo "$FOCUSED" | jq -r '.rect | "\(.x),\(.y) \(.width)x\(.height)"')
APP_ID=$(echo "$FOCUSED" | jq -r '.app_id')
WHAT="$APP_ID window"
elif [ "$SUBJECT" = "screen" ] ; then
GEOM=""
WHAT="Screen"
elif [ "$SUBJECT" = "output" ] ; then
GEOM=""
OUTPUT=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused)' | jq -r '.name')
WHAT="$OUTPUT"
elif [ "$SUBJECT" = "window" ] ; then
GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp -r)
# Check if user exited slurp without selecting the area
if [ -z "$GEOM" ]; then
exit 1
fi
WHAT="Window"
elif [ "$SUBJECT" = "anything" ] ; then
GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp -o)
# Check if user exited slurp without selecting the area
if [ -z "$GEOM" ]; then
exit
fi
WHAT="Selection"
else
die "Unknown subject to take a screen shot from" "$SUBJECT"
fi
if [ "$WAIT" != "no" ]; then
sleep "$WAIT"
fi
if [ "$ACTION" = "copy" ] ; then
takeScreenshot - "$GEOM" "$OUTPUT" | wl-copy --type image/png || die "Clipboard error"
notifyOk "$WHAT copied to clipboard"
else
if takeScreenshot "$FILE" "$GEOM" "$OUTPUT"; then
TITLE="Screenshot of $SUBJECT"
MESSAGE=$(basename "$FILE")
if [ "$ACTION" = "savecopy" ]; then
wl-copy --type image/png < "$FILE" || die "Clipboard error"
MESSAGE="$MESSAGE and clipboard"
fi
notifyOk "$MESSAGE" "$TITLE"
echo "$FILE"
else
notifyError "Error taking screenshot with grim"
fi
fi
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
# usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
#font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
#gsettings set "$gnome_schema" font-name "$font_name"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
maim --select -u
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
maim --select -u | xclip -selection clipboard -target 'image/png'
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
maim --select -u ~/$(date +%s).png
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
# randomly selects a wallpaper from wallpapers directory
dir="$HOME/.wallpapers"
wallpapers=("$dir"/*)
idx=$(( RANDOM % ${#wallpapers[@]}))
selected="${wallpapers[$idx]}"
swaybg -m fill -i "$selected"
+202
View File
@@ -0,0 +1,202 @@
include /etc/sway/config.d/*
output * allow_tearing yes
output * max_render_time off
xwayland enable
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Noto Sans Nerd Font 12
# Use pactl to adjust volume in PulseAudio.
#set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+q kill
# custom bindings
# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id "rofi -combi-modi window,drun -show combi -modi combi -show-icons"
# bindsym $mod+d exec vicinae toggle; exec swaymsg
bindsym $mod+p exec bwmenu
bindsym --release Print exec --no-startup-id ~/.config/scripts/grimshot copy area
bindsym $mod+Print exec --no-startup-id ~/.config/scripts/grimshot save area
bindsym $mod+x [urgent=latest] focus
bindsym $mod+c exec "rofi -show calc -modi calc -no-show-match -no-sort"
# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the first scratchpad window
bindsym $mod+minus scratchpad show
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor 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
bindsym $mod+Shift+n exec swaync-client -t -sw
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+Home exec swaylock --screenshots --effect-pixelate 10 --clock
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
bindsym $mod+Shift+r sway reload
#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
focus_follows_mouse no
# default colors
# border background text indicator child border
client.focused #EA4335 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #222222 #888888 #292d2e #222222
client.unfocused #333333 #222222 #888888 #292d2e #222222
title_align center
for_window [class="^.*"] border pixel 1
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
for_window [shell="xwayland"] title_format "[XWayland] %title"
default_floating_border none
hide_edge_borders none
gaps inner 0
gaps outer 0
# seat seat0 xcursor_theme my_cursor_theme my_cursor_size
# copying
exec_always --no-startup-id ~/.config/sway/import_gsettings.sh
set $clipboard cliphist list | rofi | cliphist decode | wl-copy
exec --no-startup-id kanshi
exec --no-startup-id ~/.config/waybar/launch.sh
exec --no-startup-id wl-paste --watch cliphist store
exec --no-startup-id awww-daemon --no-cache
exec --no-startup-id udiskie --tray
exec --no-startup-id swaync
# set a random wallpaper on reload
exec_always --no-startup-id ~/.config/sway/set_wallpaper.sh
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
# usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"
+54
View File
@@ -0,0 +1,54 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"positionX": "right",
"positionY": "top",
"layer": "overlay",
"control-center-layer": "top",
"layer-shell": true,
"cssPriority": "application",
"control-center-margin-top": 10,
"control-center-margin-bottom": 10,
"control-center-margin-right": 10,
"control-center-margin-left": 10,
"notification-2fa-action": true,
"notification-inline-replies": false,
"notification-icon-size": 64,
"notification-body-image-height": 100,
"notification-body-image-width": 200,
"timeout": 10,
"timeout-low": 5,
"timeout-critical": 0,
"fit-to-screen": true,
"control-center-width": 500,
"control-center-height": 600,
"notification-window-width": 500,
"keyboard-shortcuts": true,
"image-visibility": "when-available",
"transition-time": 200,
"hide-on-clear": false,
"hide-on-action": true,
"script-fail-notify": true,
"widgets": [
"title",
"dnd",
"notifications"
],
"widget-config": {
"title": {
"text": "Notifications",
"clear-all-button": true,
"button-text": "Clear All"
},
"dnd": {
"text": "Do Not Disturb"
},
"label": {
"max-lines": 5,
"text": "Notification Center"
},
"mpris": {
"image-size": 96,
"image-radius": 12
}
}
}
+561
View File
@@ -0,0 +1,561 @@
:root {
--cc-bg: rgba(46, 46, 46, 0.7);
--noti-border-color: rgba(255, 255, 255, 0.15);
--noti-bg: 48, 48, 48;
--noti-bg-alpha: 0.8;
--noti-bg-darker: rgb(38, 38, 38);
--noti-bg-hover: rgb(56, 56, 56);
--noti-bg-focus: rgba(68, 68, 68, 0.6);
--noti-close-bg: rgb(78, 78, 78);
--noti-close-bg-hover: rgb(94, 94, 94);
--text-color: rgb(255, 255, 255);
--text-color-disabled: rgb(150, 150, 150);
--bg-selected: rgb(0, 128, 255);
--notification-icon-size: 64px;
--notification-app-icon-size: calc(var(--notification-icon-size) / 3);
--notification-group-icon-size: 32px;
--border: 1px solid var(--noti-border-color);
--border-radius: 12px;
--notification-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3),
0 1px 3px 1px rgba(0, 0, 0, 0.7), 0 2px 6px 2px rgba(0, 0, 0, 0.3);
--font-size-body: 15px;
--font-size-summary: 16px;
/* Deprecated variables (because of their typos). Keeeping them around for backwards compatibility. */
--hover-tranistion: background 0.15s ease-in-out;
--group-collapse-tranistion: opacity 400ms ease-in-out;
--hover-transition: var(--hover-tranistion);
--group-collapse-transition: var(--group-collapse-tranistion);
}
/* Fallback for older CSS themes */
/* Fallback for older CSS themes */
@define-color cc-bg rgba(46, 46, 46, 0.7);
@define-color noti-border-color rgba(255, 255, 255, 0.15);
@define-color noti-bg rgba(48, 48, 48, 0.8);
@define-color noti-bg-opaque rgb(48, 48, 48);
@define-color noti-bg-darker rgb(38, 38, 38);
@define-color noti-bg-hover rgb(56, 56, 56);
@define-color noti-bg-hover-opaque rgb(56, 56, 56);
@define-color noti-bg-focus rgba(68, 68, 68, 0.6);
@define-color noti-close-bg rgba(255, 255, 255, 0.1);
@define-color noti-close-bg-hover rgba(255, 255, 255, 0.15);
@define-color text-color rgb(255, 255, 255);
@define-color text-color-disabled rgb(150, 150, 150);
@define-color bg-selected rgb(0, 128, 255);
notificationwindow, blankwindow {
background: transparent;
}
.close-button {
/* The notification Close Button */
background: var(--noti-close-bg);
color: var(--text-color);
text-shadow: none;
padding: 0;
border-radius: 100%;
margin-top: 8px;
margin-right: 8px;
box-shadow: none;
border: none;
min-width: 24px;
min-height: 24px;
}
.close-button:hover {
box-shadow: none;
background: var(--noti-close-bg-hover);
transition: var(--hover-tranistion);
border: none;
}
.notification-row {
background: none;
outline: none;
}
.notification-row:focus {
background: var(--noti-bg-focus);
}
.notification-row .notification-background {
padding: 6px 12px;
}
.notification-row .notification-background .notification {
/* The actual notification */
border-radius: var(--border-radius);
border: var(--border);
padding: 0;
transition: var(--hover-tranistion);
background: rgba(var(--noti-bg), var(--noti-bg-alpha));
}
.notification-row .notification-background .notification.low {
/* Low Priority Notification */
}
.notification-row .notification-background .notification.normal {
/* Normal Priority Notification */
}
.notification-row .notification-background .notification.critical {
/* Critical Priority Notification */
}
.notification-row .notification-background .notification .notification-default-action {
/* The large action that also displays the notification summary and body */
padding: 4px;
margin: 0;
box-shadow: none;
background: transparent;
border: none;
color: var(--text-color);
transition: var(--hover-tranistion);
border-radius: var(--border-radius);
}
.notification-row .notification-background .notification .notification-default-action:hover {
-gtk-icon-filter: none;
background: var(--noti-bg-hover);
}
.notification-row .notification-background .notification .notification-default-action:not(:only-child) {
/* When alternative actions are visible */
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.notification-row .notification-background .notification .notification-default-action .notification-content {
background: transparent;
border-radius: var(--border-radius);
padding: 0;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .image {
/* Notification Primary Image */
-gtk-icon-filter: none;
-gtk-icon-size: var(--notification-icon-size);
border-radius: 100px;
/* Size in px */
margin: 4px;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .app-icon {
/* Notification app icon (only visible when the primary image is set) */
-gtk-icon-filter: none;
-gtk-icon-size: var(--notification-app-icon-size);
-gtk-icon-shadow: 0 1px 4px black;
margin: 6px;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .text-box label {
/* Fixes base GTK 4 CSS setting a filter of opacity 50% for some odd reason */
filter: none;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .summary {
/* Notification summary/title */
font-size: var(--font-size-summary);
font-weight: bold;
background: transparent;
color: var(--text-color);
text-shadow: none;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .time {
/* Notification time-ago */
font-size: var(--font-size-summary);
font-weight: bold;
background: transparent;
color: var(--text-color);
text-shadow: none;
margin-right: 30px;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .body {
/* Notification body */
font-size: var(--font-size-body);
font-weight: normal;
background: transparent;
color: var(--text-color);
text-shadow: none;
}
.notification-row .notification-background .notification .notification-default-action .notification-content progressbar {
/* The optional notification progress bar */
margin-top: 4px;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .body-image {
/* The "extra" optional bottom notification image */
margin-top: 4px;
background-color: white;
-gtk-icon-filter: none;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply {
/* The inline reply section */
margin-top: 4px;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-entry {
background: var(--noti-bg-darker);
color: var(--text-color);
caret-color: var(--text-color);
border: var(--border);
border-radius: var(--border-radius);
}
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button {
margin-left: 4px;
background: rgba(var(--noti-bg), var(--noti-bg-alpha));
border: var(--border);
border-radius: var(--border-radius);
color: var(--text-color);
}
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:disabled {
background: initial;
color: var(--text-color-disabled);
border: var(--border);
border-color: transparent;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:hover {
background: var(--noti-bg-hover);
}
.notification-row .notification-background .notification .notification-alt-actions {
background: none;
border-bottom-left-radius: var(--border-radius);
border-bottom-right-radius: var(--border-radius);
padding: 4px;
}
.notification-row .notification-background .notification .notification-action {
/* The alternative actions below the default action */
margin: 4px;
padding: 0;
}
.notification-row .notification-background .notification .notification-action > button {
border-radius: var(--border-radius);
color: var(--text-color);
}
.notification-group {
/* Styling only for Grouped Notifications */
transition: opacity 200ms ease-in-out;
/* The groups close button */
}
.notification-group:focus {
background: var(--noti-bg-focus);
}
.notification-group.low {
/* Low Priority Group */
}
.notification-group.normal {
/* Low Priority Group */
}
.notification-group.critical {
/* Low Priority Group */
}
.notification-group .notification-group-close-button .close-button {
margin: 12px 20px;
}
.notification-group .notification-group-buttons, .notification-group .notification-group-headers {
margin: 0 16px;
color: var(--text-color);
}
.notification-group .notification-group-headers {
/* Notification Group Headers */
}
.notification-group .notification-group-headers .notification-group-icon {
color: var(--text-color);
-gtk-icon-size: var(--notification-group-icon-size);
}
.notification-group .notification-group-headers .notification-group-header {
color: var(--text-color);
}
.notification-group .notification-group-buttons {
/* Notification Group Buttons */
}
.notification-group.collapsed {
/* When another group is expanded, lower the opacity of the collapsed ones */
}
.notification-group.collapsed.not-expanded {
opacity: 0.4;
}
.notification-group.collapsed .notification-row .notification {
background-color: rgba(var(--noti-bg), 1);
}
.notification-group.collapsed .notification-row:not(:last-child) {
/* Top notification in stack */
/* Set lower stacked notifications opacity to 0 */
}
.notification-group.collapsed .notification-row:not(:last-child) .notification-action,
.notification-group.collapsed .notification-row:not(:last-child) .notification-default-action {
opacity: 0;
}
.notification-group.collapsed:hover .notification-row:not(:only-child) .notification {
background-color: var(--noti-bg-hover);
}
.control-center {
/* The Control Center which contains the old notifications + widgets */
background: var(--cc-bg);
color: var(--text-color);
border-radius: var(--border-radius);
}
.control-center .control-center-list-placeholder {
/* The placeholder when there are no notifications */
opacity: 0.5;
}
.control-center .control-center-list {
/* List of notifications */
background: transparent;
}
.control-center .control-center-list .notification {
box-shadow: var(--notification-shadow);
}
.control-center .control-center-list .notification .notification-default-action,
.control-center .control-center-list .notification .notification-action {
transition: var(--group-collapse-tranistion), var(--hover-tranistion);
}
.control-center .control-center-list .notification .notification-default-action:hover,
.control-center .control-center-list .notification .notification-action:hover {
background-color: var(--noti-bg-hover);
}
.blank-window {
/* Window behind control center and on all other monitors */
background: transparent;
}
.floating-notifications {
background: transparent;
}
.floating-notifications .notification {
box-shadow: none;
}
/*** Widgets ***/
.widget {
margin: 8px;
padding: 8px;
border-radius: var(--border-radius);
}
/* Title widget */
.widget-title > label {
margin-right: 8px;
font-size: 1.5rem;
}
.widget-title > button {
margin-left: 8px;
border-radius: var(--border-radius);
}
/* DND widget */
.widget-dnd label {
color: var(--text-color);
margin-right: 8px;
font-size: 1.1rem;
}
.widget-dnd switch {
border-radius: var(--border-radius);
margin-left: 8px;
}
.widget-dnd switch slider {
border-radius: var(--border-radius);
}
/* Label widget */
.widget-label > label {
font-size: 1.1rem;
}
/* Mpris widget */
:root {
--mpris-album-art-overlay: rgba(0, 0, 0, 0.55);
--mpris-button-hover: rgba(0, 0, 0, 0.5);
--mpris-album-art-icon-size: 96px;
--mpris-album-art-shadow: 0px 0px 10px rgba(0, 0, 0, 0.75);
}
.widget-mpris {
padding: 0;
/* The parent to all players */
}
.widget-mpris .widget-mpris-player {
margin: 16px 20px;
border-radius: var(--border-radius);
box-shadow: var(--mpris-album-art-shadow);
}
.widget-mpris .widget-mpris-player .mpris-background {
filter: blur(10px);
}
.widget-mpris .widget-mpris-player .mpris-overlay {
padding: 16px;
background-color: var(--mpris-album-art-overlay);
}
.widget-mpris .widget-mpris-player .mpris-overlay button:hover {
/* The media player buttons (play, pause, next, etc...) */
background: var(--noti-bg-hover);
}
.widget-mpris .widget-mpris-player .mpris-overlay .widget-mpris-album-art {
border-radius: var(--border-radius);
box-shadow: var(--mpris-album-art-shadow);
-gtk-icon-size: var(--mpris-album-art-icon-size);
}
.widget-mpris .widget-mpris-player .mpris-overlay .widget-mpris-title {
font-weight: bold;
font-size: 1.25rem;
}
.widget-mpris .widget-mpris-player .mpris-overlay .widget-mpris-subtitle {
font-size: 1.1rem;
}
.widget-mpris .widget-mpris-player .mpris-overlay > box > button {
/* Change player control buttons */
}
.widget-mpris .widget-mpris-player .mpris-overlay > box > button:hover {
background-color: var(--mpris-button-hover);
}
.widget-mpris > box > button {
/* Change player side buttons */
}
.widget-mpris > box > button:disabled {
/* Change player side buttons insensitive */
}
/* Buttons widget */
.widget-buttons-grid flowboxchild > button {
border-radius: var(--border-radius);
}
.widget-buttons-grid flowboxchild > button.toggle:checked {
/* style given to the active toggle button */
}
/* Menubar widget */
.widget-menubar {
/* The revealer buttons */
/* .AnyName { Name defined in config after #
background-color: rgba(var(--noti-bg), 1.0);
padding: 8px;
margin: 8px;
border-radius: 12px;
}
.AnyName>button {
background: transparent;
border: none;
}
.AnyName>button:hover {
background-color: var(--noti-bg-hover);
} */
}
.widget-menubar > .menu-button-bar {
/* The left button container */
/* The right button container */
/* The left and right button container */
}
.widget-menubar > .menu-button-bar > .start {
margin-left: 8px;
}
.widget-menubar > .menu-button-bar > .end {
margin-right: 8px;
}
.widget-menubar > .menu-button-bar > .widget-menubar-container button {
border-radius: var(--border-radius);
margin: 0 4px;
}
.widget-menubar > revealer * {
margin-top: 8px;
}
.widget-menubar > revealer * button {
border-radius: var(--border-radius);
margin: 8px;
margin-top: 0;
}
.widget-menubar > revealer * button:last-child {
margin-bottom: 0;
}
/* Volume widget */
:root {
--widget-volume-row-icon-size: 24px;
}
/* Each row app icon */
.widget-volume row image {
-gtk-icon-size: var(--widget-volume-row-icon-size);
}
.per-app-volume {
background-color: var(--noti-bg-alt);
margin: 8px;
margin-bottom: 0;
border-radius: var(--border-radius);
}
/* Slider widget */
.widget-slider label {
font-size: inherit;
}
/* Backlight widget */
/* Inhibitors widget */
.widget-inhibitors > label {
margin-right: 8px;
font-size: 1.5rem;
}
.widget-inhibitors > button {
margin-left: 8px;
border-radius: var(--border-radius);
}
+10
View File
@@ -0,0 +1,10 @@
[Unit]
Description=kanshi
After=graphical-session.target
[Service]
type=simple
ExecStart=/usr/bin/kanshi
[Install]
WantedBy=default.target
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=nextcloud
After=network-online.target
Wants=network-online.target systemd-networkd-wait-online.service
[Service]
ExecStart=/usr/bin/nextcloud
Restart=on-failure
RestartSec=5s
LimitNOFILE=65535:65535
[Install]
WantedBy=multi-user.target
+1
View File
@@ -0,0 +1 @@
/home/frosty/.config/systemd/user/kanshi.service
+1
View File
@@ -0,0 +1 @@
/home/frosty/.config/systemd/user/nextcloud.service
+207
View File
@@ -0,0 +1,207 @@
// This configuration is merged with the default vicinae configuration file, which you can obtain by running the `vicinae config default` command.
// Every item defined in this file takes precedence over the values defined in the default config or any other imported file.
//
// You can make manual edits to this file, however you should keep in mind that this file may be written to by vicinae when a configuration change is made through the GUI.
// When that happens, any custom comments or formatting will be lost.
//
// If you want to maintain a configuration file with your own comments and formatting, you should create a separate file and add it to the 'imports' array.
//
// Learn more about configuration at https://docs.vicinae.com/config
{
"$schema": "https://vicinae.com/schemas/config.json",
"imports": [],
"close_on_focus_loss": false,
"consider_preedit": false,
"pop_to_root_on_close": false,
"pop_on_backspace": true,
"activate_on_single_click": false,
"escape_key_behavior": "navigate_back",
"favicon_service": "twenty",
"keybinding": "default",
"pixmap_cache_mb": 50,
"search_files_in_root": false,
"input_server": {
"enabled": true
},
"font": {
"rendering": "qt",
"normal": {
"family": "auto",
"size": 12
}
},
"theme": {
"light": {
"name": "vicinae-light",
"icon_theme": "auto"
},
"dark": {
"name": "vicinae-dark",
"icon_theme": "auto"
}
},
"telemetry": {
"system_info": false
},
"launcher_window": {
"opacity": 1,
"client_side_decorations": {
"enabled": true,
"rounding": 10,
"border_width": 1,
"shadow_size": 12
},
"size": {
"width": 770,
"height": 480
},
"blur": {
"enabled": true
},
"compact_mode": {
"enabled": false
},
"layer_shell": {
"layer": "top",
"keyboard_interactivity": "exclusive",
"enabled": true
}
},
"keybinds": {
"action.copy": "control+shift+C",
"action.copy-name": "control+shift+.",
"action.copy-path": "control+shift+,",
"action.dangerous-remove": "control+shift+X",
"action.duplicate": "control+D",
"action.edit": "control+E",
"action.edit-secondary": "control+shift+E",
"action.move-down": "control+shift+ARROWDOWN",
"action.move-up": "control+shift+ARROWUP",
"action.new": "control+N",
"action.open": "control+O",
"action.pin": "control+shift+P",
"action.refresh": "control+R",
"action.remove": "control+X",
"action.save": "control+S",
"open-search-filter": "control+P",
"open-settings": "control+,",
"toggle-action-panel": "control+B"
},
"favorites": [
"clipboard:history"
],
"fallbacks": [
"files:search"
],
"providers": {
"@jomifepe/store.raycast.bitwarden": {
"preferences": {
"fetchFavicons": true,
"repromptIgnoreDuration": "900000",
"serverUrl": "https://pass.rshyn.site",
"shouldCacheVaultItems": true,
"syncOnLaunch": true,
"windowActionOnCopy": "close",
"cliPath": "/sbin/bw"
}
},
"applications": {
"entrypoints": {
"jconsole-java-openjdk": {
"enabled": false
},
"jconsole-java11-openjdk": {
"enabled": false
},
"jconsole-java17-openjdk": {
"enabled": false
},
"jconsole-java21-openjdk": {
"enabled": false
},
"jshell-java-openjdk": {
"enabled": false
},
"jshell-java11-openjdk": {
"enabled": false
},
"jshell-java17-openjdk": {
"enabled": false
},
"jshell-java21-openjdk": {
"enabled": false
},
"obsidian-wayland": {
"enabled": true
},
"org.gnome.Nautilus": {
"enabled": true
},
"ovito-pro": {
"enabled": true
}
}
},
"browser-extension": {
"enabled": false
},
"core": {
"entrypoints": {
"report-bug": {
"enabled": false
},
"sponsor": {
"enabled": false
}
}
},
"developer": {
"enabled": false
},
"files": {
"enabled": false,
"preferences": {
"autoIndexing": false,
"excludedPaths": "",
"paths": "/home/frosty",
"watcherPaths": ""
}
},
"raycast-compat": {
"enabled": false
},
"system": {
"enabled": false,
"entrypoints": {
"run": {
"enabled": false
},
"toggle-mute": {
"enabled": false
},
"volume-0": {
"enabled": false
},
"volume-100": {
"enabled": false
},
"volume-25": {
"enabled": false
},
"volume-50": {
"enabled": false
},
"volume-75": {
"enabled": false
},
"volume-down": {
"enabled": false
},
"volume-up": {
"enabled": false
}
}
}
}
}
+85
View File
@@ -0,0 +1,85 @@
{
"layer": "top",
"position": "bottom",
"spacing": 5,
"modules-left": ["niri/workspaces", "niri/mode", "wlr/taskbar", "niri/window"],
"modules-center": ["clock"],
"modules-right": ["cpu", "memory", "network", "pulseaudio", "battery", "tray", "custom/poweroff"],
"wlr/taskbar" : {
"format": "{icon}",
"icon-size": 20,
"spacing": 3,
"on-click": "activate",
"on-click-middle": "close",
},
"cpu": {
"format": " {usage}%",
"tooltip": false
},
"memory": {
"format": "\uf4bc {used:0.1f}G | {avail:0.1f}G",
"tooltip": false,
},
"network": {
"family": "ipv4",
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "<span color='#589df6'></span> {essid}",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-disconnected": "<span color='red'>Disconnected ⚠</span>",
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
"interval": 5
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "\ueee8 ",
"format-source": "{volume}%",
"format-source-muted": "",
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["\uf027", "\uf028 "]
},
},
"clock": {
"interval": 1,
"format": "{:%r}",
"format-alt": "{:%A, %B %d, %Y | %r}",
"tooltip-format": "<tt>{calendar}</tt>",
"calendar": {
"format": {
"today": "<span color='red'>{}</span>",
}
},
},
"battery": {
"states": {
// "good": 95,
"warning": 20,
"critical": 10
},
"format": "<span color='#e88939'></span> {capacity}%",
"format-charging": "<span color='#e88939'>\udb80\udc85</span> {capacity}%",
"format-plugged": "",
"format-icons": ["", "", "", "", ""]
},
"niri/window": {
"format": "{app_id}",
"icon" : true
},
"tray": {
"icon-size": 18,
"spacing": 5,
"show-passive-items": "true"
},
/*"custom/poweroff": {
"format": "<span>\udb81\udc25</span> ",
"on-click": "wlogout",
"tooltip": false,
}*/
}
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
CONFIG_FILES="$HOME/.config/waybar/config $HOME/.config/waybar/style.css"
trap "killall waybar" EXIT
while true; do
waybar &
inotifywait -e create,modify $CONFIG_FILES
killall waybar
done
+57
View File
@@ -0,0 +1,57 @@
@define-color foreground #eff0f1;
@define-color foreground-inactive #7f8c8d;
@define-color background #161616;
@define-color background-alt #31363b;
* {
font-family: "NotoSans Nerd Font";
font-size: 16px;
}
window#waybar {
background-image: linear-gradient(to right,
#161616 0%,
#31363b 51%,
#161616 100%);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
#waybar {
background-color: @background;
color: @foreground;
}
#workspaces button {
padding-left: 1em;
padding-right: 1.3em;
color: @foreground-inactive;
}
#workspaces button.focused {
background-color: @background-alt;
color: @foreground;
border-radius: 1px;
}
#taskbar {
color: @foreground;
}
#clock, #battery, #cpu, #memory, #network, #pulseaudio, #tray, #mode, #custom-poweroff {
padding-left: 0.25em;
padding-right: 0.25em;
}
#window {
padding-left: 0.25em;
padding-right: 0.5em;
}
#custom-poweroff {
padding-left: 0;
font-size: 22;
}
#custom-poweroff:hover {
color: red;
}
+8 -7
View File
@@ -1,11 +1,12 @@
export QT_STYLE_OVERRIDE=kvantum
systemctl --user import-enviornment DISPLAY
export XDG_SESSION_TYPE=X11
systemctl --user import-environment DISPLAY
#xrandr --setprovideroutputsource modesetting NVIDIA-0
#xrandr --auto
autorandr --change
xset -dpms
xset s off -dpms
udiskie --tray &
autorandr --change &
xset -dpms
xset s noblank
xset s off -dpms
wal -i ~/.wallpapers
#/home/frosty/.config/polybar/launch.sh &
exec i3
+26 -45
View File
@@ -1,58 +1,24 @@
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source ${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh
fi
export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH=$HOME/.oh-my-zsh
export EDITOR="nvim"
export VISUAL="nvim-qt"
ZSH_THEME="powerlevel10k/powerlevel10k"
CASE_SENSITIVE="true"
zstyle ':omz:update' mode auto # update automatically without asking
zstyle ':omz:update' frequency 7
plugins=(zsh-autosuggestions sudo web-search copyfile dirhistory jsontools)
plugins=(zsh-autosuggestions sudo web-search copypath gitignore zoxide)
source $ZSH/oh-my-zsh.sh
export LANG=en_US.UTF-8
#LAMMPS path variables
export PATH=/home/frosty/Programs/Python/MolSieve/lammps/install/bin:$PATH
#export PYTHONPATH=/home/frosty/Apps/lammps/install/python:$PYTHONPATH
export LD_LIBRARY_PATH=/home/frosty/Programs/Python/MolSieve/lammps/install/lib:$LD_LIBRARY_PATH
#export SLEPC_DIR=/opt/slepc/linux-c-opt
#petsc path variables
#export PYTHONPATH=/home/frosty/Programs/Python/NeoMDWeb/petsc/install/lib:$PYTHONPATH
# -n; string is not null
export EDITOR='nvim'
export VISUAL='nvim'
alias ucpdaemon='/home/frosty/Programs/Rust/UnifiedCopyPaste/target/debug/daemon'
alias ucpserver='/home/frosty/Programs/Rust/UnifiedCopyPaste/target/debug/server'
alias fixWifi='sudo rmmod iwlmvm; sudo rmmod iwlwifi; sudo modprobe iwlmvm; sudo modprobe iwlwifi'
alias weather='curl wttr.in'
alias sshLANL='ssh -t -l rhnatyshyn wtrw.lanl.gov ssh ch-fe.lanl.gov'
alias vim='nvim'
alias neovide='neovide'
function tunnelLANL() {
if [ -n "$1" ]
then
ssh -4 -L 7687:127.0.0.1:7270 rhnatyshyn@wtrw.lanl.gov ssh -L 7270:127.0.0.1:7271 ch-fe ssh -L 7271:127.0.0.1:7687 nid"$1"
else
echo "Specify a node to connect to!"
fi
}
function scan() {
if [ -n "$1" ]
then
scanimage --device "airscan:w0:CANON INC. TS6100 series" --format=png --output-file "$1" --progress
else
scanimage --device "airscan:w0:CANON INC. TS6100 series" --format=png --output-file file.png --progress
fi
}
alias vi='nvim'
alias ws='web_search'
zstyle ':completion:*' completer _complete _approximate
zstyle ':completion:*' group-name ''
@@ -62,7 +28,7 @@ zstyle ':completion:*' file-list all
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
zstyle :compinstall filename '/home/frosty/.zshrc'
zstyle :compinstall filename "$HOME/.zshrc"
autoload -Uz compinit; compinit
HISTFILE=~/.histfile
@@ -71,10 +37,25 @@ SAVEHIST=1000
bindkey -v # bind keys to vim mode
eval "$(zoxide init zsh)"
path+=('/home/frosty/.local/bin')
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
path+=("$GEM_HOME/bin")
# set up ruby if installed
if (($+commands[ruby] )); then
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
path+=("$GEM_HOME/bin")
fi
# set up pyenv if installed
export PYENV_ROOT="$HOME/.pyenv"
if (($+commands[pyenv] )); then
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi
path+=("$HOME/.local/bin/")
export PATH
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
[[ ! -f "$HOME/.p10k.zsh" ]] || source "$HOME/.p10k.zsh"
# put your paths and aliases here to avoid merge conflicts
[[ ! -f "$HOME/.myzsh" ]] || source "$HOME/.myzsh"
[[ -f "$HOME/.profile" ]] && . "$HOME/.profile"