update sway and waybar configuration, hanve around guix packages

This commit is contained in:
Freya Murphy 2023-09-29 10:36:21 -04:00
parent 0e7f944b53
commit 2cb639b95f
No known key found for this signature in database
GPG key ID: 988032A5638EE799
38 changed files with 123 additions and 189 deletions

View file

@ -3,7 +3,7 @@
(url "https://git.savannah.gnu.org/git/guix.git")
(branch "master")
(commit
"e5f7c14ef6c951f02ca710fad1869db3aedff4b5")
"c4886c0cb608e1b36969f195eb2f7ea25a37ac89")
(introduction
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
@ -14,7 +14,7 @@
(url "https://gitlab.com/nonguix/nonguix")
(branch "master")
(commit
"e951cda078529d238f1bc942db1112f76a01a5f7")
"61279f68f2b617ab868a094db856188602fc880b")
(introduction
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"

View file

@ -6,7 +6,6 @@
(use-modules (gnu home)
(gnu packages)
(gnu packages gcc)
(gnu packages gnupg)
(gnu packages virtualization)
(gnu services)
@ -18,8 +17,8 @@
(gnu home services)
(home-services pipewire)
(home-packages mozillia)
(home-packages web)
(home-packages vim)
(home-packages gcc)
(home-packages audio))
@ -28,13 +27,14 @@
;; Home profile, unser ~/.guix-home/profile.
(packages (append (specifications->packages (list "xdg-utils"
"mako"
"vscodium"
"i3-autotiling"
"wofi"
"qrencode"
"sassc"
"binutils"
;"gcc-toolchain"
"clang-toolchain"
"racket"
"libreoffice"
"gnupg"
"pavucontrol"
@ -68,13 +68,22 @@
"ripgrep"
"fd"
"nasm"
"wine-staging"
"winetricks"
"steam"
"node"
"ncurses"
"jq"
"rust"
"gcc-toolchain"
"firefox-wayland"
"openssl"
"pkg-config"
"gnunet"
"tree-sitter-cli"
"python-pynvim"))
(list neovim-new easyeffects firefox-wayland-new gcc-new)))
(list neovim-new easyeffects firefox-wayland-new)))
;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal.
@ -87,7 +96,7 @@
(service home-xdg-configuration-files-service-type
`(("nvim/init.vim" ,(local-file "nvim/init.vim"))
("sway" ,(local-file "sway" #:recursive? #t))
("waybar" ,(local-file "waybar" #:recursive? #t))
;("waybar" ,(local-file "waybar" #:recursive? #t))
("alacritty" ,(local-file "alacritty" #:recursive? #t))
("lvim" ,(local-file "lvim" #:recursive? #t))
("mako" ,(local-file "mako" #:recursive? #t))

View file

@ -21,11 +21,15 @@
starship
discord
thunderbirdPackages.thunderbird-115
slack
cryptomator
pcem
#steam
# Rust
rustup
glibc
gcc-unwrapped
openssl
# Java
jdk

View file

@ -21,6 +21,11 @@ Host nitron
Hostname nitron.cs.rit.edu
User tam2214
Host github.com
Hostname github.com
User tam2214
IdentityFile /home/tylerm/.ssh/id_rit
Host *
KexAlgorithms -sntrup761x25519-sha512@openssh.com

View file

@ -14,12 +14,13 @@ set $menu wofi --allow-images --show=drun --prompt "Search Program"
set $scale 1.5
# Set background
set $bg ~/.config/sway/nya0.png
set $bg ~/.config/sway/wallpapers/blue.jpg
# Set Efects
set $radius 5
set $gaps 10
set $radius 0
set $shadows on
set $shadow_blur 50
set $shadow_blur 15
set $blur enable
set $blur_radius 4
set $blur_passes 2
@ -28,7 +29,7 @@ set $blur_passes 2
set $browser firefox
# Autostart apps
exec $HOME/.config/sway/auto.sh
exec $HOME/.config/sway/scripts.d/auto.sh
# Local configs
include $HOME/.config/sway/config.d/*

View file

@ -1,5 +1,5 @@
# Turn off display after tiemout
exec swayidle -w \
timeout 300 '~/.config/sway/lock.sh' \
timeout 300 'swaylock -f -c 14171d' \
timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep '~/.config/sway/lock.sh'
before-sleep 'swaylock -f -c 14171d'

View file

@ -19,7 +19,7 @@ bindsym $mod+Shift+l exec $lock
bindsym Ctrl+Alt+Delete exec killall sway
# Power menu
bindsym $mod+L exec killall wlogout || wlogout --css ~/.config/sway/power/style.css -l ~/.config/sway/power/layout
bindsym $mod+L exec killall wlogout || wlogout --css ~/.config/sway/logout.d/power/style.css -l ~/.config/sway/logout.d/power/layout
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.

View file

@ -10,5 +10,5 @@ bindsym $mod+minus scratchpad show
for_window [app_id="scratch_term"] move scratchpad, resize set 960 640
for_window [app_id="scratch_htop"] move scratchpad, resize set 960 640
bindsym $mod+y exec ~/.config/sway/scratchpads.sh scratch_term zsh
bindsym $mod+h exec ~/.config/sway/scratchpads.sh scratch_htop htop
bindsym $mod+y exec ~/.config/sway/scripts.d/scratchpads.sh scratch_term zsh
bindsym $mod+h exec ~/.config/sway/scripts.d/scratchpads.sh scratch_htop htop

View file

@ -1,5 +1,5 @@
### Set borders
gaps inner 10
gaps inner $gaps
for_window [class="^.*"] border pixel 2
default_border pixel 2
default_floating_border pixel 2
@ -21,9 +21,12 @@ smart_corner_radius $radius
shadows $shadows
shadows_on_csd $shadows
shadow_blur_radius $shadow_blur
shadow_color #14171dff
blur $blur
blur_radius $blur_radius
blur_passes $blur_passes
layer_effects "waybar" blur enable; shadows enable
layer_effects "wofi" blur enable; shadows enable
### Output configuration
output * bg $bg fill

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
swaylock --indicator --clock -i ~/.config/sway/nya0.png --effect-blur 10x5

View file

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View file

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 6 KiB

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

@ -1,6 +1,6 @@
{
"label" : "lock",
"action" : "~/.config/sway/lock.sh",
"action" : "swaylock -f -c 14171d",
"text" : "Lock",
"keybind" : "l"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

Before

Width:  |  Height:  |  Size: 45 MiB

After

Width:  |  Height:  |  Size: 45 MiB

View file

@ -7,8 +7,6 @@
],
"modules-center": [],
"modules-right": [
"custom/cmus",
"custom/newsboat",
"cpu",
"memory",
"temperature",
@ -28,22 +26,27 @@
"spacing": 10
},
"clock": {
"format": "{:%Y-%m-%d %a %H:%M}"
"interval": 1,
"format": "{:%Y-%m-%d %a %H:%M:%S}"
},
"cpu": {
"interval": 1,
"format": " {usage}%",
"tooltip": false
},
"memory": {
"interval": 1,
"format": " {}%",
"tooltip": false
},
"temperature": {
"interval": 1,
"thermal-zone": 1,
"critical-threshold": 80,
"format": " {temperatureC}°"
},
"battery": {
"interval": 1,
"states": {
"warning": 30,
"critical": 15
@ -73,14 +76,5 @@
"format-disconnected": " disconnected",
"max-length": 50,
"on-click": "nm-connection-editor",
},
"custom/cmus": {
"return-type": "json",
"exec": "$HOME/.config/waybar/custom_cmus.lua 2> /dev/null"
},
"custom/newsboat": {
"format": " {}",
"exec": "$HOME/.config/waybar/custom_newsboat.sh 2> /dev/null",
"on-click": "alacritty -e newsboat -r"
}
}

View file

@ -1,58 +0,0 @@
#!/usr/bin/env lua
json = require("dkjson")
posix = require("posix")
function htmlescape(s)
s = string.gsub(s, "&", "&")
s = string.gsub(s, "<", "&lt;")
s = string.gsub(s, ">", "&gt;")
return s
end
function timefmt(n)
local s = n % 60
local m = math.floor(n / 60)
return string.format("%d:%02d", m, s)
end
function output(text, tooltip)
text = htmlescape(text)
tooltip = htmlescape(tooltip)
print(json.encode{text=text, tooltip=tooltip, class="custom-cmus"})
end
function getstat(status, name)
for _, line in ipairs(status) do
if string.match(line, "^" .. name) then
return string.sub(line, string.len(name)+2)
end
end
end
while true do
local pipe = io.popen("cmus-remote -Q")
local status = {}
for line in pipe:lines() do
table.insert(status, line)
end
local success = pipe:close()
if not success then
output(" Not running", "Not running")
elseif getstat(status, "status") == "stopped" then
output(" Not running", "Not running")
else
local playing = getstat(status, "status")
local symbol = ({playing="", paused=""})[playing]
local title = getstat(status, "tag title")
local artist = getstat(status, "tag artist")
local duration = getstat(status, "duration")
local position = getstat(status, "position")
local text = string.format("%s %s (%s)", symbol, title, timefmt(position))
local tooltip = string.format("%s - %s (%s / %s)",
artist, title, timefmt(position), timefmt(duration)
)
output(text, tooltip)
end
posix.sleep(1)
end

View file

@ -1,12 +0,0 @@
#!/bin/sh
while :; do
until newsboat -x reload >/dev/null; do
sleep 1;
done
until unread="$(newsboat -x print-unread)"; do
sleep 1;
done
echo "$unread" | awk '{ print $1 }'
sleep 300
done

View file

@ -30,7 +30,6 @@ button {
}
#workspaces button {
padding: 0 5px;
color: #c7c6c3;
background-color: rgba(0, 0, 0, 0);
}

View file

@ -1,6 +0,0 @@
key_expand=Tab
term=alacritty
matching=multi-contains
insensitive=true
gtk_dark=true
hide_scroll=true

View file

@ -1,54 +0,0 @@
window {
margin: 0px;
/*border: 1px solid #79b5b3;*/
background-color: #1d1b2b;
border-radius: 5px;
}
#input {
margin: 5px;
border: none;
color: #d5d8ed;
border-radius: 5px;
background-color: #44475a;
}
#input:selected {
border: inherit;
}
#inner-box {
margin: 5px;
border: none;
background-color: inherit;
}
#outer-box {
margin: 5px;
border: none;
background-color: inherit;
}
#scroll {
margin: 0px;
border: none;
}
#text {
margin: 5px;
border: none;
color: #d5d8ed;
}
#img {
background-color: transparent;
}
#entry {
border: none;
}
#entry:selected {
background-color: #44475a;
border-radius: 5px;
}

View file

@ -58,3 +58,6 @@ x-scheme-handler/webcals=userapp-Thunderbird-9WQSA2.desktop;
x-scheme-handler/mailto=userapp-Thunderbird-E9G491.desktop
message/rfc822=userapp-Thunderbird-E9G491.desktop
x-scheme-handler/mid=userapp-Thunderbird-E9G491.desktop
x-scheme-handler/discord=discord.desktop;
x-scheme-handler/slack=slack.desktop;

View file

@ -14,6 +14,8 @@ then
return
fi
PATH=$PATH:$HOME/.cargo/bin
# vim mode >:)
# no ryan i am not copying you
set -o vi
@ -33,9 +35,6 @@ alias config="/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME"
alias ls="ls --color=auto"
alias su="doas -s"
# Make sure cargo is working with nix packages
alias cargo="CC=$NIX_PROFILE/bin/gcc $NIX_PROFILE/bin/cargo"
# Have manpages use colors
man() {
env \

View file

@ -6,12 +6,15 @@
#:use-module (gnu packages avahi)
#:use-module (gnu packages shells)
#:use-module (gnu packages tls)
#:use-module (gnu packages gcc)
#:use-module (gnu packages vpn)
#:use-module (gnu packages security-token)
#:use-module (gnu packages virtualization)
#:use-module (guix packages)
#:use-module (nongnu packages linux)
#:use-module (srfi srfi-1)
#:use-module (gnu services)
#:use-module (gnu services linux)
#:use-module (gnu services authentication)
#:use-module (gnu services security-token)
#:use-module (gnu services cups)
#:use-module (gnu services desktop)
@ -23,7 +26,6 @@
#:use-module (gnu services docker)
#:use-module (gnu services avahi)
#:use-module (gnu services spice)
#:use-module (gnu services authentication)
#:use-module (gnu services virtualization)
#:use-module (home-packages wm)
#:use-module (home-packages virtualization))
@ -50,7 +52,7 @@
(locale "en_US.utf8")
(timezone "America/New_York")
(keyboard-layout (keyboard-layout "us"))
(host-name "ThisWillChange")
(host-name "ThisWillChange")
;; The list of user accounts ('root' is implicit).
(users (cons* (user-account
@ -88,6 +90,7 @@
"bluez"
"blueman"
"opendoas"
"wireguard-tools"
"xdg-desktop-portal"
"xdg-desktop-portal-wlr"
"v4l2loopback-linux-module"
@ -111,6 +114,12 @@
"vulkan-headers"
"spirv-tools"
"spirv-headers"
"sdl2"
"openal"
"freealut"
"wxwidgets"
"libpcap"
"v4l2loopback-linux-module"
"neovim"))
(list swaylock-effects-new virt-manager-new)
%my-base-packages))
@ -124,6 +133,9 @@
(service openssh-service-type)
(service pcscd-service-type)
(service spice-vdagent-service-type)
(simple-service 'wireguard-module
kernel-module-loader-service-type
'("wireguard"))
(service cups-service-type
(cups-configuration
(web-interface? #t)))
@ -143,11 +155,6 @@
(service bluetooth-service-type)
(service pam-limits-service-type)
(service fprintd-service-type)
;; (service special-files-service-type
;; `(("/lib64" ,(directory-union "rustup-libs"
;; (list
;; (file-append glibc "/lib")
;; (file-append gcc "/lib"))))))
(udev-rules-service 'fido2 libfido2 #:groups '("plugdev")))
;; This is the default list of services we

View file

@ -1,12 +0,0 @@
(define-module (home-packages gcc)
#:use-module (gnu)
#:use-module (guix packages)
#:use-module (gnu packages gcc))
(define-public gcc-new
(package
(inherit gcc)
(name "gcc-new")
(outputs (package-outputs gcc))))

View file

@ -0,0 +1,49 @@
(define-module (home-packages web)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (gnu packages base)
#:use-module (gnu packages version-control)
#:use-module (gnu packages golang)
#:use-module (gnu packages)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix download)
#:use-module (guix build-system go)
#:use-module (guix build-system trivial)
#:use-module (guix utils))
(define-public caddy
(package
(name "caddy")
(version "2.7.4")
;; (source (origin
;; (method url-fetch)
;; (uri (string-append "https://github.com/caddyserver/caddy/archive/refs/tags/v" version
;; ".tar.gz"))
;; (sha256
;; (base32
;; "0ccwwas8kagvg0hb0qbr2yvhrf8aiyg66cn95japbqpvv70qgxlp"))))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/caddyserver/caddy")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0jgbkj0azkbs828vsd3gycpab8pycgf55vrxkvnfmwfjpdiq1551"))))
; (native-inputs `(("git" ,git)
; ("sed" ,sed)))
;; (build-system trivial-build-system)
(build-system go-build-system)
(arguments (list
#:import-path "cmd"
;; #:unpack-path "github.com/caddyserver/caddy/cmd/caddy"
#:install-source? #f
#:tests? #f))
(synopsis "A powerful, enterprise-ready, open source web server with automatic HTTPS written in Go ")
(description "Caddy simplifies your infrastructure. It takes care of TLS certificate renewals, OCSP stapling, static file serving, reverse proxying, Kubernetes ingress, and more.
Its modular architecture means you can do more with a single, static binary that compiles for any platform.
Caddy runs great in containers because it has no dependenciesnot even libc. Run Caddy practically anywhere.")
(home-page "https://caddyserver.com/")
(license license:asl2.0)))

View file

@ -5,6 +5,12 @@
(inherit base-operating-system)
(host-name "shinji")
(kernel-arguments (append (list "intel_iommu=on")
%default-kernel-arguments))
(initrd-modules (cons* "vfio_pci" "vfio" "vfio_iommu_type1"
%base-initrd-modules))
(mapped-devices (list (mapped-device
(source (uuid
"5c5dcb22-62b1-41af-9116-b8fdfba83ca2"))