Compare commits
10 commits
7545885942
...
a90cb37e69
Author | SHA1 | Date | |
---|---|---|---|
a90cb37e69 | |||
d249ab216f | |||
0e60d4acac | |||
33f4d22664 | |||
4cd16133e9 | |||
c7b07f2130 | |||
8b19a173fe | |||
78de462017 | |||
3ec1ba5f9b | |||
4d66a5e231 |
19 changed files with 327 additions and 114 deletions
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
temp/
|
||||||
|
result
|
||||||
|
*.png
|
||||||
|
*.jpg
|
||||||
|
*.bak
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
### Dotfiles for Me - Migrating to Nix
|
### Dotfiles for Me - Migrating to Nix
|
||||||
|
|
||||||
Heavy wip, not ready for use.
|
Heavy wip, not ready for use.
|
||||||
|
|
||||||
Will eventually manage my servers and computers.
|
Will eventually manage my servers and computers.
|
||||||
|
|
|
@ -11,10 +11,10 @@ if [[ "$mute" == "" ]]; then
|
||||||
# Change the volume
|
# Change the volume
|
||||||
$(wpctl set-volume @DEFAULT_AUDIO_SINK@ $@)
|
$(wpctl set-volume @DEFAULT_AUDIO_SINK@ $@)
|
||||||
|
|
||||||
# Query Pipewire and Parse Volume as an Int
|
# Query Pipewire and Parse Volume as an Int
|
||||||
volume="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')"
|
volume="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')"
|
||||||
vol=${volume//.}
|
vol=${volume//.}
|
||||||
|
|
||||||
# Send the notification
|
# Send the notification
|
||||||
$(dunstify -h int:value:"$vol" Volume: $vol -h string:x-dunst-stack-tag:volume)
|
$(dunstify -h int:value:"$vol" Volume: $vol -h string:x-dunst-stack-tag:volume)
|
||||||
$(echo $vol > ${XDG_CACHE_HOME:-~/.cache}/eww/vol)
|
$(echo $vol > ${XDG_CACHE_HOME:-~/.cache}/eww/vol)
|
||||||
|
|
|
@ -19,12 +19,12 @@
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: #cac;
|
border-color: #cac;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
|
|
||||||
&.empty {
|
&.empty {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.occupied{
|
&.occupied{
|
||||||
}
|
}
|
||||||
|
|
||||||
&.current {
|
&.current {
|
||||||
|
@ -45,6 +45,9 @@
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cal {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.clock {
|
.clock {
|
||||||
background-color: #536;
|
background-color: #536;
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
;;;; (defpoll time :interval "1s" 'date +%s')
|
;; VARIABLE DEFINITIONS
|
||||||
|
|
||||||
(defwidget clock []
|
|
||||||
(box :orientation "vertical"
|
|
||||||
:halign "center"
|
|
||||||
:valign "end"
|
|
||||||
(box :class "clock" {formattime(EWW_TIME, "%H")})
|
|
||||||
(box :class "clock" {formattime(EWW_TIME, "%M")})
|
|
||||||
))
|
|
||||||
|
|
||||||
|
;; Audio
|
||||||
|
(deflisten vol "cat ~/.cache/eww/vol && inotifywait -q -m -e close_write ~/.cache/eww/vol | while read -r filename event; do cat ~/.cache/eww/vol; done")
|
||||||
|
(defpoll micvol :interval "1m" "wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{print $2}'")
|
||||||
|
|
||||||
|
;; Workspace Stuff
|
||||||
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
|
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
|
||||||
(deflisten current_workspace :initial "..." "bash ~/.config/eww/scripts/get-active-workspace")
|
(deflisten current_workspace :initial "..." "bash ~/.config/eww/scripts/get-active-workspace")
|
||||||
(deflisten urgent_workspace :initial "..." "bash ~/.config/eww/scripts/get-urgent-workspaces")
|
(deflisten urgent_workspace :initial "..." "bash ~/.config/eww/scripts/get-urgent-workspaces")
|
||||||
|
@ -21,13 +19,28 @@
|
||||||
(label :text "${workspace.id}")
|
(label :text "${workspace.id}")
|
||||||
))))))
|
))))))
|
||||||
|
|
||||||
|
;; Screen
|
||||||
|
(deflisten backlight "brightnessctl g && inotifywait -q -m -e modify /sys/class/backlight/intel_backlight/actual_brightness | while read -r filename event; do cat /sys/class/backlight/intel_backlight/actual_brightness; done")
|
||||||
|
|
||||||
(defwidget circle [val prog sty char]
|
|
||||||
|
;; Widgets
|
||||||
|
|
||||||
|
(defwidget clock []
|
||||||
|
(eventbox
|
||||||
|
:onhover "eww open cal"
|
||||||
|
(box :orientation "vertical"
|
||||||
|
:halign "center"
|
||||||
|
:valign "end"
|
||||||
|
(box :class "clock" {formattime(EWW_TIME, "%H")})
|
||||||
|
(box :class "clock" {formattime(EWW_TIME, "%M")})
|
||||||
|
)))
|
||||||
|
|
||||||
|
(defwidget circle [val prog sty char]
|
||||||
(box :halign "center"
|
(box :halign "center"
|
||||||
:orientation "vertical"
|
:orientation "vertical"
|
||||||
:valign "end"
|
:valign "end"
|
||||||
(circular-progress :value prog
|
(circular-progress :value prog
|
||||||
:start-at 10
|
:start-at 10
|
||||||
:clockwise false
|
:clockwise false
|
||||||
:thickness 3
|
:thickness 3
|
||||||
:width 30
|
:width 30
|
||||||
|
@ -38,34 +51,36 @@
|
||||||
(box :class "circle" :style sty char)))
|
(box :class "circle" :style sty char)))
|
||||||
|
|
||||||
(defwidget battery []
|
(defwidget battery []
|
||||||
(circle :prog {EWW_BATTERY.BAT1.capacity * (77778 /100000)}
|
(circle :prog {EWW_BATTERY.BAT1.capacity * (77778 /100000)}
|
||||||
:sty "color: ${EWW_BATTERY.BAT1.status == 'Charging' ? '#1a1': EWW_BATTERY.BAT1.capacity < 20 ? '#a11': '#cac'};"
|
:sty "color: ${EWW_BATTERY.BAT1.status == 'Charging' ? '#1a1': EWW_BATTERY.BAT1.capacity < 20 ? '#a11': '#cac'};"
|
||||||
:val {EWW_BATTERY.BAT1.capacity}
|
:val {EWW_BATTERY.BAT1.capacity}
|
||||||
:char ""))
|
:char ""))
|
||||||
|
|
||||||
(deflisten vol "cat ~/.cache/eww/vol && inotifywait -q -m -e close_write ~/.cache/eww/vol | while read -r filename event; do cat ~/.cache/eww/vol; done")
|
(defwidget volume []
|
||||||
|
(eventbox
|
||||||
(defwidget volume []
|
:onclick "hyprctl dispatch exec 'pavucontrol -t 3'"
|
||||||
(circle :prog {vol * 7/10}
|
:onscroll "if [ {} == 'up' ]; then /etc/nixos/config/dunst/scripts/volumeNotify.sh 1%+; else /etc/nixos/config/dunst/scripts/volumeNotify.sh 1%-; fi"
|
||||||
:sty "font-size: 12; margin-right: 2px;"
|
(circle :prog {vol * 7/10}
|
||||||
:val {vol + 1 - 1}
|
:sty "font-size: 12; margin-right: 2px;"
|
||||||
:char ""))
|
:val {vol + 1 - 1}
|
||||||
|
:char "")))
|
||||||
(defpoll micvol :interval "1m" "wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{print $2}'")
|
|
||||||
|
|
||||||
(defwidget mic []
|
(defwidget mic []
|
||||||
(circle :prog {micvol * 70}
|
(eventbox
|
||||||
:sty "margin-left: 1px;"
|
:onclick "hyprctl dispatch exec 'pavucontrol -t 4'"
|
||||||
:val {micvol *100}
|
:onscroll "if [ {} == 'up' ]; then wpctl set-volume -l 1 @DEFAULT_SOURCE@ 1%+; else wpctl set-volume @DEFAULT_SOURCE@ 1%-; fi"
|
||||||
:char ""))
|
(circle :prog {micvol * 70}
|
||||||
|
:sty "margin-left: 1px;"
|
||||||
(deflisten backlight "brightnessctl g && inotifywait -q -m -e modify /sys/class/backlight/intel_backlight/actual_brightness | while read -r filename event; do cat /sys/class/backlight/intel_backlight/actual_brightness; done")
|
:val {micvol *100}
|
||||||
|
:char "")))
|
||||||
|
|
||||||
(defwidget brightness []
|
(defwidget brightness []
|
||||||
(circle :prog {(backlight / 960) * 7/10}
|
(eventbox
|
||||||
:sty "font-size: 12; margin-right: 3px;"
|
:onscroll "if [ {} == 'up' ]; then brightnessctl -d intel_backlight set 1%+; else brightnessctl -d intel_backlight set 1%-; fi"
|
||||||
:val {round( backlight / 960, 0) - 1}
|
(circle :prog {(backlight / 960) * 7/10}
|
||||||
:char ""))
|
:sty "font-size: 12; margin-right: 3px;"
|
||||||
|
:val {round( backlight / 960, 0) - 1}
|
||||||
|
:char "")))
|
||||||
|
|
||||||
(defwidget power []
|
(defwidget power []
|
||||||
(box :class "power" :valign "end" "⏻"))
|
(box :class "power" :valign "end" "⏻"))
|
||||||
|
@ -73,28 +88,51 @@
|
||||||
(defwidget tray []
|
(defwidget tray []
|
||||||
(systray :orientation "v" :icon-size 20))
|
(systray :orientation "v" :icon-size 20))
|
||||||
|
|
||||||
|
|
||||||
|
;; Upper Level Widgets
|
||||||
|
|
||||||
|
|
||||||
(defwidget bar []
|
(defwidget bar []
|
||||||
(centerbox :orientation "vertical"
|
(centerbox :orientation "vertical"
|
||||||
:halign "center"
|
:halign "center"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
(_workspaces)
|
(_workspaces)
|
||||||
(clock)
|
(clock)
|
||||||
(box :orientation "vertical" :spacing -25 :valign "end"
|
(box :orientation "vertical" :spacing -25 :valign "end"
|
||||||
(brightness)
|
(brightness)
|
||||||
(mic)
|
(mic)
|
||||||
(volume)
|
(volume)
|
||||||
(battery)
|
(battery)
|
||||||
(tray)
|
(tray)
|
||||||
(power))))
|
(power))))
|
||||||
|
|
||||||
|
(defwidget cal []
|
||||||
|
(box
|
||||||
|
:class "cal"
|
||||||
|
(eventbox
|
||||||
|
:onhoverlost "eww close cal"
|
||||||
|
(calendar))))
|
||||||
|
|
||||||
|
|
||||||
|
;; Windows
|
||||||
|
|
||||||
(defwindow bar
|
(defwindow bar
|
||||||
:monitor 0
|
:monitor 0
|
||||||
:geometry (geometry :x "4px"
|
:geometry (geometry :x "4px"
|
||||||
:y "1%"
|
:y "1%"
|
||||||
:height "98%"
|
:height "98%"
|
||||||
:anchor "left center")
|
:anchor "left center")
|
||||||
:stacking "fg"
|
:stacking "fg"
|
||||||
:exclusive true
|
:exclusive true
|
||||||
:class "bar"
|
:class "bar"
|
||||||
(bar))
|
(bar))
|
||||||
|
|
||||||
|
(defwindow cal
|
||||||
|
:monitor 0
|
||||||
|
:geometry (geometry :x "1%"
|
||||||
|
:y "5%"
|
||||||
|
:anchor "left center")
|
||||||
|
:stacking "fg"
|
||||||
|
:exclusive false
|
||||||
|
:class "bar"
|
||||||
|
(cal))
|
||||||
|
|
|
@ -1,32 +1,39 @@
|
||||||
# Binding Config File for Hyprland
|
# Binding Config File for Hyprland
|
||||||
|
|
||||||
# Main Bindings
|
# Main Bindings
|
||||||
#
|
|
||||||
# Foot, you done goofed
|
|
||||||
bind=ALT,RETURN,exec,foot
|
|
||||||
#bind=ALT,RETURN,exec,kitty
|
|
||||||
|
|
||||||
bind=ALT,Q,killactive,
|
# Programs
|
||||||
bind=SUPER,M,exec,hyprctl dispatch exit 0
|
bind=ALT,B,exec,swaylock
|
||||||
bind=ALT,E,exec,dolphin
|
bind=ALT,E,exec,dolphin
|
||||||
|
bind=ALT,F,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh
|
||||||
|
bind=ALT,G,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh clip
|
||||||
|
bind=ALT,RETURN,exec,footclient
|
||||||
|
bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images
|
||||||
|
|
||||||
|
|
||||||
|
# Basic Actions
|
||||||
|
bind=ALT,Q,killactive,
|
||||||
bind=ALT,V,togglefloating,
|
bind=ALT,V,togglefloating,
|
||||||
bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images
|
|
||||||
bind=ALTSHIFT,F,fullscreen,1
|
bind=ALTSHIFT,F,fullscreen,1
|
||||||
bind=ALTSHIFT,M,fullscreen,0
|
bind=ALTSHIFT,M,fullscreen,0
|
||||||
bind=,Print,exec,grim -g "$(slurp)" -t jpeg - | wl-copy
|
bind=SUPER,M,exec,hyprctl dispatch exit 0
|
||||||
bind=SHIFT,Print,exec,grim -g "$(slurp)" -t jpeg Downloads/screenshot.jpeg
|
|
||||||
|
# Screenshots
|
||||||
|
bind=,Print,exec,slurp | grim -t jpeg -g - - | wl-copy
|
||||||
|
bind=SHIFT,Print,exec,slurp | grim -t jpeg -g - Downloads/screenshot.jpeg
|
||||||
|
bind=SHIFTSUPER,Print,exec,hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -t jpeg -g - - | wl-copy
|
||||||
|
bind=SUPER,Print,exec,hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - Downloads/screenshot.jpeg
|
||||||
|
|
||||||
# trigger when the switch is toggled
|
# trigger when the switch is toggled
|
||||||
bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale
|
bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Games
|
# Games
|
||||||
bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe"
|
|
||||||
bind=ALTSHIFT,O,exec,osu-lazer
|
|
||||||
bind=ALTSHIFT,C,exec,"/home/flyingstitchman/Documents/Games/Celeste/Celeste"
|
bind=ALTSHIFT,C,exec,"/home/flyingstitchman/Documents/Games/Celeste/Celeste"
|
||||||
bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley"
|
bind=ALTSHIFT,O,exec,osu-lazer
|
||||||
bind=ALTSHIFT,R,exec,"/home/flyingstitchman/Documents/Games/factorio/bin/x64/factorio"
|
bind=ALTSHIFT,R,exec,"/home/flyingstitchman/Documents/Games/factorio/bin/x64/factorio"
|
||||||
|
bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley"
|
||||||
|
bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe"
|
||||||
|
|
||||||
|
|
||||||
# Window Moving
|
# Window Moving
|
||||||
|
@ -35,7 +42,7 @@ bindm=SUPER,mouse:273,resizewindow
|
||||||
|
|
||||||
# Quick Bindings
|
# Quick Bindings
|
||||||
bindle=,XF86MonBrightnessDown,exec,brightnessctl -d intel_backlight set 1%-
|
bindle=,XF86MonBrightnessDown,exec,brightnessctl -d intel_backlight set 1%-
|
||||||
bindle=,XF86MonBrightnessUp,exec,brightnessctl -d intel_backlight set +1%
|
bindle=,XF86MonBrightnessUp,exec,brightnessctl -d intel_backlight set +1%
|
||||||
|
|
||||||
bindle=,XF86AudioRaiseVolume,exec,${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/volumeNotify.sh 1%+
|
bindle=,XF86AudioRaiseVolume,exec,${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/volumeNotify.sh 1%+
|
||||||
bindle=,XF86AudioLowerVolume,exec,${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/volumeNotify.sh 1%-
|
bindle=,XF86AudioLowerVolume,exec,${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/volumeNotify.sh 1%-
|
||||||
|
|
|
@ -26,7 +26,7 @@ input {
|
||||||
sensitivity=.4
|
sensitivity=.4
|
||||||
accel_profile=adaptive
|
accel_profile=adaptive
|
||||||
|
|
||||||
touchpad {
|
touchpad {
|
||||||
natural_scroll=false
|
natural_scroll=false
|
||||||
disable_while_typing=false
|
disable_while_typing=false
|
||||||
}
|
}
|
||||||
|
@ -58,11 +58,11 @@ decoration {
|
||||||
shadow_range=15
|
shadow_range=15
|
||||||
shadow_render_power=2
|
shadow_render_power=2
|
||||||
shadow_ignore_window=1
|
shadow_ignore_window=1
|
||||||
col.shadow=0xdb331153
|
col.shadow=0xdb331153
|
||||||
col.shadow_inactive=0x99333333
|
col.shadow_inactive=0x99333333
|
||||||
shadow_offset=3 2
|
shadow_offset=3 2
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
rounding=15
|
rounding=15
|
||||||
inactive_opacity=.8
|
inactive_opacity=.8
|
||||||
fullscreen_opacity=1 multiplier
|
fullscreen_opacity=1 multiplier
|
||||||
|
@ -70,7 +70,7 @@ decoration {
|
||||||
|
|
||||||
animations {
|
animations {
|
||||||
enabled=true
|
enabled=true
|
||||||
|
|
||||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||||
|
|
||||||
animation = windows, 1, 7, myBezier
|
animation = windows, 1, 7, myBezier
|
||||||
|
@ -78,7 +78,7 @@ animations {
|
||||||
animation = border, 1, 10, default
|
animation = border, 1, 10, default
|
||||||
animation = borderangle, 1, 8, default
|
animation = borderangle, 1, 8, default
|
||||||
animation = fade, 1, 7, default
|
animation = fade, 1, 7, default
|
||||||
animation = workspaces, 1, 6, default
|
animation = workspaces, 1, 6, default
|
||||||
}
|
}
|
||||||
|
|
||||||
dwindle {
|
dwindle {
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
# Window Rule Config File
|
# Window Rule Config File
|
||||||
|
|
||||||
# WLogout Configuration
|
# Application Fixes
|
||||||
# Might move to separate file cause screen resolutions whack
|
# Foot Fullscreen Transparency Fix
|
||||||
|
windowrulev2 = syncfullscreen 0, class:(foot), title:(foot)
|
||||||
|
|
||||||
windowrule=nofocus,ibus,^(Ibus-ui-gtk3)$
|
windowrule=nofocus,ibus,^(Ibus-ui-gtk3)$
|
||||||
|
|
||||||
|
# WLogout Configuration
|
||||||
|
# Might move to separate file cause screen resolutions whack
|
||||||
windowrule=move 720 222,wlogout
|
windowrule=move 720 222,wlogout
|
||||||
windowrule=size 2000 1000,wlogout
|
windowrule=size 2000 1000,wlogout
|
||||||
windowrule=tile,xyz
|
windowrule=tile,xyz
|
||||||
|
|
|
@ -3,6 +3,7 @@ local map = vim.keymap.set
|
||||||
|
|
||||||
-- jk exit from insert mode
|
-- jk exit from insert mode
|
||||||
map("i", "jk", "<cmd>noh<cr><Esc>", { silent = true })
|
map("i", "jk", "<cmd>noh<cr><Esc>", { silent = true })
|
||||||
|
map({"n", "x"}, "<Esc>", "<cmd>noh<cr><Esc>", { silent = true })
|
||||||
|
|
||||||
----
|
----
|
||||||
-- Movements
|
-- Movements
|
||||||
|
@ -17,13 +18,13 @@ map({ "n", "x" }, "<S-k>", "6k")
|
||||||
map({ "n", "x" }, "M", "J", { desc = "Merge" }) -- Replace the join command
|
map({ "n", "x" }, "M", "J", { desc = "Merge" }) -- Replace the join command
|
||||||
map("n", "gh", vim.lsp.buf.hover, { desc = "Hover" }) -- Code action hover
|
map("n", "gh", vim.lsp.buf.hover, { desc = "Hover" }) -- Code action hover
|
||||||
|
|
||||||
|
|
||||||
-- Move to window using the <ctrl> hjkl keys
|
-- Move to window using the <ctrl> hjkl keys
|
||||||
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
|
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
|
||||||
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window", remap = true })
|
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window", remap = true })
|
||||||
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window", remap = true })
|
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window", remap = true })
|
||||||
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window", remap = true })
|
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window", remap = true })
|
||||||
|
|
||||||
-- Move between buffers
|
-- Move between buffers
|
||||||
map("n", "<S-h>", "<cmd>BufferLineCyclePrev<CR>", { desc = "Move buffer left", silent = true })
|
map("n", "<S-h>", "<cmd>BufferLineCyclePrev<CR>", { desc = "Move buffer left", silent = true })
|
||||||
map("n", "<S-l>", "<cmd>BufferLineCycleNext<CR>", { desc = "Move buffer right", silent = true })
|
map("n", "<S-l>", "<cmd>BufferLineCycleNext<CR>", { desc = "Move buffer right", silent = true })
|
||||||
|
@ -33,6 +34,8 @@ map("n", "<leader>>", "<cmd>BufferLineMoveNext<CR>", { desc = "Move buffer right
|
||||||
-- ToggleTerm Bindings
|
-- ToggleTerm Bindings
|
||||||
map("n", "<leader>a", "<cmd>ToggleTerm name=main<CR>", { desc = "Floating Terminal", silent = true })
|
map("n", "<leader>a", "<cmd>ToggleTerm name=main<CR>", { desc = "Floating Terminal", silent = true })
|
||||||
|
|
||||||
|
-- Undotree
|
||||||
|
map('n', '<leader>fu', vim.cmd.UndotreeToggle)
|
||||||
----
|
----
|
||||||
-- Cool Macros
|
-- Cool Macros
|
||||||
----
|
----
|
||||||
|
@ -50,6 +53,72 @@ map("n", "<leader>e", function()
|
||||||
require("neo-tree.command").execute({ action = "show", position = "right", toggle = true, dir = vim.loop.cwd() })
|
require("neo-tree.command").execute({ action = "show", position = "right", toggle = true, dir = vim.loop.cwd() })
|
||||||
end, { desc = "Open Neotree", remap = true })
|
end, { desc = "Open Neotree", remap = true })
|
||||||
|
|
||||||
|
|
||||||
|
-- Conform Formatting
|
||||||
|
map({ "n", "v" }, "<leader>mp", function()
|
||||||
|
require("conform").format({
|
||||||
|
lsp_fallback = true,
|
||||||
|
async = false,
|
||||||
|
timeout_ms = 500,
|
||||||
|
})
|
||||||
|
end, { desc = "Format file or range (in visual mode)" })
|
||||||
|
|
||||||
|
-- diagnostic
|
||||||
|
---@param next "f"|"b"
|
||||||
|
---@param severity "ERROR"|"WARN"?
|
||||||
|
local diagnostic_goto = function(next, severity)
|
||||||
|
local go = (next == "f") and vim.diagnostic.goto_next or vim.diagnostic.goto_prev
|
||||||
|
local severity_index = severity and vim.diagnostic.severity[severity] or nil
|
||||||
|
return function()
|
||||||
|
go({ severity = severity_index })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
map("n", "<leader>cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" })
|
||||||
|
map("n", "]d", diagnostic_goto("f"), { desc = "Next Diagnostic" })
|
||||||
|
map("n", "[d", diagnostic_goto("b"), { desc = "Prev Diagnostic" })
|
||||||
|
map("n", "]e", diagnostic_goto("f", "ERROR"), { desc = "Next Error" })
|
||||||
|
map("n", "[e", diagnostic_goto("b", "ERROR"), { desc = "Prev Error" })
|
||||||
|
map("n", "]w", diagnostic_goto("f", "WARN"), { desc = "Next Warning" })
|
||||||
|
map("n", "[w", diagnostic_goto("b", "WARN"), { desc = "Prev Warning" })
|
||||||
|
|
||||||
|
----
|
||||||
|
-- Plugins
|
||||||
|
----
|
||||||
|
|
||||||
|
-- Telescope (fuzzy finder)
|
||||||
|
local function telescope_git_fallback()
|
||||||
|
vim.fn.system("git rev-parse --is-inside-work-tree")
|
||||||
|
local is_git_repo = vim.v.shell_error == 0
|
||||||
|
|
||||||
|
if is_git_repo then
|
||||||
|
require("telescope.builtin").git_files()
|
||||||
|
else
|
||||||
|
require("telescope.builtin").find_files()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local function telescope_files()
|
||||||
|
require("telescope.builtin").find_files({ cwd = vim.uv.cwd() })
|
||||||
|
end
|
||||||
|
local function telescope_oldfiles()
|
||||||
|
require("telescope.builtin").oldfiles({ cwd = vim.uv.cwd() })
|
||||||
|
end
|
||||||
|
local function telescope_live_grep()
|
||||||
|
vim.fn.system("git rev-parse --is-inside-work-tree")
|
||||||
|
local is_git_repo = vim.v.shell_error == 0
|
||||||
|
local git_root = vim.fn.fnamemodify(vim.fn.finddir(".git", ".;"), ":h")
|
||||||
|
|
||||||
|
require("telescope.builtin").live_grep({
|
||||||
|
cwd = is_git_repo and git_root or vim.uv.cwd(),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
map("n", "<leader><space>", telescope_git_fallback, { desc = "Find files (git/fallback, cwd)" })
|
||||||
|
map("n", "<leader>ff", telescope_files, { desc = "Find files (cwd)" })
|
||||||
|
map("n", "<leader>fo", telescope_oldfiles, { desc = "Find files (cwd)" })
|
||||||
|
map("n", "<leader>/", telescope_live_grep, { desc = "Live grep (cwd)" })
|
||||||
|
map("n", "<leader>,", require("telescope.builtin").buffers, { desc = "Find buffers" })
|
||||||
|
map("n", "<leader>\"", require("telescope.builtin").registers, { desc = "Find registers" })
|
||||||
|
|
||||||
|
|
||||||
----
|
----
|
||||||
-- Fixes
|
-- Fixes
|
||||||
----
|
----
|
||||||
|
@ -80,3 +149,5 @@ map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to upper window" })
|
||||||
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to right window" })
|
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to right window" })
|
||||||
map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
||||||
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,18 +6,18 @@ require'lspconfig'.texlab.setup{}
|
||||||
require'lspconfig'.svls.setup{}
|
require'lspconfig'.svls.setup{}
|
||||||
require'lspconfig'.pylsp.setup{
|
require'lspconfig'.pylsp.setup{
|
||||||
settings = {
|
settings = {
|
||||||
|
formatCommand = {"black"},
|
||||||
pylsp = {
|
pylsp = {
|
||||||
plugins = {
|
plugins = {
|
||||||
pycodestyle = {
|
jedai_completion = {
|
||||||
ignore = {'W391'},
|
fuzzy = true
|
||||||
maxLineLength = 100
|
|
||||||
},
|
},
|
||||||
pylint = {
|
pyflakes = {
|
||||||
enabled = false
|
enabled = true
|
||||||
},
|
},
|
||||||
pyflakes = {
|
pylsp_mypy = {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,15 @@ cmp.setup {
|
||||||
package.path = package.path .. ";/etc/nixos/config/nvim"
|
package.path = package.path .. ";/etc/nixos/config/nvim"
|
||||||
|
|
||||||
-- Funky plugins
|
-- Funky plugins
|
||||||
|
require("conform").setup({
|
||||||
|
formatters_by_ft = {
|
||||||
|
python = { "isort", "black" },
|
||||||
|
},
|
||||||
|
format_on_save = {
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_format = "fallback",
|
||||||
|
},
|
||||||
|
})
|
||||||
require("bufferline").setup({ options = {
|
require("bufferline").setup({ options = {
|
||||||
always_show_bufferline = true,
|
always_show_bufferline = true,
|
||||||
show_buffer_close_icons = false,
|
show_buffer_close_icons = false,
|
||||||
|
|
|
@ -12,4 +12,4 @@ inside-color 00000088
|
||||||
separator-color 00000000
|
separator-color 00000000
|
||||||
fade-in=0.2
|
fade-in=0.2
|
||||||
datestr="%a, %b %e %Y"
|
datestr="%a, %b %e %Y"
|
||||||
greyscale
|
greyscale
|
||||||
|
|
|
@ -102,7 +102,7 @@ compinit
|
||||||
# End of lines added by compinstall
|
# End of lines added by compinstall
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(zoxide init zsh)"
|
||||||
|
|
||||||
|
|
||||||
# Default Programs
|
# Default Programs
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
|
|
||||||
|
|
102
flake.lock
102
flake.lock
|
@ -1,5 +1,40 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-compat": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"revCount": 57,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixpkgs-xr",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730504689,
|
||||||
|
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -7,11 +42,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730450782,
|
"lastModified": 1730837930,
|
||||||
"narHash": "sha256-0AfApF8aexgB6o34qqLW2cCX4LaWJajBVdU6ddiWZBM=",
|
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "8ca921e5a806b5b6171add542defe7bdac79d189",
|
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -24,11 +59,11 @@
|
||||||
"mobile-nixos": {
|
"mobile-nixos": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730307383,
|
"lastModified": 1730912712,
|
||||||
"narHash": "sha256-EJYo2VPXVMGQbY+bI4Xav14fXXioBt3KICtXNI6i76o=",
|
"narHash": "sha256-T5A9I6Tfh9zrv9sRWfu/ZKN6VkE670YQ6bjC5sbpTzk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "mobile-nixos",
|
"repo": "mobile-nixos",
|
||||||
"rev": "0516be85630befa2c1e8042ac873342ce186b2f6",
|
"rev": "2268e358ed407d9c0a4499ae767d105eeaeec586",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -39,11 +74,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730368399,
|
"lastModified": 1730919458,
|
||||||
"narHash": "sha256-F8vJtG389i9fp3k2/UDYHMed3PLCJYfxCqwiVP7b9ig=",
|
"narHash": "sha256-yMO0T0QJlmT/x4HEyvrCyigGrdYfIXX3e5gWqB64wLg=",
|
||||||
"owner": "Nixos",
|
"owner": "Nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "da14839ac5f38ee6adbdb4e6db09b5eef6d6ccdc",
|
"rev": "e1cc1f6483393634aee94514186d21a4871e78d7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -55,15 +90,15 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730200266,
|
"lastModified": 1730785428,
|
||||||
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
|
||||||
"owner": "Nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
|
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
|
@ -85,13 +120,50 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-xr": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730942067,
|
||||||
|
"narHash": "sha256-F+MvnvRlRcL8BktdqOK6LRoVhyFX/jzWfcm0mPbJNeY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs-xr",
|
||||||
|
"rev": "87d61362cb82ed15d54dd56b24944f3404646c72",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs-xr",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730785428,
|
||||||
|
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"mobile-nixos": "mobile-nixos",
|
"mobile-nixos": "mobile-nixos",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-quartus": "nixpkgs-quartus"
|
"nixpkgs-quartus": "nixpkgs-quartus",
|
||||||
|
"nixpkgs-xr": "nixpkgs-xr"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{
|
{
|
||||||
description = "System Configuration Flake";
|
description = "System Configuration Flake";
|
||||||
|
outputs = inputs@{
|
||||||
|
|
||||||
outputs = inputs@{
|
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixpkgs-xr,
|
nixpkgs-xr,
|
||||||
nixos-hardware,
|
nixos-hardware,
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
services.logind.powerKey = "ignore";
|
services.logind.powerKey = "ignore";
|
||||||
services.logind.powerKeyLongPress = "poweroff";
|
services.logind.powerKeyLongPress = "poweroff";
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "lappy";
|
hostName = "lappy";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
};
|
};
|
||||||
time.timeZone = "America/Lost_Angeles";
|
time.timeZone = "America/Lost_Angeles";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config, nixpkgs-xr, pkgs, lib, ... }:
|
{ config, nixpkgs-xr, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
passthrough = pkgs.writeShellApplication {
|
passthrough = pkgs.writeShellApplication {
|
||||||
name = "passthrough.sh";
|
name = "passthrough.sh";
|
||||||
runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs;
|
runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs;
|
||||||
text = ''
|
text = ''
|
||||||
|
@ -116,7 +116,7 @@ in {
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.wlx-overlay-s ];
|
pkgs.wlx-overlay-s ];
|
||||||
|
|
||||||
networking.hostName = "malachite";
|
networking.hostName = "malachite";
|
||||||
|
|
||||||
time.timeZone = "America/Los_Angeles";
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
XRT_COMPOSITOR_COMPUTE = "1";
|
XRT_COMPOSITOR_COMPUTE = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
|
|
|
@ -64,13 +64,17 @@ in
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
environment.systemPackages = (lib.attrVals [
|
environment.systemPackages = (lib.attrVals [
|
||||||
|
"black"
|
||||||
"btop"
|
"btop"
|
||||||
|
"ccls"
|
||||||
"eza"
|
"eza"
|
||||||
"fd"
|
"fd"
|
||||||
|
"fzf"
|
||||||
"git"
|
"git"
|
||||||
"glib"
|
"glib"
|
||||||
"gnumake"
|
"gnumake"
|
||||||
"gnupg"
|
"gnupg"
|
||||||
|
"mypy"
|
||||||
"neofetch"
|
"neofetch"
|
||||||
"p7zip"
|
"p7zip"
|
||||||
"pinentry"
|
"pinentry"
|
||||||
|
@ -97,6 +101,7 @@ in
|
||||||
customRC = builtins.readFile ../config/nvim/init.vim;
|
customRC = builtins.readFile ../config/nvim/init.vim;
|
||||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||||
start = [
|
start = [
|
||||||
|
conform-nvim
|
||||||
bufferline-nvim
|
bufferline-nvim
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
cmp_luasnip
|
cmp_luasnip
|
||||||
|
@ -113,6 +118,7 @@ in
|
||||||
toggleterm-nvim
|
toggleterm-nvim
|
||||||
tokyonight-nvim
|
tokyonight-nvim
|
||||||
typst-vim
|
typst-vim
|
||||||
|
undotree
|
||||||
vim-lsp-cxx-highlight
|
vim-lsp-cxx-highlight
|
||||||
which-key-nvim
|
which-key-nvim
|
||||||
];
|
];
|
||||||
|
|
|
@ -60,9 +60,10 @@ in
|
||||||
kicad
|
kicad
|
||||||
#steamvr?
|
#steamvr?
|
||||||
procps
|
procps
|
||||||
|
ripgrep
|
||||||
usbutils
|
usbutils
|
||||||
yt-dlp
|
yt-dlp
|
||||||
(python311.withPackages (lib.attrVals [ "matplotlib" "python-lsp-server" "sympy"]))
|
(python3.withPackages (lib.attrVals [ "matplotlib" "pyflakes" "python-lsp-server" "sympy"]))
|
||||||
]
|
]
|
||||||
++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs)
|
++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs)
|
||||||
++ (lib.optionals (nixosConfig.stitchyconf.form == "pc") pcPkgs);
|
++ (lib.optionals (nixosConfig.stitchyconf.form == "pc") pcPkgs);
|
||||||
|
|
Loading…
Reference in a new issue