Compare commits
No commits in common. "main" and "arch" have entirely different histories.
|
@ -0,0 +1,19 @@
|
|||
# Dot Files
|
||||
This repository contains the configuration files for some of the programs I use. There is also a handy setup script that should configure everything for you.
|
||||
|
||||
## Usage
|
||||
This is quite outdated and might not be completely accurate anymore.
|
||||
To use these configuration files you first have to make sure you have the following programs installed:
|
||||
- fish
|
||||
- neovim
|
||||
|
||||
Once you have these programs installed you can clone the repository into a place you like and run the setup script. The setup script will detect existing configuration files and leave them alone. This means that if you are replacing an old configuration you need to delete it first.
|
||||
```bash
|
||||
# Clone the repository into the folder .dots in your home directory.
|
||||
git clone https://git.kallestruik.nl/kalle/dotfiles.git ~/.dots
|
||||
|
||||
# Execute the install script.
|
||||
cd ~/.dots
|
||||
bash setup.sh
|
||||
```
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Name=Latex document
|
||||
Comment=A blank latex document
|
||||
Type=Link
|
||||
URL=src/Latex document.tex
|
||||
Icon=text-x-bibtex
|
|
@ -0,0 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Name=Shell script
|
||||
Comment=A blank shell script
|
||||
Type=Link
|
||||
URL=src/Shell script.sh
|
||||
Icon=text-x-script
|
|
@ -0,0 +1,9 @@
|
|||
\documentclass{article} % This command is used to set the type of document you are working on such as an article, book, or presenation
|
||||
|
||||
\usepackage{geometry} % This package allows the editing of the page layout
|
||||
\usepackage{amsmath} % This package allows the use of a large range of mathematical formula, commands, and symbols
|
||||
\usepackage{graphicx} % This package allows the importing of images
|
||||
|
||||
\begin{document}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1 @@
|
|||
#!/usr/bin/env bash
|
|
@ -1,46 +0,0 @@
|
|||
import { GTK_ALIGN_CENTER, GTK_ALIGN_END, GTK_ALIGN_START } from "../constants.js"
|
||||
import { Clock } from "./Clock.js"
|
||||
import { SysTray } from "./Systray.js"
|
||||
|
||||
function BarStart() {
|
||||
return Widget.Box({
|
||||
halign: GTK_ALIGN_START,
|
||||
children: [
|
||||
Widget.Label({ label: "Start" }),
|
||||
Widget.Button({ label: "Button", onClicked: () => App.ToggleWindow("media2") }),
|
||||
],
|
||||
})
|
||||
}
|
||||
function BarCenter() {
|
||||
return Widget.Box({
|
||||
halign: GTK_ALIGN_CENTER,
|
||||
children: [
|
||||
Clock(),
|
||||
],
|
||||
})
|
||||
}
|
||||
function BarEnd() {
|
||||
return Widget.Box({
|
||||
halign: GTK_ALIGN_END,
|
||||
children: [
|
||||
SysTray(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
export function Bar(monitor = 0) {
|
||||
return Widget.Window({
|
||||
monitor,
|
||||
exclusivity: "exclusive",
|
||||
className: "bar",
|
||||
margins: [5, 5, 0, 5],
|
||||
name: `bar${monitor}`,
|
||||
anchor: ["left", "top", "right"],
|
||||
child: Widget.CenterBox({
|
||||
vertical: false,
|
||||
startWidget: BarStart(),
|
||||
centerWidget: BarCenter(),
|
||||
endWidget: BarEnd(),
|
||||
})
|
||||
})
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
const time = Variable("", {
|
||||
poll: [1000, 'date "+%H:%M"'],
|
||||
})
|
||||
|
||||
const date = Variable("", {
|
||||
poll: [1000, 'date "+%Y-%m-%d"'],
|
||||
})
|
||||
|
||||
export function Clock() {
|
||||
return Widget.Box({
|
||||
className: "clock",
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Label({
|
||||
className: "time",
|
||||
label: time.bind(),
|
||||
}),
|
||||
Widget.Label({
|
||||
className: "date",
|
||||
label: date.bind(),
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
const systemtray = await Service.import("systemtray")
|
||||
|
||||
export function SysTray() {
|
||||
const items = systemtray.bind("items")
|
||||
.as(items => items.map(item => Widget.Button({
|
||||
child: Widget.Icon({ icon: item.bind("icon") }),
|
||||
on_primary_click: (_, event) => item.activate(event),
|
||||
on_secondary_click: (_, event) => item.openMenu(event),
|
||||
tooltip_markup: item.bind("tooltip_markup"),
|
||||
})))
|
||||
|
||||
return Widget.Box({
|
||||
className: "systray",
|
||||
children: items,
|
||||
})
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
@define-color ctp-rosewater #f5e0dc;
|
||||
@define-color ctp-flamingo #f2cdcd;
|
||||
@define-color ctp-pink #f5c2e7;
|
||||
@define-color ctp-mauve #cba6f7;
|
||||
@define-color ctp-red #f38ba8;
|
||||
@define-color ctp-maroon #eba0ac;
|
||||
@define-color ctp-peach #fab387;
|
||||
@define-color ctp-yellow #f9e2af;
|
||||
@define-color ctp-green #a6e3a1;
|
||||
@define-color ctp-teal #94e2d5;
|
||||
@define-color ctp-sky #89dceb;
|
||||
@define-color ctp-sapphire #74c7ec;
|
||||
@define-color ctp-blue #89b4fa;
|
||||
@define-color ctp-lavender #b4befe;
|
||||
@define-color ctp-text #cdd6f4;
|
||||
@define-color ctp-subtext1 #bac2de;
|
||||
@define-color ctp-subtext0 #a6adc8;
|
||||
@define-color ctp-overlay2 #9399b2;
|
||||
@define-color ctp-overlay1 #7f849c;
|
||||
@define-color ctp-overlay0 #6c7086;
|
||||
@define-color ctp-surface2 #585b70;
|
||||
@define-color ctp-surface1 #45475a;
|
||||
@define-color ctp-surface0 #313244;
|
||||
@define-color ctp-base #1e1e2e;
|
||||
@define-color ctp-mantle #181825;
|
||||
@define-color ctp-crust #11111b;
|
||||
|
||||
button {
|
||||
background: @ctp-surface0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
button:active, button:hover, button:focus {
|
||||
background: @ctp-surface1;
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
import { Media } from "./media/Media.js";
|
||||
import { Bar } from "./bar/Bar.js";
|
||||
import { Notifications } from "./notifications/Notifications.js";
|
||||
|
||||
|
||||
App.config({
|
||||
style: "./style.css",
|
||||
windows: [
|
||||
Bar(2),
|
||||
Media(2),
|
||||
Notifications(2),
|
||||
]
|
||||
})
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
export const GTK_ALIGN_FILL = 0;
|
||||
export const GTK_ALIGN_START = 1;
|
||||
export const GTK_ALIGN_END = 2;
|
||||
export const GTK_ALIGN_CENTER = 3;
|
||||
export const GTK_ALIGN_BASELINE = 4;
|
|
@ -1,50 +0,0 @@
|
|||
const mpris = await Service.import("mpris")
|
||||
const players = mpris.bind("players")
|
||||
|
||||
const FALLBACK_ICON = "audio-x-generic-symbolic"
|
||||
const PLAY_ICON = "media-playback-start-symbolic"
|
||||
const PAUSE_ICON = "media-playback-pause-symbolic"
|
||||
const PREV_ICON = "media-skip-backward-symbolic"
|
||||
const NEXT_ICON = "media-skip-forward-symbolic"
|
||||
|
||||
/** @param {number} length */
|
||||
function lengthStr(length) {
|
||||
const min = Math.floor(length / 60)
|
||||
const sec = Math.floor(length % 60)
|
||||
const sec0 = sec < 10 ? "0" : ""
|
||||
return `${min}:${sec0}${sec}`
|
||||
}
|
||||
|
||||
/** @param {import('types/service/mpris').MprisPlayer} player */
|
||||
function Player(player) {
|
||||
return Widget.Label({ label: `${player.name}: ${player.cover_path}` })
|
||||
// return Widget.Overlay({
|
||||
// child: Widget.Box({
|
||||
// class_name: "img",
|
||||
// vpack: "start",
|
||||
// css: player.bind("cover_path").transform(p => `background-image: url('${p}');`),
|
||||
// }),
|
||||
// overlays: [
|
||||
// Widget.Label({ label: player.name }),
|
||||
// ],
|
||||
// })
|
||||
}
|
||||
|
||||
function MediaContent() {
|
||||
return Widget.Box({
|
||||
children: players.as(p => p.map(Player)),
|
||||
})
|
||||
}
|
||||
|
||||
export function Media(monitor = 0) {
|
||||
return Widget.Window({
|
||||
monitor,
|
||||
visible: false,
|
||||
exclusivity: "normal",
|
||||
className: "media",
|
||||
margins: [10, 10, 0, 10],
|
||||
name: `media${monitor}`,
|
||||
anchor: ["left", "top"],
|
||||
child: MediaContent(),
|
||||
})
|
||||
}
|
|
@ -1,129 +0,0 @@
|
|||
const notifications = await Service.import("notifications")
|
||||
|
||||
/** @param {import('resource:///com/github/Aylur/ags/service/notifications.js').Notification} n */
|
||||
function NotificationIcon({ app_entry, app_icon, image }) {
|
||||
if (image) {
|
||||
return Widget.Box({
|
||||
css: `background-image: url("${image}");`
|
||||
+ "background-size: contain;"
|
||||
+ "background-repeat: no-repeat;"
|
||||
+ "background-position: center;",
|
||||
})
|
||||
}
|
||||
|
||||
let icon = "dialog-information-symbolic"
|
||||
if (Utils.lookUpIcon(app_icon))
|
||||
icon = app_icon
|
||||
|
||||
if (app_entry && Utils.lookUpIcon(app_entry))
|
||||
icon = app_entry
|
||||
|
||||
return Widget.Box({
|
||||
child: Widget.Icon(icon),
|
||||
})
|
||||
}
|
||||
|
||||
/** @param {import('resource:///com/github/Aylur/ags/service/notifications.js').Notification} n */
|
||||
function Notification(n) {
|
||||
const icon = Widget.Box({
|
||||
vpack: "start",
|
||||
class_name: "icon",
|
||||
child: NotificationIcon(n),
|
||||
})
|
||||
|
||||
const title = Widget.Label({
|
||||
class_name: "title",
|
||||
xalign: 0,
|
||||
justification: "left",
|
||||
hexpand: true,
|
||||
max_width_chars: 24,
|
||||
label: n.summary,
|
||||
use_markup: true,
|
||||
})
|
||||
|
||||
const body = Widget.Label({
|
||||
class_name: "body",
|
||||
hexpand: true,
|
||||
use_markup: true,
|
||||
xalign: 0,
|
||||
justification: "left",
|
||||
label: n.body,
|
||||
wrap: true,
|
||||
})
|
||||
|
||||
const content = Widget.Box({
|
||||
className: "content",
|
||||
children: [
|
||||
icon,
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
children: [
|
||||
title,
|
||||
body,
|
||||
]
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
const actions = Widget.Box({
|
||||
className: "actions",
|
||||
children: n.actions.map(({ id, label }) => Widget.Button({
|
||||
className: "action",
|
||||
on_clicked: () => {
|
||||
n.invoke(id)
|
||||
n.dismiss()
|
||||
},
|
||||
hexpand: true,
|
||||
child: Widget.Label(label),
|
||||
})),
|
||||
})
|
||||
|
||||
|
||||
return Widget.EventBox({
|
||||
attribute: { id: n.id },
|
||||
onPrimaryClick: n.dismiss,
|
||||
child: Widget.Box({
|
||||
classNames: ["notification", n.urgency],
|
||||
vertical: true,
|
||||
children: [
|
||||
content,
|
||||
actions,
|
||||
],
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
function NotificationList() {
|
||||
const list = Widget.Box({
|
||||
css: "min-width: 2px; min-height: 2px;",
|
||||
vertical: true,
|
||||
spacing: 10,
|
||||
children: notifications.popups.map(Notification),
|
||||
})
|
||||
|
||||
function onNotified(_, /** @type {number} */ id) {
|
||||
const n = notifications.getNotification(id)
|
||||
if (n)
|
||||
list.children = [Notification(n), ...list.children]
|
||||
}
|
||||
|
||||
function onDismissed(_, /** @type {number} */ id) {
|
||||
list.children.find(n => n.attribute.id === id)?.destroy()
|
||||
}
|
||||
|
||||
list.hook(notifications, onNotified, "notified")
|
||||
.hook(notifications, onDismissed, "dismissed")
|
||||
return list
|
||||
}
|
||||
|
||||
export function Notifications(monitor = 0) {
|
||||
return Widget.Window({
|
||||
monitor,
|
||||
exclusivity: "normal",
|
||||
className: "notifications",
|
||||
margins: [10, 10, 10, 10],
|
||||
name: `notifications${monitor}`,
|
||||
anchor: ["left", "top"],
|
||||
child: NotificationList(),
|
||||
})
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
.notification {
|
||||
min-width: 300px;
|
||||
padding: 10px;
|
||||
background-color: alpha(@ctp-base, 0.7);
|
||||
border-radius: 5px;
|
||||
|
||||
border: 1px solid;
|
||||
border-left: 5px solid;
|
||||
border-color: @ctp-overlay1;
|
||||
}
|
||||
|
||||
.notification.low {
|
||||
border-color: @ctp-base;
|
||||
}
|
||||
|
||||
.notification.critical {
|
||||
border-color: @ctp-red;
|
||||
}
|
||||
|
||||
.notification .icon {
|
||||
min-width: 68px;
|
||||
min-height: 68px;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.notification .icon image {
|
||||
font-size: 58px;
|
||||
/* to center the icon */
|
||||
margin: 5px;
|
||||
color: @ctp-text;
|
||||
}
|
||||
|
||||
.notification .icon box {
|
||||
min-width: 68px;
|
||||
min-height: 68px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.notification .actions .action {
|
||||
margin: 0 .4em;
|
||||
margin-top: .8em;
|
||||
}
|
||||
|
||||
.notification .actions .action:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.notification .actions .action:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.notification .title {
|
||||
color: @ctp-text;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
.notification .body {
|
||||
color: @ctp-subtext0;
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
@import url("colors.css");
|
||||
@import url("notifications/style.css");
|
||||
|
||||
|
||||
.bar > box {
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
|
||||
background-color: alpha(@ctp-base, 0.95);
|
||||
color: @ctp-text;
|
||||
}
|
||||
|
||||
|
||||
.clock .time {
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.clock .date {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.media > box {
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
|
||||
background-color: alpha(@ctp-base, 0.95);
|
||||
color: @ctp-text;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"lib": [
|
||||
"ES2022"
|
||||
],
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"strict": true,
|
||||
"noImplicitAny": false,
|
||||
"baseUrl": ".",
|
||||
"typeRoots": [
|
||||
"./types"
|
||||
],
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
/home/kalle/.local/share/com.github.Aylur.ags/types
|
|
@ -1,15 +0,0 @@
|
|||
{ inputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
configDir = ./config;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# Ansible defaults
|
||||
export ANSIBLE_BECOME_ASK_PASS=yes
|
||||
|
||||
# Add ~/bin and ~/bin/scripts to my path
|
||||
export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/:$HOME/.cargo/bin
|
||||
|
||||
# Set editor to neovim.
|
||||
alias edit=nvim
|
||||
export EDITOR="nvim"
|
||||
|
||||
# Prompt stuff
|
||||
#
|
||||
# LINEAGE:
|
||||
#
|
||||
# Based on work by woods and sundeepgupta
|
||||
#
|
||||
# https://gist.github.com/31967
|
||||
# https://gist.github.com/sundeepgupta/b099c31ee2cc1eb31b6d
|
||||
|
||||
# The various escape codes that we can use to color our prompt.
|
||||
RED="\[\033[0;31m\]"
|
||||
YELLOW="\[\033[0;33m\]"
|
||||
GREEN="\[\033[0;32m\]"
|
||||
BLUE="\[\033[1;34m\]"
|
||||
LIGHT_RED="\[\033[1;31m\]"
|
||||
LIGHT_GREEN="\[\033[1;32m\]"
|
||||
WHITE="\[\033[1;37m\]"
|
||||
LIGHT_GRAY="\[\033[0;37m\]"
|
||||
CYAN="\[\033[0;36m\]"
|
||||
PURPLE="\[\033[0;35m\]"
|
||||
|
||||
COLOR_NONE="\[\e[0m\]"
|
||||
|
||||
|
||||
# Detect whether the current directory is a git repository.
|
||||
function is_git_repository {
|
||||
git branch > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# Determine the branch/state information for this git repository.
|
||||
function set_git_branch {
|
||||
# Capture the output of the "git status" command.
|
||||
git_status="$(git status 2> /dev/null)"
|
||||
|
||||
|
||||
# Set color based on clean/staged/dirty.
|
||||
if [[ ${git_status} =~ "working tree clean" ]]; then
|
||||
state="${GREEN}"
|
||||
elif [[ ${git_status} =~ "Changes to be committed" ]]; then
|
||||
state="${YELLOW}"
|
||||
else
|
||||
state="${RED}"
|
||||
fi
|
||||
|
||||
# Set arrow icon based on status against remote.
|
||||
remote_pattern="Your branch is (.*) of"
|
||||
if [[ ${git_status} =~ ${remote_pattern} ]]; then
|
||||
if [[ ${BASH_REMATCH[1]} == "ahead" ]]; then
|
||||
remote="↑"
|
||||
else
|
||||
remote="↓"
|
||||
fi
|
||||
else
|
||||
remote=""
|
||||
fi
|
||||
diverge_pattern="Your branch and (.*) have diverged"
|
||||
if [[ ${git_status} =~ ${diverge_pattern} ]]; then
|
||||
remote="↕"
|
||||
fi
|
||||
|
||||
# Get the name of the branch.
|
||||
branch_pattern="^(# )?On branch ([^${IFS}]*)"
|
||||
if [[ ${git_status} =~ ${branch_pattern} ]]; then
|
||||
branch=${BASH_REMATCH[2]}
|
||||
fi
|
||||
|
||||
# Set the final branch string.
|
||||
BRANCH="${state}(${branch})${remote}${COLOR_NONE} "
|
||||
}
|
||||
|
||||
# Return the prompt symbol to use, colorized based on the return value of the
|
||||
# previous command.
|
||||
function set_prompt_symbol () {
|
||||
if test $1 -eq 0 ; then
|
||||
PROMPT_SYMBOL="\$"
|
||||
else
|
||||
PROMPT_SYMBOL="${LIGHT_RED}\$${COLOR_NONE}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Set the full bash prompt.
|
||||
function set_bash_prompt () {
|
||||
# Set the PROMPT_SYMBOL variable. We do this first so we don't lose the
|
||||
# return value of the last command.
|
||||
set_prompt_symbol $?
|
||||
|
||||
# Set the BRANCH variable.
|
||||
if is_git_repository ; then
|
||||
set_git_branch
|
||||
else
|
||||
BRANCH=''
|
||||
fi
|
||||
|
||||
# Set the bash prompt variable.
|
||||
PS1="
|
||||
${BLUE}[\t] ${CYAN}\w ${COLOR_NONE}${BRANCH}
|
||||
${PROMPT_SYMBOL} "
|
||||
}
|
||||
|
||||
# Tell bash to execute this function just before displaying its prompt.
|
||||
PROMPT_COMMAND=set_bash_prompt
|
||||
|
||||
# fzf is love, fzf is life.
|
||||
source /usr/share/fzf/key-bindings.bash
|
||||
|
||||
function cdl() {
|
||||
cd $@
|
||||
ls
|
||||
}
|
||||
|
||||
# Functions
|
||||
function cd-projects {
|
||||
project_name=`project list | fzf --preview="proj_preview {}"`
|
||||
cd "`project path "$project_name"`"
|
||||
}
|
||||
|
||||
# Aliases
|
||||
alias gg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an (%ae)%C(reset)' --all"
|
||||
alias gca="git add -A; git commit -a --amend --no-edit"
|
||||
alias gs="git status"
|
||||
alias proj="cd-projects"
|
||||
# Use the kitty kitten for ssh so sessions can be cached and remote editing/session cloning is possible.
|
||||
alias ssh="kitty +kitten ssh"
|
||||
|
||||
alias paru="paru --bottomup"
|
||||
|
||||
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
||||
export SDKMAN_DIR="$HOME/.sdkman"
|
||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
|
@ -0,0 +1,459 @@
|
|||
# See dunst(5) for all configuration options
|
||||
|
||||
[global]
|
||||
### Display ###
|
||||
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a window manager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern window managers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = none
|
||||
|
||||
### Geometry ###
|
||||
|
||||
# dynamic width from 0 to 300
|
||||
# width = (0, 300)
|
||||
# constant width of 300
|
||||
width = 300
|
||||
|
||||
# The maximum height of a single notification, excluding the frame.
|
||||
height = 300
|
||||
|
||||
# Position the notification in the top right corner
|
||||
origin = top-left
|
||||
|
||||
# Offset from the origin
|
||||
offset = 10x10
|
||||
|
||||
# Scale factor. It is auto-detected if value is 0.
|
||||
scale = 0
|
||||
|
||||
# Maximum number of notification (0 means no limit)
|
||||
notification_limit = 20
|
||||
|
||||
### Progress bar ###
|
||||
|
||||
# Turn on the progess bar. It appears when a progress hint is passed with
|
||||
# for example dunstify -h int:value:12
|
||||
progress_bar = true
|
||||
|
||||
# Set the progress bar height. This includes the frame, so make sure
|
||||
# it's at least twice as big as the frame width.
|
||||
progress_bar_height = 10
|
||||
|
||||
# Set the frame width of the progress bar
|
||||
progress_bar_frame_width = 0
|
||||
|
||||
# Set the minimum width for the progress bar
|
||||
progress_bar_min_width = 150
|
||||
|
||||
# Set the maximum width for the progress bar
|
||||
progress_bar_max_width = 300
|
||||
|
||||
# Corner radius for the progress bar. 0 disables rounded corners.
|
||||
progress_bar_corner_radius = 0
|
||||
|
||||
# Corner radius for the icon image.
|
||||
icon_corner_radius = 0
|
||||
|
||||
# Show how many messages are currently hidden (because of
|
||||
# notification_limit).
|
||||
indicate_hidden = yes
|
||||
|
||||
# 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.). (X11 only)
|
||||
transparency = 0.3
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
# If gap_size is greater than 0, this setting will be ignored.
|
||||
separator_height = 2
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 8
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 8
|
||||
|
||||
# Padding between text and icon.
|
||||
text_icon_padding = 0
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 0
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#aaaaaa"
|
||||
|
||||
# Size of gap to display between notifications - requires a compositor.
|
||||
# If value is greater than 0, separator_height will be ignored and a border
|
||||
# of size frame_width will be drawn around each notification instead.
|
||||
# Click events on gaps do not currently propagate to applications below.
|
||||
gap_size = 10
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = frame
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = yes
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
# A client can set the 'transient' hint to bypass this. See the rules
|
||||
# section for how to disable this if necessary
|
||||
# idle_threshold = 120
|
||||
|
||||
### Text ###
|
||||
|
||||
font = Monospace 8
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
line_height = 0
|
||||
|
||||
# Possible values are:
|
||||
# full: Allow a small subset of html markup in notifications:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <https://docs.gtk.org/Pango/pango_markup.html>.
|
||||
#
|
||||
# strip: This setting is provided for compatibility with some broken
|
||||
# clients that send markup even though it's not enabled on the
|
||||
# server. Dunst will try to strip the markup but the parsing is
|
||||
# simplistic so using this option outside of matching rules for
|
||||
# specific applications *IS GREATLY DISCOURAGED*.
|
||||
#
|
||||
# no: Disable markup parsing, incoming notifications will be treated as
|
||||
# plain text. Dunst will not advertise that it has the body-markup
|
||||
# capability if this is set as a global setting.
|
||||
#
|
||||
# It's important to note that markup inside the format option will be parsed
|
||||
# regardless of what this is set to.
|
||||
markup = full
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = "<b>%s</b>\n%b"
|
||||
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = left
|
||||
|
||||
# Vertical alignment of message text and icon.
|
||||
# Possible values are "top", "center" and "bottom".
|
||||
vertical_alignment = center
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60
|
||||
|
||||
# Specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = middle
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = no
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = false
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = yes
|
||||
|
||||
### Icons ###
|
||||
|
||||
# Recursive icon lookup. You can set a single theme, instead of having to
|
||||
# define all lookup paths.
|
||||
enable_recursive_icon_lookup = true
|
||||
|
||||
# Set icon theme (only used for recursive icon lookup)
|
||||
icon_theme = Adwaita
|
||||
# You can also set multiple icon themes, with the leftmost one being used first.
|
||||
# icon_theme = "Adwaita, breeze"
|
||||
|
||||
# Align icons left/right/top/off
|
||||
icon_position = left
|
||||
|
||||
# Scale small icons up to this size, set to 0 to disable. Helpful
|
||||
# for e.g. small files or high-dpi screens. In case of conflict,
|
||||
# max_icon_size takes precedence over this.
|
||||
min_icon_size = 32
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 128
|
||||
|
||||
# Paths to default icons (only neccesary when not using recursive icon lookup)
|
||||
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
|
||||
### History ###
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = yes
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 20
|
||||
|
||||
### Misc/Advanced ###
|
||||
|
||||
# dmenu path.
|
||||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/xdg-open
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = Dunst
|
||||
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = Dunst
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 0
|
||||
|
||||
# Ignore the dbus closeNotification message.
|
||||
# Useful to enforce the timeout set by dunst configuration. Without this
|
||||
# parameter, an application may close the notification sent before the
|
||||
# user defined timeout.
|
||||
ignore_dbusclose = false
|
||||
|
||||
### Wayland ###
|
||||
# These settings are Wayland-specific. They have no effect when using X11
|
||||
|
||||
# Uncomment this if you want to let notications appear under fullscreen
|
||||
# applications (default: overlay)
|
||||
# layer = top
|
||||
|
||||
# Set this to true to use X11 output on Wayland.
|
||||
force_xwayland = false
|
||||
|
||||
### Legacy
|
||||
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
# This setting is provided for compatibility with older nVidia drivers that
|
||||
# do not support RandR and using it on systems that support RandR is highly
|
||||
# discouraged.
|
||||
#
|
||||
# By enabling this setting dunst will not be able to detect when a monitor
|
||||
# is connected or disconnected which might break follow mode if the screen
|
||||
# layout changes.
|
||||
force_xinerama = false
|
||||
|
||||
### mouse
|
||||
|
||||
# Defines list of actions for each mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: Invoke the action determined by the action_name rule. If there is no
|
||||
# such action, open the context menu.
|
||||
# * open_url: If the notification has exactly one url, open it. If there are multiple
|
||||
# ones, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
# * context: Open context menu for the notification.
|
||||
# * context_all: Open context menu for all notifications.
|
||||
# These values can be strung together for each mouse event, and
|
||||
# will be executed in sequence.
|
||||
mouse_left_click = close_current
|
||||
mouse_middle_click = do_action, close_current
|
||||
mouse_right_click = close_all
|
||||
|
||||
# Experimental features that may or may not work correctly. Do not expect them
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# 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
|
||||
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "#222222"
|
||||
foreground = "#888888"
|
||||
timeout = 10
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
#default_icon = /path/to/icon
|
||||
|
||||
[urgency_normal]
|
||||
background = "#285577"
|
||||
foreground = "#ffffff"
|
||||
timeout = 10
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#default_icon = /path/to/icon
|
||||
|
||||
[urgency_critical]
|
||||
background = "#900000"
|
||||
foreground = "#ffffff"
|
||||
frame_color = "#ff0000"
|
||||
timeout = 0
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#default_icon = /path/to/icon
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
#
|
||||
# Messages can be matched by
|
||||
# appname (discouraged, see desktop_entry)
|
||||
# body
|
||||
# category
|
||||
# desktop_entry
|
||||
# icon
|
||||
# match_transient
|
||||
# msg_urgency
|
||||
# stack_tag
|
||||
# summary
|
||||
#
|
||||
# and you can override the
|
||||
# background
|
||||
# foreground
|
||||
# format
|
||||
# frame_color
|
||||
# fullscreen
|
||||
# new_icon
|
||||
# set_stack_tag
|
||||
# set_transient
|
||||
# set_category
|
||||
# timeout
|
||||
# urgency
|
||||
# icon_position
|
||||
# skip_display
|
||||
# history_ignore
|
||||
# action_name
|
||||
# word_wrap
|
||||
# ellipsize
|
||||
# alignment
|
||||
# hide_text
|
||||
#
|
||||
# Shell-like globbing will get expanded.
|
||||
#
|
||||
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||
# the desktop-entry won't get localized.
|
||||
#
|
||||
# SCRIPTING
|
||||
# You can specify a script that gets run when the rule matches by
|
||||
# setting the "script" option.
|
||||
# The script will be called as follows:
|
||||
# script appname summary body icon urgency
|
||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||
#
|
||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||
# to find fitting options for rules.
|
||||
|
||||
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||
# client
|
||||
#[transient_disable]
|
||||
# match_transient = yes
|
||||
# set_transient = no
|
||||
#
|
||||
# Make the handling of transient notifications more strict by making them not
|
||||
# be placed in history.
|
||||
#[transient_history_ignore]
|
||||
# match_transient = yes
|
||||
# history_ignore = yes
|
||||
|
||||
# fullscreen values
|
||||
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||
# delay: displays the new notification, if there is no fullscreen window active
|
||||
# If the notification is already drawn, it won't get undrawn.
|
||||
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||
# withdrawn from screen again and will get delayed like a new notification
|
||||
#[fullscreen_delay_everything]
|
||||
# fullscreen = delay
|
||||
#[fullscreen_show_critical]
|
||||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
||||
#[script-test]
|
||||
# summary = "*script*"
|
||||
# script = dunst_test.sh
|
||||
|
||||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# skip_display = true
|
||||
|
||||
#[history-ignore]
|
||||
# # This notification will not be saved in history
|
||||
# summary = "foobar"
|
||||
# history_ignore = yes
|
||||
|
||||
#[skip-display]
|
||||
# # This notification will not be displayed, but will be included in the history
|
||||
# summary = "foobar"
|
||||
# skip_display = yes
|
||||
|
||||
#[signed_on]
|
||||
# appname = Pidgin
|
||||
# summary = "*signed on*"
|
||||
# urgency = low
|
||||
#
|
||||
#[signed_off]
|
||||
# appname = Pidgin
|
||||
# summary = *signed off*
|
||||
# urgency = low
|
||||
#
|
||||
#[says]
|
||||
# appname = Pidgin
|
||||
# summary = *says*
|
||||
# urgency = critical
|
||||
#
|
||||
#[twitter]
|
||||
# appname = Pidgin
|
||||
# summary = *twitter.com*
|
||||
# urgency = normal
|
||||
#
|
||||
#[stack-volumes]
|
||||
# appname = "some_volume_notifiers"
|
||||
# set_stack_tag = "volume"
|
||||
#
|
||||
# vim: ft=cfg
|
|
@ -0,0 +1,33 @@
|
|||
(defpoll time :interval "10s" "date '+%H:%M'")
|
||||
(defpoll year :interval "10h" "date '+%Y'")
|
||||
(defpoll date :interval "30m" "date '+%m-%d'")
|
||||
|
||||
(defpoll audio_sink_default
|
||||
:interval "10s"
|
||||
`pactl get-default-sink`)
|
||||
|
||||
(defpoll audio_source_default
|
||||
:interval "10s"
|
||||
`pactl get-default-source`)
|
||||
|
||||
(deflisten media-player_status
|
||||
:initial "paused"
|
||||
"playerctl --player plasma-browser-integration --follow status")
|
||||
|
||||
(deflisten media-player_metadata
|
||||
:initial "{\"title\": \"Nothing playing\", \"album\": \"\", \"artist\": \"\", \"art_url\": \"\"}"
|
||||
"playerctl --player plasma-browser-integration --follow metadata --format '{\"title\": \"{{title}}\", \"album\": \"{{album}}\", \"artist\": \"{{artist}}\", \"art_url\": \"{{mpris:artUrl}}\"}'")
|
||||
|
||||
(deflisten media-player_metadata_image
|
||||
:initial "/tmp/mpris-thumb"
|
||||
"playerctl --follow --player plasma-browser-integration --follow metadata --format {{mpris:artUrl}} | /home/kalle/bin/scripts/eww-playerctl-download-image")
|
||||
|
||||
(defpoll audio-sinks
|
||||
:initial "[]"
|
||||
:interval "10s"
|
||||
"pactl -f json list sinks | jq '[.[]|{\"id\": .name, \"name\":.description, \"volume\": .volume.\"front-left\".value_percent | rtrimstr(\"%\"), \"muted\": .mute}]'")
|
||||
|
||||
(defpoll audio-sources
|
||||
:initial "[]"
|
||||
:interval "10s"
|
||||
"pactl -f json list sources | jq '[.[] | select(.monitor_source == \"\") | {\"id\": .name, \"name\":.description, \"volume\": .volume.\"front-left\".value_percent | rtrimstr(\"%\"), \"muted\": .mute}]'")
|
|
@ -0,0 +1,43 @@
|
|||
(defwidget audio-sink [sink]
|
||||
(box
|
||||
:orientation "v"
|
||||
(box :space-evenly false :spacing 15
|
||||
(box "${sink.id == audio_sink_default ? "x " : ""}${sink.name}")
|
||||
(box :hexpand true)
|
||||
(button :onclick "pactl set-sink-mute \"${sink.id}\" toggle"
|
||||
"M")
|
||||
(button :onclick "pactl set-default-sink ${sink.id}"
|
||||
"D")
|
||||
)
|
||||
(box :space-evenly false
|
||||
(box :width 50
|
||||
{sink.muted ? "Muted" : "${sink.volume}%"})
|
||||
(scale :hexpand true
|
||||
:value {sink.volume}
|
||||
:onchange "pactl set-sink-volume ${sink.id} {}%"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget audio-source [source]
|
||||
(box
|
||||
:orientation "v"
|
||||
(box :space-evenly false :spacing 15
|
||||
(box "${source.id == audio_source_default ? "x " : ""}${source.name}")
|
||||
(box :hexpand true)
|
||||
(button :onclick "pactl set-source-mute \"${source.id}\" toggle"
|
||||
"M")
|
||||
(button :onclick "pactl set-default-source ${source.id}"
|
||||
"D")
|
||||
)
|
||||
(box :space-evenly false
|
||||
(box :width 50
|
||||
{source.muted ? "Muted" : "${source.volume}%"})
|
||||
(scale :hexpand true
|
||||
:value {source.volume}
|
||||
:onchange "pactl set-source-volume ${source.id} {}%"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
|
@ -16,29 +16,30 @@
|
|||
)
|
||||
)
|
||||
|
||||
(defwidget left []
|
||||
(box :class "left"
|
||||
:space-evenly "false"
|
||||
:halign "start"
|
||||
:valign "center"
|
||||
:orientation "h"
|
||||
(notifications)
|
||||
(audio)
|
||||
(clipboard)
|
||||
(defwidget color-picker []
|
||||
(eventbox :class "color-picker"
|
||||
:onclick "hyprctl dispatch exec \"hyprpicker --no-fancy | wl-copy\""
|
||||
""
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget workspace-indicator []
|
||||
". . . . . . . . . ."
|
||||
(defwidget left []
|
||||
(box :class "left"
|
||||
:halign "start"
|
||||
:orientation "h"
|
||||
(notifications) ; TODO: notifications - Opens notification menu
|
||||
(audio)
|
||||
(clipboard); TODO: Clipboard - Opens clipboard menu (clipboard history click to make current)
|
||||
;; TODO: Bluetooth something
|
||||
(color-picker)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget center []
|
||||
(box :class "center"
|
||||
:space-evenly "false"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:orientation "h"
|
||||
(workspace-indicator)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -60,8 +61,9 @@
|
|||
:halign "end"
|
||||
:valign "center"
|
||||
:orientation "v"
|
||||
(time)
|
||||
(date)
|
||||
; TODO: Redo this thing and make it open calendar view
|
||||
(time) ; TODO: Time - Open timer/stopwatch menu?
|
||||
(date) ; TODO: Year month day - Open calendar/upcoming events list (source these from some daemon?)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -79,7 +81,7 @@
|
|||
:geometry (geometry :x "0px"
|
||||
:y "10px"
|
||||
:width "1060px"
|
||||
:height "48px"
|
||||
:height "50px"
|
||||
:anchor "center top")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
|
@ -1,3 +0,0 @@
|
|||
(defpoll time :interval "10s" "date '+%H:%M'")
|
||||
(defpoll year :interval "10h" "date '+%Y'")
|
||||
(defpoll date :interval "30m" "date '+%m-%d'")
|
|
@ -1,2 +0,0 @@
|
|||
(include "_variables.yuck")
|
||||
(include "bar.yuck")
|
|
@ -1,14 +0,0 @@
|
|||
{ inputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.eww = {
|
||||
enable = true;
|
||||
|
||||
configDir = ./config;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
$clr-primary: #883333;
|
||||
$clr-background: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.bar {
|
||||
background-color: $clr-background;
|
||||
border-radius: 10px;
|
||||
|
||||
.notifications, .audio, .clipboard, .color-picker {
|
||||
label {
|
||||
font-size: 30px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $clr-primary;
|
||||
// background-color: rgba(#888888, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.left {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.audio {
|
||||
background-color: $clr-background;
|
||||
border-radius: 5px;
|
||||
|
||||
.audio-sinks {
|
||||
margin-left: 50px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.audio-sources {
|
||||
margin-left: 20px;
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
.media-player {
|
||||
background-size: cover;
|
||||
margin: 10px;
|
||||
border-radius: 15px;
|
||||
border: 2px solid black;
|
||||
padding: 10px 20px 10px 20px;
|
||||
|
||||
.title {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.artist {
|
||||
font-size: 14px;
|
||||
color: #aaaaaa;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
.previous, .pause, .next {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 25px;
|
||||
label {
|
||||
margin: 10px;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 24px;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
(include "_variables.yuck")
|
||||
(include "util.yuck")
|
||||
(include "audio.yuck")
|
||||
(include "bar.yuck")
|
||||
(include "volume.yuck")
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
(defwidget title [content]
|
||||
(box :class "title"
|
||||
content
|
||||
)
|
||||
)
|
|
@ -0,0 +1,101 @@
|
|||
(defwidget media-player []
|
||||
(box :class "media-player"
|
||||
:orientation "v"
|
||||
:height 200
|
||||
:style "background-image: radial-gradient(
|
||||
circle farthest-side at left,
|
||||
rgba(0, 0, 0, 0.9) 40%,
|
||||
rgba(0, 0, 0, 0.2) 70%),
|
||||
url('${media-player_metadata_image}');"
|
||||
(box :orientation "v"
|
||||
(box :class "title"
|
||||
:halign "start"
|
||||
{media-player_metadata.title}
|
||||
)
|
||||
|
||||
(box :class "artist"
|
||||
:halign "start"
|
||||
{media-player_metadata.artist}
|
||||
)
|
||||
)
|
||||
|
||||
(box :class "buttons"
|
||||
:valign "end"
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
:spacing 50
|
||||
(eventbox :class "previous"
|
||||
:width 40
|
||||
:onclick "playerctl previous"
|
||||
""
|
||||
)
|
||||
(eventbox :class "pause"
|
||||
:width 40
|
||||
:onclick "playerctl play-pause"
|
||||
{media-player_status == "Playing" ? "" : ""}
|
||||
)
|
||||
(eventbox :class "next"
|
||||
:width 40
|
||||
:onclick "playerctl next"
|
||||
""
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget audio-title []
|
||||
(box :class "audio-title"
|
||||
:valign "start"
|
||||
"Audio"
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget audio-sinks []
|
||||
(box :orientation "v" :class "audio-sinks" :space-evenly false
|
||||
(title :content "Sinks")
|
||||
{audio_sink_default ? "" : ""} ;; This is dumb, but fixes this variable not updating
|
||||
(for sink in audio-sinks
|
||||
(audio-sink :sink {sink})
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget audio-sources []
|
||||
(box :orientation "v" :class "audio-sources" :space-evenly false
|
||||
(title :content "Sources")
|
||||
{audio_source_default ? "" : ""} ;; This is dumb, but fixes this variable not updating
|
||||
(for source in audio-sources
|
||||
(audio-source :source {source})
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget audio-window []
|
||||
(box :class "audio"
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
;; TODO: Maybe individual applications as well.
|
||||
(box :orientation "h"
|
||||
(media-player)
|
||||
(box
|
||||
;; TODO: Put something here
|
||||
)
|
||||
)
|
||||
(box :orientation "h"
|
||||
(audio-sinks)
|
||||
(audio-sources)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow audio
|
||||
:monitor 2
|
||||
:geometry (geometry :x "10px"
|
||||
:y "10px"
|
||||
:width "1060"
|
||||
:height "500px"
|
||||
:anchor "top center")
|
||||
:stacking "overlay"
|
||||
:exclusive false
|
||||
(audio-window)
|
||||
)
|
392
flake.lock
392
flake.lock
|
@ -1,392 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"ags": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721306136,
|
||||
"narHash": "sha256-VKPsIGf3/a+RONBipx4lEE4LXG2sdMNkWQu22LNQItg=",
|
||||
"owner": "Aylur",
|
||||
"repo": "ags",
|
||||
"rev": "344ea72cd3b8d4911f362fec34bce7d8fb37028c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Aylur",
|
||||
"repo": "ags",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"aquamarine": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"hyprwayland-scanner": [
|
||||
"hyprland",
|
||||
"hyprwayland-scanner"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721571743,
|
||||
"narHash": "sha256-hat7wggtDISBJD8kTo5MTrT+IsY/Ha2MwgjmqqijoCA=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"rev": "601f6cf95cbe4fef02dc7faf34bba58566c914e9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721534365,
|
||||
"narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "635563f245309ef5320f80c7ebcb89b2398d2949",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprcursor": {
|
||||
"inputs": {
|
||||
"hyprlang": [
|
||||
"hyprland",
|
||||
"hyprlang"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721330371,
|
||||
"narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland": {
|
||||
"inputs": {
|
||||
"aquamarine": "aquamarine",
|
||||
"hyprcursor": "hyprcursor",
|
||||
"hyprlang": "hyprlang",
|
||||
"hyprutils": "hyprutils",
|
||||
"hyprwayland-scanner": "hyprwayland-scanner",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems_2",
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721668777,
|
||||
"narHash": "sha256-QNKSZDkZ5+0a+g0wZoZfcWuH1Fy3ZvIeKg0grNdwnHc=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland",
|
||||
"rev": "4c3b03516209a49244a8f044143c1162752b8a7a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-protocols": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"xdph",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"xdph",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718746314,
|
||||
"narHash": "sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "1b61f0093afff20ab44d88ad707aed8bf2215290",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprlang": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721324361,
|
||||
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprutils": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721324102,
|
||||
"narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "962582a090bc233c4de9d9897f46794280288989",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprwayland-scanner": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721324119,
|
||||
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1721379653,
|
||||
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1721379653,
|
||||
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-harpoon1": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1703631439,
|
||||
"narHash": "sha256-SIqssvuNnkw1YbEEElLYCHmh9OLnoHzggXNIZMb3jYI=",
|
||||
"owner": "ThePrimeagen",
|
||||
"repo": "harpoon",
|
||||
"rev": "ccae1b9bec717ae284906b0bf83d720e59d12b91",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ThePrimeagen",
|
||||
"repo": "harpoon",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-rainbow-delimiters-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1720388982,
|
||||
"narHash": "sha256-6+MSV9pkudhf/xVdofU6syYCzViHltvDWkYvbeuEfLs=",
|
||||
"owner": "HiPhish",
|
||||
"repo": "rainbow-delimiters.nvim",
|
||||
"rev": "b29da4a6061a88270e875b38367d82c04c856128",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "HiPhish",
|
||||
"repo": "rainbow-delimiters.nvim",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"plugin-undotree-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1707485506,
|
||||
"narHash": "sha256-FIYDyfkaIS9C16ClWKLMdpSPv/OrcOalVVsyFJBU2eI=",
|
||||
"owner": "jiaoshijie",
|
||||
"repo": "undotree",
|
||||
"rev": "eab459ab87dd249617b5f7187bb69e614a083047",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jiaoshijie",
|
||||
"repo": "undotree",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"ags": "ags",
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"plugin-harpoon1": "plugin-harpoon1",
|
||||
"plugin-rainbow-delimiters-nvim": "plugin-rainbow-delimiters-nvim",
|
||||
"plugin-undotree-nvim": "plugin-undotree-nvim"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"hyprlang": [
|
||||
"hyprland",
|
||||
"hyprlang"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721648131,
|
||||
"narHash": "sha256-cyyxu/oj4QEFp3CVx2WeXa9T4OAUyynuBJHGkBZSxJI=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "663be9cad424b170b28b9fa8a61042d721007f3b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
64
flake.nix
64
flake.nix
|
@ -1,64 +0,0 @@
|
|||
{
|
||||
description = "My NixOS and home-manager configs";
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager/master";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# AGS
|
||||
ags.url = "github:Aylur/ags";
|
||||
ags.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Neovim plugins not in nixpkgs
|
||||
plugin-rainbow-delimiters-nvim.url = "gitlab:HiPhish/rainbow-delimiters.nvim";
|
||||
plugin-rainbow-delimiters-nvim.flake = false;
|
||||
|
||||
plugin-undotree-nvim.url = "github:jiaoshijie/undotree";
|
||||
plugin-undotree-nvim.flake = false;
|
||||
|
||||
plugin-harpoon1.url = "github:ThePrimeagen/harpoon";
|
||||
plugin-harpoon1.flake = false;
|
||||
|
||||
hyprland.url = "github:hyprwm/hyprland";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, home-manager
|
||||
, ...
|
||||
} @ inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
in
|
||||
{
|
||||
overlays = import ./overlays { inherit inputs; };
|
||||
|
||||
nixosConfigurations = {
|
||||
"kalle-pc" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./nixos/kalle-pc/configuration.nix ];
|
||||
};
|
||||
"kalle-laptop" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./nixos/kalle-laptop/configuration.nix ];
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
"kalle@kalle-pc" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./home-manager/kalle-pc/kalle.nix ];
|
||||
};
|
||||
"kalle@kalle-laptop" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./home-manager/kalle-laptop/kalle.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,128 +0,0 @@
|
|||
{ inputs
|
||||
, outputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
home = {
|
||||
username = "kalle";
|
||||
homeDirectory = "/home/kalle";
|
||||
};
|
||||
|
||||
imports =
|
||||
[
|
||||
../../nvim
|
||||
../../tmux
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
overlays = with outputs.overlays; [
|
||||
nvim-plugins
|
||||
];
|
||||
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = _: true;
|
||||
|
||||
permittedInsecurePackages = [
|
||||
"electron-25.9.0"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
discord
|
||||
vesktop
|
||||
firefox
|
||||
chromium
|
||||
httpie
|
||||
kate
|
||||
dolphin
|
||||
ark
|
||||
rustup
|
||||
gcc
|
||||
pavucontrol
|
||||
difftastic
|
||||
sops
|
||||
obsidian
|
||||
|
||||
cachix
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
# Git aliases
|
||||
gg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an (%ae)%C(reset)' --all";
|
||||
gca = "git add -A; git commit -a --amend --no-edit";
|
||||
gs = "git status";
|
||||
|
||||
# Replace some commands with better versions
|
||||
ssh = "kitty +kitten ssh";
|
||||
diff = "${pkgs.difftastic}/bin/difftastic";
|
||||
};
|
||||
initExtra = ''
|
||||
function open() {
|
||||
xdg-open $@ &> /dev/null &
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
theme = "Catppuccin-Mocha";
|
||||
settings = {
|
||||
background_opacity = "0.8";
|
||||
allow_remote_control = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
|
||||
# Remove text from nix shell component
|
||||
nix_shell.format = "via [$symbol]($style) ";
|
||||
|
||||
git_status.disabled = true;
|
||||
package.disabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Kalle Struik";
|
||||
userEmail = "kalle@kallestruik.nl";
|
||||
difftastic.enable = true;
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "23.05"; # Please read the comment before changing.
|
||||
}
|
|
@ -1,357 +0,0 @@
|
|||
{ inputs
|
||||
, outputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
home = {
|
||||
username = "kalle";
|
||||
homeDirectory = "/home/kalle";
|
||||
};
|
||||
|
||||
imports =
|
||||
[
|
||||
../../nvim
|
||||
../../tmux
|
||||
../../eww
|
||||
../../hyprland
|
||||
../../hyprland/hyprpaper.nix
|
||||
../../ags
|
||||
];
|
||||
|
||||
hyprland =
|
||||
let
|
||||
mod = "SUPER"; in
|
||||
{
|
||||
mod = mod;
|
||||
|
||||
primaryMonitor = "DP-2";
|
||||
monitors = [
|
||||
{
|
||||
name = "DP-2";
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
refreshRate = 144;
|
||||
x = 0;
|
||||
y = 1080;
|
||||
vrr = 1;
|
||||
}
|
||||
|
||||
{
|
||||
name = "HDMI-A-1";
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
x = 1500;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
{
|
||||
name = "HDMI-A-2";
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
x = 1920;
|
||||
y = 1080;
|
||||
transform = 3;
|
||||
}
|
||||
];
|
||||
|
||||
autoStart = [
|
||||
# Bar
|
||||
"${pkgs.dunst}/bin/dunst"
|
||||
"${pkgs.firefox}/bin/firefox"
|
||||
"${pkgs.discord}/bin/discord"
|
||||
];
|
||||
|
||||
environment = {
|
||||
XCURSOR_SIZE = "24";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
};
|
||||
|
||||
sensitivity = 0.1;
|
||||
|
||||
layout = "dwindle";
|
||||
|
||||
layerRules = {
|
||||
"gtk-layer-shell" = [ "blur" "ignorezero" ];
|
||||
"notifications2" = [ "noanim" "blur" "ignorezero"];
|
||||
};
|
||||
|
||||
windowRules = {
|
||||
# Auto workspace
|
||||
firefox = [ "workspace 1 silent" ];
|
||||
discord = [ "workspace name:HDMI-A-2" ];
|
||||
};
|
||||
|
||||
|
||||
windowRulesV2 = {
|
||||
# ULauncher
|
||||
"class:^(ulauncher)$" = [
|
||||
"forceinput"
|
||||
"dimaround"
|
||||
];
|
||||
};
|
||||
|
||||
# Media keys
|
||||
# bind = ,XF86AudioPlay, exec, playerctl --player plasma-browser-integration play-pause
|
||||
# bind = ,XF86AudioPrev, exec, playerctl previous
|
||||
# bind = ,XF86AudioNext, exec, playerctl next
|
||||
# bind = ,XF86AudioLowerVolume, exec, playerctl --player plasma-browser-integration volume 0.01-
|
||||
# bind = ,XF86AudioRaiseVolume, exec, playerctl --player plasma-browser-integration volume 0.01+
|
||||
|
||||
# This is a dumb work around for hyprland not passing ALT half the time with the pass dispatcher.
|
||||
# bind = ALT, M, exec, xdotool key 'ALT+m'
|
||||
# bind = ALT, B, exec, xdotool key 'ALT+b'
|
||||
binds = {
|
||||
"${mod}, return" = "exec, kitty";
|
||||
"${mod}, E" = "exec, ulauncher-toggle #wofi --show drun";
|
||||
"${mod}, Print" = "exec, bash -c \"grim -g \\\"$(slurp)\\\" - | wl-copy\"";
|
||||
# Clipboard history
|
||||
# bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
||||
};
|
||||
|
||||
mouseBinds = { };
|
||||
};
|
||||
|
||||
hyprpaper = {
|
||||
wallpaperFolder = "/home/kalle/Pictures/Wallpapers";
|
||||
};
|
||||
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
monitor = 0;
|
||||
follow = "none";
|
||||
width = 300;
|
||||
height = 300;
|
||||
origin = "top-left";
|
||||
offset = "10x10";
|
||||
scale = 0;
|
||||
notification_limit = 20;
|
||||
progress_bar = true;
|
||||
progress_bar_height = 10;
|
||||
progress_bar_frame_width = 0;
|
||||
progress_bar_min_width = 150;
|
||||
progress_bar_max_width = 300;
|
||||
progress_bar_corner_radius = 0;
|
||||
icon_corner_radius = 0;
|
||||
indicate_hidden = "yes";
|
||||
transparency = "0.3";
|
||||
separator_height = 2;
|
||||
padding = 8;
|
||||
horizontal_padding = 8;
|
||||
text_icon_padding = 0;
|
||||
frame_width = 0;
|
||||
frame_color = "#aaaaaa";
|
||||
gap_size = 10;
|
||||
separator_color = "frame";
|
||||
sort = "yes";
|
||||
font = "Monospace 8";
|
||||
line_height = 0;
|
||||
markup = "full";
|
||||
format = "<b>%s</b>\n%b";
|
||||
alignment = "left";
|
||||
vertical_alignment = "center";
|
||||
show_age_threshold = 60;
|
||||
ellipsize = "middle";
|
||||
ignore_newline = "no";
|
||||
stack_duplicates = true;
|
||||
hide_duplicate_count = false;
|
||||
show_indicators = "yes";
|
||||
enable_recursive_icon_lookup = true;
|
||||
icon_theme = "Adwaita";
|
||||
icon_position = "left";
|
||||
min_icon_size = 32;
|
||||
max_icon_size = 128;
|
||||
icon_path = "/usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/";
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
dmenu = "/usr/bin/dmenu -p dunst:";
|
||||
browser = "/usr/bin/xdg-open";
|
||||
always_run_script = true;
|
||||
title = "Dunst";
|
||||
class = "Dunst";
|
||||
corner_radius = 0;
|
||||
ignore_dbusclose = false;
|
||||
force_xwayland = false;
|
||||
force_xinerama = false;
|
||||
mouse_left_click = "close_current";
|
||||
mouse_middle_click = "do_action, close_current";
|
||||
mouse_right_click = "close_all";
|
||||
};
|
||||
|
||||
experimental = {
|
||||
per_monitor_dpi = false;
|
||||
};
|
||||
|
||||
|
||||
urgency_low = {
|
||||
background = "#222222";
|
||||
foreground = "#888888";
|
||||
timeout = 10;
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#285577";
|
||||
foreground = "#ffffff";
|
||||
timeout = 10;
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#900000";
|
||||
foreground = "#ffffff";
|
||||
frame_color = "#ff0000";
|
||||
timeout = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
overlays = with outputs.overlays; [
|
||||
nvim-plugins
|
||||
];
|
||||
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = _: true;
|
||||
|
||||
permittedInsecurePackages = [
|
||||
"electron-25.9.0"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
discord
|
||||
vesktop
|
||||
firefox
|
||||
chromium
|
||||
httpie
|
||||
kate
|
||||
dolphin
|
||||
ark
|
||||
rustup
|
||||
gcc
|
||||
prismlauncher
|
||||
pavucontrol
|
||||
difftastic
|
||||
sops
|
||||
(obsidian.override {
|
||||
electron = pkgs.electron_29-bin;
|
||||
})
|
||||
unzip
|
||||
vlc
|
||||
|
||||
cachix
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = "breeze-dark";
|
||||
package = pkgs.kdePackages.breeze-icons;
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
name = "breeze_cursors";
|
||||
package = pkgs.libsForQt5.breeze-qt5;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style.name = "breeze-dark";
|
||||
};
|
||||
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
# Git aliases
|
||||
gg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an (%ae)%C(reset)' --all";
|
||||
gca = "git add -A; git commit -a --amend --no-edit";
|
||||
gs = "git status";
|
||||
|
||||
# Replace some commands with better versions
|
||||
ssh = "kitty +kitten ssh";
|
||||
diff = "${pkgs.difftastic}/bin/difft";
|
||||
};
|
||||
initExtra = ''
|
||||
function open() {
|
||||
xdg-open $@ &> /dev/null &
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
theme = "Catppuccin-Mocha";
|
||||
settings = {
|
||||
background_opacity = "0.8";
|
||||
allow_remote_control = true;
|
||||
enable_audio_bell = false;
|
||||
};
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
|
||||
# Remove text from nix shell component
|
||||
nix_shell.format = "via [$symbol]($style) ";
|
||||
|
||||
git_status.disabled = true;
|
||||
package.disabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Kalle Struik";
|
||||
userEmail = "kalle@kallestruik.nl";
|
||||
difftastic.enable = true;
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "23.05"; # Please read the comment before changing.
|
||||
}
|
|
@ -0,0 +1,214 @@
|
|||
#
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
#
|
||||
|
||||
# Monitor configuration
|
||||
monitor=DP-2,1920x1080@144,0x1080,1
|
||||
monitor=HDMI-A-1,1920x1080@60,1500x0,1
|
||||
monitor=HDMI-A-2,1920x1080@60,1920x1080,1,transform,3
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
# Clipboard history
|
||||
exec-once = wl-paste --watch cliphist store
|
||||
# Notifications
|
||||
exec-once = dunst
|
||||
# Polkit
|
||||
exec-once = /usr/lib/polkit-kde-authentication-agent-1
|
||||
# Wallpapers
|
||||
exec-once = hyprpaper
|
||||
# Launcher
|
||||
exec-once = ulauncher --no-window-shadow --hide-window
|
||||
# Kde Connect
|
||||
exec-once = kdeconnect-indicator
|
||||
|
||||
# Bar
|
||||
exec-once = eww daemon
|
||||
exec-once = eww open bar
|
||||
|
||||
# Autostart applications
|
||||
exec-once = firefox
|
||||
exec-once = flatpak run org.mozilla.Thunderbird
|
||||
exec-once = flatpak run com.discordapp.Discord
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
# Some default env vars.
|
||||
env = XCURSOR_SIZE,24
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant = dvorak
|
||||
kb_model =
|
||||
kb_options = caps:escape
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = no
|
||||
}
|
||||
|
||||
sensitivity = 0.1 # -1.0 - 1.0, 0 means no modification.
|
||||
accel_profile = flat
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 10
|
||||
border_size = 1
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 5
|
||||
blur {
|
||||
enabled = yes
|
||||
size = 3
|
||||
passes = 1
|
||||
new_optimizations = on
|
||||
}
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
layerrule = blur,gtk-layer-shell
|
||||
layerrule = ignorezero,gtk-layer-shell
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 3, myBezier
|
||||
animation = windowsOut, 1, 3, default, popin 80%
|
||||
animation = border, 1, 5, default
|
||||
animation = borderangle, 1, 4, default
|
||||
animation = fade, 1, 3, default
|
||||
animation = workspaces, 1, 2, default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = off
|
||||
}
|
||||
|
||||
|
||||
# workspaces
|
||||
workspace = HDMI-A-1, name:third
|
||||
workspace = HDMI-A-2, name:second
|
||||
workspace = 1, monitor:DP-2
|
||||
workspace = 2, monitor:DP-2
|
||||
workspace = 3, monitor:DP-2
|
||||
workspace = 4, monitor:DP-2
|
||||
workspace = 5, monitor:DP-2
|
||||
workspace = 6, monitor:DP-2
|
||||
workspace = 7, monitor:DP-2
|
||||
workspace = 8, monitor:DP-2
|
||||
workspace = 9, monitor:DP-2
|
||||
workspace = 10, monitor:DP-2
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
$mainModShift = SUPER_SHIFT
|
||||
|
||||
bind = $mainMod, return, exec, kitty
|
||||
bind = $mainModShift, Q, killactive,
|
||||
bind = $mainMod, F, togglefloating,
|
||||
bind = $mainModShift, F, fullscreen
|
||||
bind = $mainMod, E, exec, ulauncher-toggle #wofi --show drun
|
||||
bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
||||
bind = CTRL, Print, exec, flameshot gui
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Media keys
|
||||
bind = ,XF86AudioPlay, exec, playerctl --player plasma-browser-integration play-pause
|
||||
bind = ,XF86AudioPrev, exec, playerctl previous
|
||||
bind = ,XF86AudioNext, exec, playerctl next
|
||||
bind = ,XF86AudioLowerVolume, exec, playerctl --player plasma-browser-integration volume 0.01-
|
||||
bind = ,XF86AudioRaiseVolume, exec, playerctl --player plasma-browser-integration volume 0.01+
|
||||
|
||||
|
||||
# This is a dumb work around for hyprland not passing ALT half the time with the pass dispatcher.
|
||||
bind = ALT, M, exec, xdotool key 'ALT+m'
|
||||
bind = ALT, B, exec, xdotool key 'ALT+b'
|
||||
#bind = ALT,M,pass,^(discord)$
|
||||
#bind = ALT,B,pass,^(discord)$
|
||||
|
||||
# Window rules
|
||||
# Auto workspace
|
||||
windowrule = workspace 1 silent,firefox
|
||||
windowrule = workspace name:second silent,discord
|
||||
windowrule = workspace 10 silent,thunderbird
|
||||
|
||||
# ULauncher
|
||||
windowrulev2 = forceinput,class:^(ulauncher)$
|
||||
windowrulev2 = dimaround,class:^(ulauncher)$
|
||||
|
||||
|
||||
# Flameshot
|
||||
windowrulev2 = nofullscreenrequest,title:^(flameshot)$
|
||||
windowrulev2 = float,title:^(flameshot)$
|
||||
windowrulev2 = move 0 -1080,title:^(flameshot)$
|
||||
windowrulev2 = noanim,title:^(flameshot)$
|
||||
windowrulev2 = rounding 0,title:^(flameshot)$
|
|
@ -0,0 +1,7 @@
|
|||
preload = ~/Pictures/Wallpapers/digital-art-16-1920×1080.jpg
|
||||
preload = ~/Pictures/Wallpapers/old-island-3-3840×2160.jpg
|
||||
preload = ~/Pictures/Wallpapers/lava-dragon-3-1920×1080.jpg
|
||||
|
||||
wallpaper = DP-2, ~/Pictures/Wallpapers/digital-art-16-1920×1080.jpg
|
||||
wallpaper = HDMI-A-1, ~/Pictures/Wallpapers/old-island-3-3840×2160.jpg
|
||||
wallpaper = HDMI-A-2, ~/Pictures/Wallpapers/lava-dragon-3-1920×1080.jpg
|
|
@ -1,313 +0,0 @@
|
|||
{ inputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
options =
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
hyprland = {
|
||||
mod = mkOption {
|
||||
type = types.str;
|
||||
default = "SUPER";
|
||||
};
|
||||
|
||||
autoStart = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
primaryMonitor = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
monitors = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
width = mkOption {
|
||||
type = types.int;
|
||||
};
|
||||
height = mkOption {
|
||||
type = types.int;
|
||||
};
|
||||
refreshRate = mkOption {
|
||||
type = types.int;
|
||||
default = 60;
|
||||
};
|
||||
x = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
y = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
transform = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
vrr = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
enabled = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
});
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
environment = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
};
|
||||
|
||||
sensitivity = mkOption {
|
||||
type = types.float;
|
||||
default = 0.0;
|
||||
};
|
||||
|
||||
keyboard = {
|
||||
layout = mkOption {
|
||||
type = types.str;
|
||||
default = "us";
|
||||
};
|
||||
|
||||
variant = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
|
||||
options = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
layout = mkOption { type = types.str; };
|
||||
|
||||
layerRules = mkOption {
|
||||
type = types.attrsOf (types.listOf types.str);
|
||||
default = { };
|
||||
};
|
||||
|
||||
windowRules = mkOption {
|
||||
type = types.attrsOf (types.listOf types.str);
|
||||
default = { };
|
||||
};
|
||||
|
||||
windowRulesV2 = mkOption {
|
||||
type = types.attrsOf (types.listOf types.str);
|
||||
default = { };
|
||||
};
|
||||
|
||||
binds = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
};
|
||||
|
||||
mouseBinds = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.hyprland;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
cliphist
|
||||
ulauncher
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
monitor = map
|
||||
(m:
|
||||
let
|
||||
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
|
||||
position = "${toString m.x}x${toString m.y}";
|
||||
vrr = if m.vrr != 0 then ",vrr,${toString m.vrr}" else "";
|
||||
transform = if m.transform != 0 then ",transform,${toString m.transform}" else "";
|
||||
in
|
||||
"${m.name},${if m.enabled then "${resolution},${position},1${vrr}${transform}" else "disable"}"
|
||||
)
|
||||
(cfg.monitors)
|
||||
# Automatically detect newly connected monitors
|
||||
++ [ ",preferred,auto,auto" ];
|
||||
|
||||
exec-once = [
|
||||
"${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.cliphist}/bin/cliphist store"
|
||||
"${pkgs.ulauncher}/bin/ulauncher --no-window-shadow --hide-window"
|
||||
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
|
||||
# kde-connect (somehow, wasnt working well last time)
|
||||
] ++ cfg.autoStart;
|
||||
|
||||
env = lib.mapAttrsToList (k: v: "${toString k},${v}") cfg.environment;
|
||||
|
||||
input = {
|
||||
kb_layout = cfg.keyboard.layout;
|
||||
kb_variant = cfg.keyboard.variant;
|
||||
kb_options = cfg.keyboard.options;
|
||||
|
||||
follow_mouse = 1;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = "yes";
|
||||
};
|
||||
|
||||
sensitivity = cfg.sensitivity;
|
||||
accel_profile = "flat";
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
|
||||
border_size = 1;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
|
||||
layout = cfg.layout;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 2;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 5;
|
||||
|
||||
blur = {
|
||||
enabled = "yes";
|
||||
size = 3;
|
||||
passes = 1;
|
||||
new_optimizations = "on";
|
||||
};
|
||||
|
||||
drop_shadow = "yes";
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = "on";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = [
|
||||
"myBezier, 0.05, 0.9, 0.1, 1.05"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windows, 1, 3, myBezier"
|
||||
"windowsOut, 1, 3, default, popin 80%"
|
||||
"border, 1, 5, default"
|
||||
"borderangle, 1, 4, default"
|
||||
"fade, 1, 3, default"
|
||||
"workspaces, 1, 2, default"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
layerrule =
|
||||
let
|
||||
y = ident: value: "${value},${ident}";
|
||||
x = ident: values: map (y ident) values;
|
||||
in
|
||||
lib.flatten (lib.mapAttrsToList x cfg.layerRules);
|
||||
|
||||
workspace =
|
||||
let
|
||||
# Create one work space for each non primary monitor
|
||||
perMonitorWorkspaces = map
|
||||
(m: "name:${m.name}, monitor:${m.name}")
|
||||
(lib.filter
|
||||
(m: m.name != cfg.primaryMonitor)
|
||||
cfg.monitors
|
||||
);
|
||||
|
||||
# Create 10 work spaces on the primary monitor
|
||||
primaryMonitorWorkspaces = map (i: "${toString i}, monitor:${cfg.primaryMonitor}") (lib.range 1 10);
|
||||
|
||||
in
|
||||
primaryMonitorWorkspaces ++ perMonitorWorkspaces;
|
||||
|
||||
bind =
|
||||
let
|
||||
# Create binds to switch workspaces and move windows between them
|
||||
workspaceBinds =
|
||||
lib.flatten
|
||||
(map
|
||||
(i:
|
||||
let
|
||||
k = if i == 10 then 0 else i;
|
||||
in
|
||||
[
|
||||
"${cfg.mod}, ${toString k}, workspace, ${toString i}"
|
||||
"${cfg.mod} SHIFT, ${toString k}, movetoworkspace, ${toString i}"
|
||||
]
|
||||
)
|
||||
(lib.range 1 10)
|
||||
);
|
||||
|
||||
# Create binds to manage wiwdows
|
||||
windowManagementBinds = [
|
||||
"${cfg.mod} SHIFT, Q, killactive"
|
||||
"${cfg.mod}, F, togglefloating"
|
||||
"${cfg.mod} SHIFT, F, fullscreen"
|
||||
];
|
||||
|
||||
configBinds = lib.mapAttrsToList (k: v: "${k}, ${v}") cfg.binds;
|
||||
in
|
||||
configBinds ++ workspaceBinds ++ windowManagementBinds;
|
||||
|
||||
bindm =
|
||||
let
|
||||
windowManagementBinds = [
|
||||
"${cfg.mod}, mouse:272, movewindow"
|
||||
"${cfg.mod}, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
configBinds = lib.mapAttrsToList (k: v: "${k}, ${v}") cfg.mouseBinds;
|
||||
|
||||
in
|
||||
configBinds ++ windowManagementBinds;
|
||||
|
||||
windowrule =
|
||||
let
|
||||
y = ident: value: "${value},${ident}";
|
||||
x = ident: values: map (y ident) values;
|
||||
in
|
||||
lib.flatten (lib.mapAttrsToList x cfg.windowRules);
|
||||
|
||||
windowrulev2 =
|
||||
let
|
||||
y = ident: value: "${value},${ident}";
|
||||
x = ident: values: map (y ident) values;
|
||||
in
|
||||
lib.flatten (lib.mapAttrsToList x cfg.windowRulesV2);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
{ inputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
options =
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
hyprpaper = {
|
||||
wallpaperFolder = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.hyprpaper;
|
||||
hyprlandCfg = config.hyprland;
|
||||
|
||||
changeWallpaperScript =
|
||||
pkgs.writeShellScriptBin
|
||||
"change-wallpaper"
|
||||
(lib.concatStringsSep
|
||||
"\n"
|
||||
(lib.flatten
|
||||
(map
|
||||
(m:
|
||||
let
|
||||
output = m.name;
|
||||
wallpaper = "\"$(${pkgs.findutils}/bin/find -L \"${cfg.wallpaperFolder}\" -type f | ${pkgs.coreutils}/bin/shuf -n 1)\"";
|
||||
in
|
||||
[
|
||||
"wallpaper=${wallpaper}"
|
||||
"${pkgs.hyprland}/bin/hyprctl hyprpaper preload $wallpaper"
|
||||
"${pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper ${output},$wallpaper"
|
||||
]
|
||||
)
|
||||
hyprlandCfg.monitors)
|
||||
++ [ "${pkgs.hyprland}/bin/hyprctl hyprpaper unload all" ])
|
||||
);
|
||||
in
|
||||
{
|
||||
hyprland.autoStart = [
|
||||
"${pkgs.hyprpaper}/bin/hyprpaper"
|
||||
"sleep 2; ${changeWallpaperScript}/bin/change-wallpaper"
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
hyprpaper
|
||||
changeWallpaperScript
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
font_family Fira Code
|
||||
|
||||
background_opacity 0.8
|
||||
allow_remote_control yes
|
|
@ -1,117 +0,0 @@
|
|||
{ inputs
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Deduplicate and optimize nix store
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "kalle-laptop";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true; # use xkbOptions in tty.
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
displayManager.sddm.enable = true;
|
||||
desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
xkb = {
|
||||
layout = "us";
|
||||
options = "eurosign:e,caps:escape";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
users.users.kalle = {
|
||||
isNormalUser = true;
|
||||
group = "kalle";
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
};
|
||||
|
||||
users.groups.kalle.gid = 1000;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
xdg-user-dirs
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-color-emoji
|
||||
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
|
||||
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
||||
];
|
||||
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = [ "Noto Serif" "Symbols Nerd Font" ];
|
||||
sansSerif = [ "Noto Sans" "Symbols Nerd Font" ];
|
||||
monospace = [ "Fira Code" "Symbols Nerd Font Mono" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Disable firewall.
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/f39bc45f-1489-4fe3-8a2f-6f768563ce20";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/C42C-12CF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -1,157 +0,0 @@
|
|||
{ inputs
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./hardware-configuration.override.nix
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Deduplicate and optimize nix store
|
||||
auto-optimise-store = true;
|
||||
# Allow me to use cachix
|
||||
trusted-users = [ "root" "kalle" ];
|
||||
substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "kalle-pc";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true; # use xkbOptions in tty.
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us";
|
||||
};
|
||||
|
||||
# Allow flashing ZSA keyboards
|
||||
hardware.keyboard.zsa.enable = true;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
# package = inputs.hyprland.packages.x86_64-linux.hyprland;
|
||||
};
|
||||
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
users.users.kalle = {
|
||||
isNormalUser = true;
|
||||
group = "kalle";
|
||||
extraGroups = [ "wheel" "dialout" ]; # Enable ‘sudo’ for the user.
|
||||
};
|
||||
|
||||
users.groups.kalle.gid = 1000;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
xdg-user-dirs
|
||||
|
||||
grim # For xdg-desktop-portal-hyprland which does not declare this dependency
|
||||
slurp # Some for this one
|
||||
|
||||
gamescope
|
||||
pkgsi686Linux.gperftools # Needed for tf2
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-color-emoji
|
||||
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
|
||||
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
||||
];
|
||||
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = [ "Noto Serif" "Symbols Nerd Font" ];
|
||||
sansSerif = [ "Noto Sans" "Symbols Nerd Font" ];
|
||||
monospace = [ "Fira Code" "Symbols Nerd Font Mono" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Steam needs to be installed on system level, because reasons
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs = pkgs: with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
];
|
||||
extraLibraries = pkgs: with pkgs; [
|
||||
gperftools # Needed for tf2 to work
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.gvfs.enable = true;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Disable firewall.
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/23F6-1045";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/swap" =
|
||||
{ device = "/dev/disk/by-uuid/d453acaf-12a4-4f7a-b33e-90d87a086995";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=swap" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp35s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{ config, lib, pkgs, modulesPath, ...}:
|
||||
|
||||
{
|
||||
fileSystems = {
|
||||
# Extra filesystem configs to enable compression.
|
||||
"/".options = [ "compress=zstd" ];
|
||||
"/home".options = [ "compress=zstd" ];
|
||||
"/nix".options = [ "compress=zstd" "noatime" ];
|
||||
"/swap".options = [ "noatime" ];
|
||||
|
||||
# Mount other drives
|
||||
"/mnt/games" = {
|
||||
device = "/dev/disk/by-uuid/0ac05c3f-df12-458e-b145-e912febe1205";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/mnt/external" = {
|
||||
device = "/dev/disk/by-uuid/13e2dfc3-7b4d-44ac-9417-51b933a36917";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
vim.opt.commentstring = "--%s"
|
|
@ -0,0 +1,3 @@
|
|||
vim.opt_local.textwidth = 80
|
||||
vim.opt_local.colorcolumn = "81"
|
||||
vim.opt_local.formatoptions:append("a")
|
|
@ -0,0 +1,52 @@
|
|||
require('bufferline').setup {
|
||||
options = {
|
||||
mode = 'buffers',
|
||||
numbers = 'ordinal',
|
||||
separator_style = 'slant',
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = false,
|
||||
show_close_icon = false,
|
||||
always_show_bufferline = true,
|
||||
right_mouse_command = function(bufnum) end,
|
||||
middle_mouse_command = function(bufnum)
|
||||
require('bufdelete').bufdelete(bufnum)
|
||||
end,
|
||||
custom_areas = {
|
||||
right = function()
|
||||
local result = {}
|
||||
local seve = vim.diagnostic.severity
|
||||
local error = #vim.diagnostic.get(0, {severity = seve.ERROR})
|
||||
local warning = #vim.diagnostic.get(0, {severity = seve.WARN})
|
||||
local info = #vim.diagnostic.get(0, {severity = seve.INFO})
|
||||
local hint = #vim.diagnostic.get(0, {severity = seve.HINT})
|
||||
|
||||
if error ~= 0 then
|
||||
table.insert(result, {text = " " .. error, fg = "#EC5241"})
|
||||
end
|
||||
|
||||
if warning ~= 0 then
|
||||
table.insert(result, {text = " " .. warning, fg = "#EFB839"})
|
||||
end
|
||||
|
||||
if hint ~= 0 then
|
||||
table.insert(result, {text = " " .. hint, fg = "#A3BA5E"})
|
||||
end
|
||||
|
||||
if info ~= 0 then
|
||||
table.insert(result, {text = " " .. info, fg = "#7EA9A7"})
|
||||
end
|
||||
return result
|
||||
end,
|
||||
},
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = function()
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
highlight = "Directory",
|
||||
text_align = "left"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
local cmp = require'cmp'
|
||||
local luasnip = require'luasnip'
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- Add tab support
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
})
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }, -- file paths
|
||||
{ name = 'nvim_lsp' }, -- from language server
|
||||
{ name = 'nvim_lsp_signature_help'}, -- display function signatures with current parameter emphasized
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'nvim_lua' }, -- complete neovim's Lua runtime API such vim.lsp.*
|
||||
{ name = 'buffer' }, -- source current buffer
|
||||
{ name = 'calc'}, -- source for math calculation
|
||||
}),
|
||||
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 = 'λ',
|
||||
vsnip = '⋗',
|
||||
buffer = 'Ω',
|
||||
path = '🖫',
|
||||
}
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
require('which-key').setup()
|
||||
require('neogit').setup()
|
||||
require('lualine').setup()
|
||||
require('marks').setup()
|
||||
require('Comment').setup()
|
||||
require('illuminate').configure()
|
||||
require("todo-comments").setup()
|
||||
require("nvim-autopairs").setup()
|
||||
require("fidget").setup()
|
||||
require('nvim-highlight-colors').setup()
|
||||
|
||||
require('gitsigns').setup {
|
||||
current_line_blame = true,
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
local function map(mode, keys, func, desc, silent)
|
||||
local silent = silent == nil and true or silent
|
||||
vim.keymap.set(mode, keys, func, { desc = desc, silent = silent })
|
||||
vim.keymap.set(mode, keys, func, {desc = desc, silent = silent})
|
||||
end
|
||||
|
||||
-- Movement between windows
|
||||
|
@ -11,19 +11,18 @@ map('n', '<leader>j', function() vim.cmd.wincmd('j') end, "Window Down")
|
|||
map('n', '<leader>k', function() vim.cmd.wincmd('k') end, "Window Up")
|
||||
map('n', '<leader>l', function() vim.cmd.wincmd('l') end, "Window Right")
|
||||
|
||||
-- Harpoon keybinds
|
||||
map('n', '<leader>mm', require('harpoon.mark').add_file, "[M]ark file in harpoon")
|
||||
map('n', '<leader>mh', require('harpoon.ui').toggle_quick_menu, "[M]enu [H]arpoon")
|
||||
map('n', '<leader>1', function() require('harpoon.ui').nav_file(1) end, "Harpoon [1]")
|
||||
map('n', '<leader>2', function() require('harpoon.ui').nav_file(2) end, "Harpoon [2]")
|
||||
map('n', '<leader>3', function() require('harpoon.ui').nav_file(3) end, "Harpoon [3]")
|
||||
map('n', '<leader>4', function() require('harpoon.ui').nav_file(4) end, "Harpoon [4]")
|
||||
map('n', '<leader>5', function() require('harpoon.ui').nav_file(5) end, "Harpoon [5]")
|
||||
map('n', '<leader>6', function() require('harpoon.ui').nav_file(6) end, "Harpoon [6]")
|
||||
map('n', '<leader>7', function() require('harpoon.ui').nav_file(7) end, "Harpoon [7]")
|
||||
map('n', '<leader>8', function() require('harpoon.ui').nav_file(8) end, "Harpoon [8]")
|
||||
map('n', '<leader>9', function() require('harpoon.ui').nav_file(9) end, "Harpoon [9]")
|
||||
-- Buffer hotkeys
|
||||
map('n', '<leader>1', function() vim.cmd.BufferLineGoToBuffer(1) end, 'Tab 1')
|
||||
map('n', '<leader>2', function() vim.cmd.BufferLineGoToBuffer(2) end, 'Tab 2')
|
||||
map('n', '<leader>3', function() vim.cmd.BufferLineGoToBuffer(3) end, 'Tab 3')
|
||||
map('n', '<leader>4', function() vim.cmd.BufferLineGoToBuffer(4) end, 'Tab 4')
|
||||
map('n', '<leader>5', function() vim.cmd.BufferLineGoToBuffer(5) end, 'Tab 5')
|
||||
map('n', '<leader>6', function() vim.cmd.BufferLineGoToBuffer(6) end, 'Tab 6')
|
||||
map('n', '<leader>7', function() vim.cmd.BufferLineGoToBuffer(7) end, 'Tab 7')
|
||||
map('n', '<leader>8', function() vim.cmd.BufferLineGoToBuffer(8) end, 'Tab 8')
|
||||
map('n', '<leader>9', function() vim.cmd.BufferLineGoToBuffer(9) end, 'Tab 9')
|
||||
|
||||
map('n', '<leader>tt', vim.cmd.NvimTreeToggle, '[T]oggle file [T]ree')
|
||||
map('n', '<leader>tg', vim.cmd.Neogit, '[T]oggle [G]it view')
|
||||
map('n', '<leader>tu', require('undotree').toggle, '[T]oggle [U]ndo tree')
|
||||
|
||||
|
@ -34,11 +33,12 @@ map('n', '<leader>q', vim.diagnostic.setloclist, 'Errors to [Q]uickfix')
|
|||
|
||||
|
||||
map('n', '<leader>?', require('telescope.builtin').oldfiles, '[?] Find recently opened files')
|
||||
map('n', '<leader><space>', require('telescope.builtin').find_files, '[ ]Search Files')
|
||||
map('n', '<leader>sb', require('telescope.builtin').buffers, '[S]earch [B]uffers')
|
||||
map('n', '<leader><space>', require('telescope.builtin').buffers, '[ ] Find existing buffers')
|
||||
map('n', '<leader>sf', require('telescope.builtin').find_files, '[S]earch [F]iles')
|
||||
map('n', '<leader>sh', require('telescope.builtin').help_tags, '[S]earch [H]elp')
|
||||
map('n', '<leader>sw', require('telescope.builtin').grep_string, '[S]earch current [W]ord')
|
||||
map('n', '<leader>sg', require('telescope.builtin').live_grep, '[S]earch by [G]rep')
|
||||
map('n', '<leader>sd', require('telescope.builtin').diagnostics, '[S]earch [D]iagnostics')
|
||||
|
||||
map({ 'n', 't' }, '<A-t>', require("FTerm").toggle, 'Toggle Terminal')
|
||||
map({'n', 't'}, '<A-t>', require("FTerm").toggle, 'Toggle Terminal')
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||
|
||||
local on_attach = function(_, bufnr)
|
||||
local nmap = function(keys, func, desc)
|
||||
if desc then
|
||||
desc = 'LSP: ' .. desc
|
||||
end
|
||||
|
||||
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
|
||||
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||
|
||||
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||
nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||
nmap('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
||||
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||
|
||||
-- See `:help K` for why this keymap
|
||||
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||
|
||||
-- Lesser used LSP functionality
|
||||
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
||||
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
||||
nmap('<leader>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, '[W]orkspace [L]ist Folders')
|
||||
|
||||
-- Create a command `:Format` local to the LSP buffer
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||
if vim.lsp.buf.format then
|
||||
vim.lsp.buf.format()
|
||||
elseif vim.lsp.buf.formatting then
|
||||
vim.lsp.buf.formatting()
|
||||
end
|
||||
end, { desc = 'Format current buffer with LSP' })
|
||||
end
|
||||
|
||||
require("mason-lspconfig").setup_handlers({
|
||||
function (server_name) -- default handler (optional)
|
||||
if server_name == 'sumneko_lua' then
|
||||
require("lspconfig")[server_name].setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = {'vim'}
|
||||
},
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
path = vim.split(package.path, ";")
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
else
|
||||
require("lspconfig")[server_name].setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
require('mason-nvim-dap').setup()
|
||||
|
||||
|
||||
local rt_config = {
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
checkOnSave = {
|
||||
command = "clippy"
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
require('rust-tools').setup(rt_config)
|
||||
|
||||
-- LSP Diagnostics Options Setup
|
||||
local sign = function(opts)
|
||||
vim.fn.sign_define(opts.name, {
|
||||
texthl = opts.name,
|
||||
text = opts.text,
|
||||
numhl = ''
|
||||
})
|
||||
end
|
||||
|
||||
sign({name = 'DiagnosticSignError', text = ''})
|
||||
sign({name = 'DiagnosticSignWarn', text = ''})
|
||||
sign({name = 'DiagnosticSignHint', text = ''})
|
||||
sign({name = 'DiagnosticSignInfo', text = ''})
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
signs = true,
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = false,
|
||||
float = {
|
||||
border = 'rounded',
|
||||
source = 'always',
|
||||
header = '',
|
||||
prefix = '',
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd([[
|
||||
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
|
||||
]])
|
||||
|
||||
|
||||
require('nvim-lightbulb').setup({autocmd = {enabled = true}})
|
|
@ -0,0 +1,19 @@
|
|||
require('nvim-tree').setup {
|
||||
sort_by = 'case_sensitive',
|
||||
view = {
|
||||
adaptive_size = true,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
highlight_git = true,
|
||||
highlight_opened_files = "name",
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = true,
|
||||
},
|
||||
}
|
||||
|
||||
require("lsp-file-operations").setup()
|
|
@ -0,0 +1,13 @@
|
|||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
['<C-u>'] = false,
|
||||
['<C-d>'] = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
require("telescope").load_extension("ui-select")
|
||||
pcall(require('telescope').load_extension, 'fzf')
|
|
@ -0,0 +1,24 @@
|
|||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = { "lua", "rust", "toml" },
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
}
|
||||
}
|
||||
|
||||
-- Treesitter folding
|
||||
vim.wo.foldmethod = 'expr'
|
||||
vim.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
vim.o.foldenable = false
|
|
@ -0,0 +1 @@
|
|||
require('undotree').setup()
|
133
nvim/default.nix
133
nvim/default.nix
|
@ -1,133 +0,0 @@
|
|||
{ inputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.neovim =
|
||||
let
|
||||
toLua = str: "lua << EOF\n${str}\nEOF\n";
|
||||
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
nodejs_22 # Required for copilot-vim
|
||||
ripgrep # Required for telescope
|
||||
wl-clipboard # Required for clipboard sync
|
||||
|
||||
# Language servers
|
||||
clang-tools
|
||||
lua-language-server
|
||||
nodePackages.typescript-language-server
|
||||
typescript
|
||||
tailwindcss-language-server
|
||||
gopls
|
||||
vhdl-ls
|
||||
nixd
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
yuck-vim
|
||||
|
||||
{
|
||||
plugin = which-key-nvim;
|
||||
config = toLua "require('which-key').setup()";
|
||||
}
|
||||
|
||||
neodev-nvim
|
||||
plenary-nvim
|
||||
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
config = toLuaFile ./plugin/telescope.lua;
|
||||
}
|
||||
telescope-ui-select-nvim
|
||||
|
||||
FTerm-nvim
|
||||
|
||||
vim-fugitive
|
||||
|
||||
harpoon1
|
||||
|
||||
{
|
||||
plugin = undotree-nvim;
|
||||
config = toLua "require('undotree').setup()";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
config = toLua "require('Comment').setup()";
|
||||
}
|
||||
{
|
||||
plugin = todo-comments-nvim;
|
||||
config = toLua "require('todo-comments').setup()";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = neoconf-nvim;
|
||||
config = toLua "require('neoconf').setup()";
|
||||
}
|
||||
{
|
||||
plugin = catppuccin-nvim;
|
||||
config = "colorscheme catppuccin-mocha";
|
||||
}
|
||||
|
||||
cmp-nvim-lsp
|
||||
cmp-nvim-lsp-signature-help
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
cmp-git
|
||||
cmp-calc
|
||||
cmp_luasnip
|
||||
copilot-cmp
|
||||
luasnip
|
||||
friendly-snippets
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
config = toLuaFile ./plugin/cmp.lua;
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
config = toLuaFile ./plugin/lsp.lua;
|
||||
}
|
||||
rust-tools-nvim
|
||||
{
|
||||
plugin = fidget-nvim;
|
||||
config = toLua "require('fidget').setup({})";
|
||||
}
|
||||
|
||||
rainbow-delimiters-nvim
|
||||
|
||||
{
|
||||
plugin = (nvim-treesitter.withAllGrammars);
|
||||
config = toLuaFile ./plugin/treesitter.lua;
|
||||
}
|
||||
|
||||
{
|
||||
plugin = copilot-lua;
|
||||
config = toLua ''
|
||||
require("copilot").setup({
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraLuaConfig = ''
|
||||
${builtins.readFile ./options.lua}
|
||||
${builtins.readFile ./keymaps.lua}
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
|
@ -37,5 +37,28 @@ vim.opt.updatetime = 50
|
|||
vim.opt.completeopt = { 'menuone', 'noselect', 'noinsert' }
|
||||
vim.opt.shortmess = vim.opt.shortmess + { c = true }
|
||||
|
||||
vim.opt.timeoutlen = 1000 -- For agda unicode chars to work properly
|
||||
|
||||
-- Languagetool stuff
|
||||
vim.g.languagetool_server_command = '/usr/bin/languagetool --http'
|
||||
|
||||
-- Load plugins
|
||||
require('kalle.plugins')
|
||||
|
||||
vim.cmd.colorscheme('carbonfox')
|
||||
|
||||
vim.g.vimtex_compiler_latexmk = { -- Make vimtex allow shell-escape while compiling
|
||||
options = {
|
||||
'-shell-escape',
|
||||
'-verbose',
|
||||
'-file-line-error',
|
||||
'-synctex=1',
|
||||
'-interaction=nonstopmode'
|
||||
}
|
||||
}
|
||||
|
||||
-- Autoformat on save
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||
|
||||
-- TODO:
|
||||
-- - Debugger integration (gdb?, java?/kotlin?, rust?, etc) - nvim-dap and friends
|
|
@ -0,0 +1,135 @@
|
|||
vim.cmd([[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
|
||||
augroup end
|
||||
]])
|
||||
|
||||
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 })
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
end
|
||||
|
||||
return require('packer').startup({
|
||||
function(use)
|
||||
use('ashinkarov/nvim-agda')
|
||||
use('lervag/vimtex')
|
||||
use('vigoux/LanguageTool.nvim')
|
||||
|
||||
use('wbthomason/packer.nvim')
|
||||
use('EdenEast/nightfox.nvim')
|
||||
use('folke/which-key.nvim')
|
||||
use('numToStr/FTerm.nvim')
|
||||
|
||||
use('brenoprata10/nvim-highlight-colors')
|
||||
|
||||
use('jiaoshijie/undotree')
|
||||
|
||||
use('j-hui/fidget.nvim')
|
||||
|
||||
use('elkowar/yuck.vim')
|
||||
|
||||
use('numToStr/Comment.nvim')
|
||||
use('RRethy/vim-illuminate')
|
||||
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = function() require('nvim-treesitter.install').update({ with_sync = true }) end,
|
||||
}
|
||||
use('https://git.sr.ht/~p00f/nvim-ts-rainbow')
|
||||
use('windwp/nvim-autopairs')
|
||||
use('windwp/nvim-ts-autotag')
|
||||
|
||||
use {
|
||||
'kosayoda/nvim-lightbulb',
|
||||
requires = 'antoinemadec/FixCursorHold.nvim',
|
||||
}
|
||||
|
||||
use {
|
||||
'kyazdani42/nvim-tree.lua',
|
||||
requires = {
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
},
|
||||
}
|
||||
|
||||
use {
|
||||
'antosha417/nvim-lsp-file-operations',
|
||||
requires = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "kyazdani42/nvim-tree.lua" },
|
||||
}
|
||||
}
|
||||
|
||||
use {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
}
|
||||
|
||||
use('simrat39/rust-tools.nvim')
|
||||
|
||||
use('chentoast/marks.nvim')
|
||||
|
||||
use('neovim/nvim-lspconfig')
|
||||
|
||||
use('mfussenegger/nvim-dap')
|
||||
use('rcarriga/nvim-dap-ui')
|
||||
use('theHamsta/nvim-dap-virtual-text')
|
||||
use('nvim-telescope/telescope-dap.nvim')
|
||||
use('jayp0521/mason-nvim-dap.nvim')
|
||||
|
||||
use {
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
}
|
||||
|
||||
use 'famiu/bufdelete.nvim'
|
||||
|
||||
use {
|
||||
'TimUntersberger/neogit',
|
||||
'lewis6991/gitsigns.nvim',
|
||||
}
|
||||
use('nvim-lua/plenary.nvim')
|
||||
|
||||
use('nvim-lualine/lualine.nvim')
|
||||
use {
|
||||
'akinsho/bufferline.nvim', tag = "v2.*",
|
||||
requires = 'kyazdani42/nvim-web-devicons'
|
||||
}
|
||||
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.0',
|
||||
requires = {
|
||||
'nvim-lua/plenary.nvim'
|
||||
},
|
||||
}
|
||||
|
||||
use('nvim-telescope/telescope-ui-select.nvim')
|
||||
|
||||
use('folke/todo-comments.nvim')
|
||||
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end,
|
||||
config = {
|
||||
auto_reload_compiled = false, -- Automatically reload the compiled file after creating it.
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require('packer.util').float({ border = 'single' })
|
||||
end
|
||||
}
|
||||
}
|
||||
})
|
||||
-- run bootstrap: nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
|
@ -1,102 +0,0 @@
|
|||
local cmp = require 'cmp'
|
||||
local luasnip = require 'luasnip'
|
||||
|
||||
require("copilot_cmp").setup()
|
||||
|
||||
local has_words_before = function()
|
||||
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then return false end
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]:match("^%s*$") == nil
|
||||
end
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- Add tab support
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() and has_words_before() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
})
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "copilot", group_index = 2 },
|
||||
{ name = 'path' }, -- file paths
|
||||
{ name = 'nvim_lsp' }, -- from language server
|
||||
{ name = 'nvim_lsp_signature_help' }, -- display function signatures with current parameter emphasized
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'nvim_lua' }, -- complete neovim's Lua runtime API such vim.lsp.*
|
||||
{ name = 'buffer' }, -- source current buffer
|
||||
{ name = 'calc' }, -- source for math calculation
|
||||
}),
|
||||
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 = 'λ',
|
||||
vsnip = '⋗',
|
||||
buffer = 'Ω',
|
||||
path = '🖫',
|
||||
}
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
|
@ -1,149 +0,0 @@
|
|||
local on_attach = function(_, bufnr)
|
||||
local nmap = function(keys, func, desc)
|
||||
if desc then
|
||||
desc = 'LSP: ' .. desc
|
||||
end
|
||||
|
||||
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
|
||||
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||
|
||||
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||
nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||
nmap('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
||||
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||
|
||||
-- See `:help K` for why this keymap
|
||||
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||
|
||||
-- Lesser used LSP functionality
|
||||
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
||||
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
||||
nmap('<leader>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, '[W]orkspace [L]ist Folders')
|
||||
|
||||
-- Create a command `:Format` local to the LSP buffer
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||
if vim.lsp.buf.format then
|
||||
vim.lsp.buf.format()
|
||||
elseif vim.lsp.buf.formatting then
|
||||
vim.lsp.buf.formatting()
|
||||
end
|
||||
end, { desc = 'Format current buffer with LSP' })
|
||||
end
|
||||
|
||||
-- LSP Diagnostics Options Setup
|
||||
local sign = function(opts)
|
||||
vim.fn.sign_define(opts.name, {
|
||||
texthl = opts.name,
|
||||
text = opts.text,
|
||||
numhl = ''
|
||||
})
|
||||
end
|
||||
|
||||
sign({ name = 'DiagnosticSignError', text = '' })
|
||||
sign({ name = 'DiagnosticSignWarn', text = '' })
|
||||
sign({ name = 'DiagnosticSignHint', text = '' })
|
||||
sign({ name = 'DiagnosticSignInfo', text = '' })
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
signs = true,
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = false,
|
||||
float = {
|
||||
border = 'rounded',
|
||||
source = 'always',
|
||||
header = '',
|
||||
prefix = '',
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd([[
|
||||
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
|
||||
]])
|
||||
|
||||
-- LSP Configuration
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||
|
||||
require('neodev').setup({
|
||||
override = function(root_dir, library)
|
||||
if root_dir:find("/home/kalle/.dots", 1, true) == 1 then
|
||||
library.enabled = true
|
||||
library.plugins = true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
require('lspconfig').lua_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_dir = function()
|
||||
return vim.loop.cwd()
|
||||
end,
|
||||
cmd = { "lua-language-server" },
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
require('lspconfig').nixd.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
require('lspconfig').tsserver.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
init_options = {
|
||||
tsserver = {
|
||||
fallbackPath = string.gsub(vim.fn.system("dirname `which tsserver`"), '^%s*(.-)%s*$', '%1') .. "/../lib/node_modules/typescript/lib",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
require('lspconfig').tailwindcss.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
require('lspconfig').clangd.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
require('lspconfig').gopls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
require('lspconfig').vhdl_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
require('rust-tools').setup({
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
checkOnSave = {
|
||||
command = "clippy"
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
|
@ -0,0 +1,339 @@
|
|||
-- Automatically generated packer.nvim plugin loader code
|
||||
|
||||
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
||||
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_command('packadd packer.nvim')
|
||||
|
||||
local no_errors, error_msg = pcall(function()
|
||||
|
||||
_G._packer = _G._packer or {}
|
||||
_G._packer.inside_compile = true
|
||||
|
||||
local time
|
||||
local profile_info
|
||||
local should_profile = false
|
||||
if should_profile then
|
||||
local hrtime = vim.loop.hrtime
|
||||
profile_info = {}
|
||||
time = function(chunk, start)
|
||||
if start then
|
||||
profile_info[chunk] = hrtime()
|
||||
else
|
||||
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
||||
end
|
||||
end
|
||||
else
|
||||
time = function(chunk, start) end
|
||||
end
|
||||
|
||||
local function save_profiles(threshold)
|
||||
local sorted_times = {}
|
||||
for chunk_name, time_taken in pairs(profile_info) do
|
||||
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
||||
end
|
||||
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
||||
local results = {}
|
||||
for i, elem in ipairs(sorted_times) do
|
||||
if not threshold or threshold and elem[2] > threshold then
|
||||
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
||||
end
|
||||
end
|
||||
if threshold then
|
||||
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
|
||||
end
|
||||
|
||||
_G._packer.profile_output = results
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/share/lua/5.1/?.lua;/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/share/lua/5.1/?/init.lua;/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/lib/luarocks/rocks-5.1/?.lua;/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/kalle/.cache/nvim/packer_hererocks/2.1.1694285958/lib/lua/5.1/?.so"
|
||||
if not string.find(package.path, package_path_str, 1, true) then
|
||||
package.path = package.path .. ';' .. package_path_str
|
||||
end
|
||||
|
||||
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
||||
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], false)
|
||||
time([[try_loadstring definition]], true)
|
||||
local function try_loadstring(s, component, name)
|
||||
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||
if not success then
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||
end)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
time([[try_loadstring definition]], false)
|
||||
time([[Defining packer_plugins]], true)
|
||||
_G.packer_plugins = {
|
||||
["Comment.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/Comment.nvim",
|
||||
url = "https://github.com/numToStr/Comment.nvim"
|
||||
},
|
||||
["FTerm.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/FTerm.nvim",
|
||||
url = "https://github.com/numToStr/FTerm.nvim"
|
||||
},
|
||||
["FixCursorHold.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/FixCursorHold.nvim",
|
||||
url = "https://github.com/antoinemadec/FixCursorHold.nvim"
|
||||
},
|
||||
["LanguageTool.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/LanguageTool.nvim",
|
||||
url = "https://github.com/vigoux/LanguageTool.nvim"
|
||||
},
|
||||
LuaSnip = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||
},
|
||||
["bufdelete.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/bufdelete.nvim",
|
||||
url = "https://github.com/famiu/bufdelete.nvim"
|
||||
},
|
||||
["bufferline.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/bufferline.nvim",
|
||||
url = "https://github.com/akinsho/bufferline.nvim"
|
||||
},
|
||||
["cmp-buffer"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
||||
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||
},
|
||||
["cmp-cmdline"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
|
||||
url = "https://github.com/hrsh7th/cmp-cmdline"
|
||||
},
|
||||
["cmp-nvim-lsp"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
["cmp-nvim-lsp-signature-help"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help",
|
||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help"
|
||||
},
|
||||
["cmp-path"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||
url = "https://github.com/hrsh7th/cmp-path"
|
||||
},
|
||||
cmp_luasnip = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
||||
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||
},
|
||||
["fidget.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/fidget.nvim",
|
||||
url = "https://github.com/j-hui/fidget.nvim"
|
||||
},
|
||||
["gitsigns.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
|
||||
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||
},
|
||||
["lualine.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||
},
|
||||
["marks.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/marks.nvim",
|
||||
url = "https://github.com/chentoast/marks.nvim"
|
||||
},
|
||||
["mason-lspconfig.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
|
||||
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||
},
|
||||
["mason-nvim-dap.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/mason-nvim-dap.nvim",
|
||||
url = "https://github.com/jayp0521/mason-nvim-dap.nvim"
|
||||
},
|
||||
["mason.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
||||
url = "https://github.com/williamboman/mason.nvim"
|
||||
},
|
||||
neogit = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/neogit",
|
||||
url = "https://github.com/TimUntersberger/neogit"
|
||||
},
|
||||
["nightfox.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nightfox.nvim",
|
||||
url = "https://github.com/EdenEast/nightfox.nvim"
|
||||
},
|
||||
["nvim-agda"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-agda",
|
||||
url = "https://github.com/ashinkarov/nvim-agda"
|
||||
},
|
||||
["nvim-autopairs"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
|
||||
url = "https://github.com/windwp/nvim-autopairs"
|
||||
},
|
||||
["nvim-cmp"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||
},
|
||||
["nvim-dap"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-dap",
|
||||
url = "https://github.com/mfussenegger/nvim-dap"
|
||||
},
|
||||
["nvim-dap-ui"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-dap-ui",
|
||||
url = "https://github.com/rcarriga/nvim-dap-ui"
|
||||
},
|
||||
["nvim-dap-virtual-text"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text",
|
||||
url = "https://github.com/theHamsta/nvim-dap-virtual-text"
|
||||
},
|
||||
["nvim-highlight-colors"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-highlight-colors",
|
||||
url = "https://github.com/brenoprata10/nvim-highlight-colors"
|
||||
},
|
||||
["nvim-lightbulb"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-lightbulb",
|
||||
url = "https://github.com/kosayoda/nvim-lightbulb"
|
||||
},
|
||||
["nvim-lsp-file-operations"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-lsp-file-operations",
|
||||
url = "https://github.com/antosha417/nvim-lsp-file-operations"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||
url = "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
["nvim-tree.lua"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
|
||||
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
["nvim-ts-autotag"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag",
|
||||
url = "https://github.com/windwp/nvim-ts-autotag"
|
||||
},
|
||||
["nvim-ts-rainbow"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-ts-rainbow",
|
||||
url = "https://git.sr.ht/~p00f/nvim-ts-rainbow"
|
||||
},
|
||||
["nvim-web-devicons"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||
url = "https://github.com/wbthomason/packer.nvim"
|
||||
},
|
||||
["plenary.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
["rust-tools.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/rust-tools.nvim",
|
||||
url = "https://github.com/simrat39/rust-tools.nvim"
|
||||
},
|
||||
["telescope-dap.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/telescope-dap.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope-dap.nvim"
|
||||
},
|
||||
["telescope-ui-select.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/telescope-ui-select.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope-ui-select.nvim"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||
},
|
||||
["todo-comments.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/todo-comments.nvim",
|
||||
url = "https://github.com/folke/todo-comments.nvim"
|
||||
},
|
||||
undotree = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/undotree",
|
||||
url = "https://github.com/jiaoshijie/undotree"
|
||||
},
|
||||
["vim-illuminate"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/vim-illuminate",
|
||||
url = "https://github.com/RRethy/vim-illuminate"
|
||||
},
|
||||
vimtex = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/vimtex",
|
||||
url = "https://github.com/lervag/vimtex"
|
||||
},
|
||||
["which-key.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/which-key.nvim",
|
||||
url = "https://github.com/folke/which-key.nvim"
|
||||
},
|
||||
["yuck.vim"] = {
|
||||
loaded = true,
|
||||
path = "/home/kalle/.local/share/nvim/site/pack/packer/start/yuck.vim",
|
||||
url = "https://github.com/elkowar/yuck.vim"
|
||||
}
|
||||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
|
||||
_G._packer.inside_compile = false
|
||||
if _G._packer.needs_bufread == true then
|
||||
vim.cmd("doautocmd BufRead")
|
||||
end
|
||||
_G._packer.needs_bufread = false
|
||||
|
||||
if should_profile then save_profiles() end
|
||||
|
||||
end)
|
||||
|
||||
if not no_errors then
|
||||
error_msg = error_msg:gsub('"', '\\"')
|
||||
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
['<C-u>'] = false,
|
||||
['<C-d>'] = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
require("telescope").load_extension("ui-select")
|
||||
pcall(require('telescope').load_extension, 'fzf')
|
|
@ -1,9 +0,0 @@
|
|||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {},
|
||||
|
||||
auto_install = false,
|
||||
|
||||
highlight = { enable = true },
|
||||
|
||||
indent = { enable = true },
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
unnamedplus
|
||||
updatetime
|
||||
menuone
|
||||
noselect
|
||||
noinsert
|
||||
kalle
|
||||
utils
|
||||
colorscheme
|
||||
config
|
||||
carbonfox
|
||||
lua
|
||||
github
|
||||
nvim
|
||||
treesitter
|
||||
FixCursorHold
|
||||
lightbulb
|
||||
antoinemadec
|
||||
kosayoda
|
||||
kyazdani42
|
||||
devicons
|
||||
lspconfig
|
||||
williamboman
|
||||
simrat39
|
||||
chentoast
|
||||
neovim
|
||||
mfussenegger
|
||||
rcarriga
|
||||
theHamsta
|
||||
dap
|
||||
ui
|
||||
jayp0521
|
||||
MunifTanjim
|
||||
noice
|
||||
folke
|
||||
numToStr
|
||||
EdenEast
|
||||
wbthomason
|
||||
nui
|
||||
RRethy
|
||||
hrsh7th
|
||||
cmp
|
||||
cmdline
|
||||
vsnip
|
||||
lsp
|
||||
bufdelete
|
||||
famiu
|
||||
TimUntersberger
|
||||
lewis6991
|
||||
neogit
|
||||
gitsigns
|
||||
lualine
|
||||
bufferline
|
||||
akinsho
|
||||
v2
|
||||
todo
|
||||
nightfox
|
||||
FTerm
|
||||
dto
|
||||
api
|
||||
loadPage
|
||||
hits
|
||||
Bruijn
|
Binary file not shown.
|
@ -1,24 +0,0 @@
|
|||
{ inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
nvim-plugins = final: prev: {
|
||||
vimPlugins = prev.vimPlugins // {
|
||||
rainbow-delimiters-nvim = prev.vimUtils.buildVimPlugin {
|
||||
name = "raindow-delimiters.nvim";
|
||||
src = inputs.plugin-rainbow-delimiters-nvim;
|
||||
};
|
||||
|
||||
undotree-nvim = prev.vimUtils.buildVimPlugin {
|
||||
name = "undotree.nvim";
|
||||
src = inputs.plugin-undotree-nvim;
|
||||
};
|
||||
|
||||
harpoon1 = prev.vimUtils.buildVimPlugin {
|
||||
name = "harpoon";
|
||||
src = inputs.plugin-harpoon1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
sleep 3
|
||||
|
||||
for i in $(seq 250); do
|
||||
xdotool mousedown 3
|
||||
sleep 0.010
|
||||
xdotool mouseup 3
|
||||
sleep 0.010
|
||||
done
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
options="No\nNo\nNo\nNo\nNo\nYes"
|
||||
|
||||
selected=$(echo -e $options | rofi -p "$1" -mesg "Are you sure you want to run \"$2\"?" -dmenu -theme appsmenu)
|
||||
|
||||
case $selected in
|
||||
"Yes")
|
||||
$2
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cat | xargs -I '%' curl '%' -o /tmp/mpris-thumb 2>&1 | echo "/tmp/mpris-thumb"
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
TOTALS=`git log --shortstat --author=$author | grep -E "fil(e|es) changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print files, " ", inserted, " ", deleted }'`
|
||||
|
||||
TOTAL_INSERTS=`echo $TOTALS | cut -d' ' -f2`
|
||||
TOTAL_DELETES=`echo $TOTALS | cut -d' ' -f3`
|
||||
|
||||
TOTAL_TOTAL=$(( $TOTAL_INSERTS + $TOTAL_DELETES ))
|
||||
|
||||
|
||||
IFS="
|
||||
"
|
||||
|
||||
for author in `git log --format='%aN' | sort -u`; do
|
||||
echo $author":"
|
||||
USER=`git log --shortstat --author=$author | grep -E "fil(e|es) changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print files, " ", inserted, " ", deleted }'`
|
||||
IFS=" "
|
||||
USER_INSERTS=`echo $USER | cut -d' ' -f2`
|
||||
USER_DELETES=`echo $USER | cut -d' ' -f3`
|
||||
USER_TOTAL=`bc <<< "$USER_INSERTS + $USER_DELETES"`
|
||||
|
||||
PERC_INSERTS=`bc <<< $USER_INSERTS"* 100 /"$TOTAL_INSERTS`
|
||||
PERC_DELETES=`bc <<< $USER_DELETES"* 100 /"$TOTAL_DELETES`
|
||||
PERC_TOTAL=`bc <<< $USER_TOTAL"* 100 /"$TOTAL_TOTAL`
|
||||
|
||||
echo " TOTAL: $USER_TOTAL ($PERC_TOTAL%)"
|
||||
echo " INSERTS: $USER_INSERTS ($PERC_INSERTS%)"
|
||||
echo " DELETES: $USER_DELETES ($PERC_DELETES%)"
|
||||
|
||||
IFS="
|
||||
"
|
||||
done
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
TEMPLATE_DIR="$HOME/Templates/src"
|
||||
|
||||
src=`ls "$TEMPLATE_DIR" | fzf --preview="$HOME/.dots/scripts/template_preview $TEMPLATE_DIR/{}"`
|
||||
|
||||
if [ -n "$src" ]; then
|
||||
read -p "File name: " name
|
||||
if [ -n "$name" ]; then
|
||||
cp "$TEMPLATE_DIR/$src" "$name" -r
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
echo "Looking up playlist name..."
|
||||
pl_line=$(yt-dlp --flat-playlist "$1" | grep "\[download\] Downloading playlist: ")
|
||||
pl_name=$(echo ${pl_line:33} | tr '/' ' ')
|
||||
|
||||
echo "Found playlist by name: $pl_name"
|
||||
echo "Downloading it into directory: $pl_name"
|
||||
|
||||
mkdir "$pl_name"
|
||||
cd "$pl_name"
|
||||
yt-dlp --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" "$1"
|
||||
cd ../
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
options="Shutdown\nReboot\nLogout"
|
||||
|
||||
selected=$(echo -e $options | rofi -p Power -dmenu -theme appsmenu)
|
||||
|
||||
case $selected in
|
||||
"Shutdown")
|
||||
confirm-menu "Shutdown?" "poweroff"
|
||||
;;
|
||||
"Reboot")
|
||||
confirm-menu "Reboot?" "reboot"
|
||||
;;
|
||||
"Logout")
|
||||
confirm-menu "Logout?" "i3-msg exit"
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
bat -pf "`project path "$1"`"/README.md
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
USER=$(logname)
|
||||
|
||||
if [ -f "/tmp/$USER.screen-share" ]; then
|
||||
screen -S "Screen Share" -X quit
|
||||
rm "/tmp/$USER.screen-share"
|
||||
else
|
||||
screen -dmS "Screen Share" ffmpeg -f x11grab -video_size 1920x1080 -i :0+0,1050 -pix_fmt yuv420p -r 30 -f v4l2 /dev/video9
|
||||
touch "/tmp/$USER.screen-share"
|
||||
fi
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/python
|
||||
import math
|
||||
|
||||
parts = input("First point? ").split(" ")
|
||||
x1,z1,a1 = float(parts[6]),float(parts[8]),float(parts[9])
|
||||
if a1 >= 90:
|
||||
a1 = 180 - a1+90
|
||||
else:
|
||||
a1 = -1 * (a1+90)
|
||||
|
||||
s1 = -1 * math.tan(math.radians(a1))
|
||||
i1 = z1 - s1 * x1
|
||||
|
||||
parts = input("Second point? ").split(" ")
|
||||
x2,z2,a2 = float(parts[6]),float(parts[8]),float(parts[9])
|
||||
|
||||
if a2 >= 90:
|
||||
a2 = 180 - a2+90
|
||||
else:
|
||||
a2 = -1 * (a2+90)
|
||||
|
||||
s2 = -1 * math.tan(math.radians(a2))
|
||||
i2 = z2 - s2 * x2
|
||||
|
||||
|
||||
x3 = (i2 - i1) / (s1 - s2)
|
||||
z3 = s1 * x3 + i1
|
||||
|
||||
print(f"Stronghold at: {round(x3)}, {round(z3)}")
|
||||
print(f"In nether: {round(x3/8)}, {round(z3/8)}")
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
STARTTIME=$(date +%s.%3N)
|
||||
echo "End timing with ctrl-c."
|
||||
while true; do
|
||||
DUR=$(printf "%.3f" $(bc <<< $(date +%s.%3N)-$STARTTIME))
|
||||
printf "\r%s " $(date +%T.%3N -u -d "@${DUR}")
|
||||
done
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
krunner -d
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
obs --startreplaybuffer --minimize-to-tray
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
file="$TEMPLATE_DIR/$1"
|
||||
if [ -d "$file" ]; then
|
||||
tree -C "$file"
|
||||
else
|
||||
bat -pf "$file"
|
||||
fi
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
hours=$(echo -e "0\n1\n2\n3\n4\n5\n6" | rofi -dmenu -theme appsmenu)
|
||||
|
||||
if [ -z $hours ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
minutes=$(echo -e "0\n5\n10\n15\n30\n45" | rofi -dmenu -theme appsmenu)
|
||||
|
||||
if [ -z $minutes ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
seconds=$(echo -e "0\n10\n15\n30\n45" | rofi -dmenu -theme appsmenu)
|
||||
|
||||
if [ -z $seconds ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
timer $hours $minutes $seconds &
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
|
||||
export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/
|
||||
|
||||
SCREEN_SHARE_OPTION="Start screen share"
|
||||
if [ -f "/tmp/$USER.screen-share" ]; then
|
||||
SCREEN_SHARE_OPTION="Stop screen share"
|
||||
fi
|
||||
WEBCAM_OPTION="Start good webcam"
|
||||
if [ -f "/tmp/$USER.webcam" ]; then
|
||||
WEBCAM_OPTION="Stop good webcam"
|
||||
fi
|
||||
DUNST_PAUSE_OPTION="Pause dunst notifications"
|
||||
if [[ $(dunstctl is-paused) == "true" ]]; then
|
||||
DUNST_PAUSE_OPTION="Resume dunst notifications"
|
||||
fi
|
||||
|
||||
options="Power menu\nTimer\n$SCREEN_SHARE_OPTION\n$WEBCAM_OPTION\n$DUNST_PAUSE_OPTION"
|
||||
|
||||
selected=$(echo -e $options | rofi -p Utility -dmenu -theme appsmenu)
|
||||
|
||||
case $selected in
|
||||
"Timer")
|
||||
timer-launcher
|
||||
;;
|
||||
"$SCREEN_SHARE_OPTION")
|
||||
screen-share-toggle
|
||||
;;
|
||||
"$WEBCAM_OPTION")
|
||||
webcam-toggle
|
||||
;;
|
||||
"Power menu")
|
||||
power-menu
|
||||
;;
|
||||
"$DUNST_PAUSE_OPTION")
|
||||
dunstctl set-paused toggle
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
xsetwacom --set "Wacom Intuos3 6x8 Pad pad" MapToOutput HEAD-0
|
||||
xsetwacom --set "Wacom Intuos3 6x8 Pen stylus" MapToOutput HEAD-0
|
||||
xsetwacom --set "Wacom Intuos3 6x8 Pen eraser" MapToOutput HEAD-0
|
||||
xsetwacom --set "Wacom Intuos3 6x8 Pen cursor" MapToOutput HEAD-0
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
USER=$(logname)
|
||||
|
||||
if [ -f "/tmp/$USER.webcam" ]; then
|
||||
screen -S "Webcam" -X quit
|
||||
rm "/tmp/$USER.webcam"
|
||||
else
|
||||
screen -dmS "Webcam" ffmpeg -video_size 1920x1080 -framerate 30 -c:v mjpeg -i /dev/video0 -c:v mjpeg -vf lenscorrection=k1=-0.1:k2=-0.05 -f v4l2 /dev/video8
|
||||
touch "/tmp/$USER.webcam"
|
||||
fi
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
options="Close\nToggle floating\nToggle sticky\nToggle fullscreen"
|
||||
|
||||
selected=$(echo -e $options | rofi -p Window -dmenu -theme appsmenu)
|
||||
|
||||
case $selected in
|
||||
"Close")
|
||||
i3-msg "kill"
|
||||
;;
|
||||
"Toggle floating")
|
||||
i3-msg "floating toggle"
|
||||
;;
|
||||
"Toggle sticky")
|
||||
i3-msg "sticky toggle"
|
||||
;;
|
||||
"Toggle fullscreen")
|
||||
i3-msg "fullscreen toggle"
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
cd $(dirname $0)
|
||||
|
||||
DOTS_DIR=$(pwd)
|
||||
|
||||
function link_config {
|
||||
NAME="$1"
|
||||
TARGET="$2"
|
||||
FROM="$DOTS_DIR/$3"
|
||||
if [ -d "$TARGET" ]; then
|
||||
echo "[$NAME] Configuration directory exists. Skipping."
|
||||
else
|
||||
ln -s "$FROM" "$TARGET"
|
||||
fi
|
||||
}
|
||||
|
||||
link_config "Dunst" "$HOME/.config/dunst" "dunst"
|
||||
link_config "Kitty" "$HOME/.config/kitty" "kitty"
|
||||
link_config "Eww" "$HOME/.config/eww" "eww"
|
||||
|
||||
# Neovim
|
||||
NVIM_DIR="$HOME/.config/nvim"
|
||||
|
||||
# Check if the NVIM directory exists. If it does we skip this part of the script and inform the user.
|
||||
if [ -d $NVIM_DIR ]; then
|
||||
echo "[NVIM] Configuration directory exists. Skipping."
|
||||
else
|
||||
# Symlink the config.
|
||||
ln -s $DOTS_DIR/nvim $NVIM_DIR
|
||||
|
||||
# Bootstrap the plugins
|
||||
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
||||
fi
|
||||
|
||||
# Scripts
|
||||
SCRIPT_DIR="$HOME/bin/scripts"
|
||||
|
||||
# Check if the scripts directory exists. If it does we skip this part of the script and inform the user.
|
||||
if [ -d $SCRIPT_DIR ]; then
|
||||
echo "[SCRIPTS] Configuration directory exists. Skipping."
|
||||
else
|
||||
mkdir "$HOME/bin"
|
||||
ln -s $DOTS_DIR/scripts $SCRIPT_DIR
|
||||
fi
|
||||
|
||||
# Templates
|
||||
TEMPLATE_DIR="$HOME/Templates"
|
||||
|
||||
rmdir "$TEMPLATE_DIR"
|
||||
ln -s "$DOTS_DIR/Templates" "$TEMPLATE_DIR"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "Latex Test: '$1'"
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
BASE_DIR=`dirname "$0"`
|
||||
|
||||
TO_CREATE=`ls "$BASE_DIR"/scripts | fzf`
|
||||
|
||||
read -p "Directory [.]: " WHERE
|
||||
WHERE=${WHERE:-.}
|
||||
|
||||
mkdir -p "$WHERE"
|
||||
|
||||
"$BASE_DIR/scripts/$TO_CREATE" "$WHERE"
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
{ inputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
baseIndex = 1;
|
||||
escapeTime = 20;
|
||||
terminal = "tmux-256color";
|
||||
historyLimit = 100000;
|
||||
plugins = with pkgs.tmuxPlugins;
|
||||
[
|
||||
better-mouse-mode
|
||||
catppuccin
|
||||
];
|
||||
extraConfig = ''
|
||||
# Use catppuccin-mocha theme.
|
||||
set -g @catppuccin_flavour 'mocha'
|
||||
# Other catppuccin settigns.
|
||||
set -g @catppuccin_window_default_text "#{window_name}"
|
||||
|
||||
# Don't leave gaps inDon't leave gaps in window numbers.
|
||||
set -g renumber-windows on
|
||||
|
||||
# Vim keys for pane navigation.
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue