Compare commits

...

3 Commits

Author SHA1 Message Date
a01c4c4df8 home/natto/yuck: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-27 21:38:53 +05:30
c87410b1aa enable iwd
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-27 07:02:30 +05:30
a4173c855e home/natto: misc changes
add mpdris
change emacs package
hyprland keybind changes
random changes to home.packages

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-27 07:01:54 +05:30
29 changed files with 799 additions and 172 deletions

2
.gitattributes vendored
View File

@@ -1 +1,3 @@
flake.lock linguist-generated
*.yuck linguist-language=lisp
**/emacs/config.org linguist-language=elisp

64
flake.lock generated
View File

@@ -154,7 +154,9 @@
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs_2",
"nixpkgs": [
"nixpkgs"
],
"wlroots": "wlroots",
"xdph": "xdph"
},
@@ -172,6 +174,26 @@
"type": "github"
}
},
"hyprland-contrib": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1672071700,
"narHash": "sha256-Z0pbBVtijv4xbL42rPzMoYFSOqALFRYDMN9iOumSEso=",
"owner": "hyprwm",
"repo": "contrib",
"rev": "37c8121f98d76f57caa00dd7106877876e0d7483",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "contrib",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
@@ -332,22 +354,6 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1673540789,
"narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1674236650,
"narHash": "sha256-B4GKL1YdJnII6DQNNJ4wDW1ySJVx2suB1h/v4Ql8J0Q=",
@@ -363,7 +369,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_3": {
"locked": {
"lastModified": 1671983799,
"narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=",
@@ -383,7 +389,7 @@
"inputs": {
"flake-compat": "flake-compat_2",
"neovim-flake": "neovim-flake",
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1674288814,
@@ -405,12 +411,14 @@
"flake-parts": "flake-parts",
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprland-contrib": "hyprland-contrib",
"mailserver": "mailserver",
"nbfc": "nbfc",
"nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_2",
"nvim-overlay": "nvim-overlay",
"rust-overlay": "rust-overlay",
"stable": "stable",
"webcord": "webcord"
}
},
@@ -435,6 +443,22 @@
"type": "github"
}
},
"stable": {
"locked": {
"lastModified": 1674638707,
"narHash": "sha256-yGYxlb5jPAiuvzCZ4MQAfPqp8DxfgkFEoBzYPhQxX4Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d278b8c3f6b9fd9604fd0b7ddb3bf29f1cbaea39",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,

View File

@@ -3,6 +3,7 @@
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
stable.url = github:nixos/nixpkgs/release-22.11;
flake-parts.url = github:hercules-ci/flake-parts;
home-manager = {
url = github:nix-community/home-manager;
@@ -29,7 +30,14 @@
url = github:nix-community/neovim-nightly-overlay;
inputs.nixpkgs.url = github:nixos/nixpkgs?rev=fad51abd42ca17a60fc1d4cb9382e2d79ae31836;
};
hyprland.url = github:hyprwm/Hyprland;
hyprland = {
url = github:hyprwm/Hyprland;
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-contrib = {
url = github:hyprwm/contrib;
inputs.nixpkgs.follows = "nixpkgs";
};
webcord.url = github:huantianad/nixpkgs/webcord;
};

View File

@@ -236,6 +236,8 @@ For autocomplete
(use-package rustic)
(use-package yuck-mode)
(use-package wgsl-mode)
(use-package nix-mode

View File

@@ -64,17 +64,21 @@ gestures {
workspace_swipe = off
}
windowrule=float, ^.*(iwgtk)$
$mainMod=SUPER
binde=$mainMod, RETURN, exec, foot
bindr=SUPER, D, exec, pkill tofi || tofi-drun | xargs hyprctl dispatch exec --
bindr=SUPER SHIFT, D, exec, pkill tofi || tofi-run --require-match=false | xargs hyprctl dispatch exec
bindr=SUPER SHIFT, D, exec, pkill tofi || tofi-run --require-match=false | xargs hyprctl dispatch exec --
bind=$mainMod, P, exec, mpc toggle
bind=, XF86AudioNext, exec, mpc seek +00:00:05
bind=, XF86AudioPrev, exec, mpc seek -00:00:05
bind=$mainMod, XF86AudioNext, exec, mpc next
bind=$mainMod, XF86AudioPrev, exec, mpc prev
bind=$mainMod, P, exec, playerctl play-pause
bind=, XF86AudioPlay, exec, playerctl play-pause
bind=, XF86AudioNext, exec, playerctl position 5+
bind=, XF86AudioPrev, exec, playerctl position 5-
bind=$mainMod, XF86AudioNext, exec, playerctl next
bind=$mainMod, XF86AudioPrev, exec, playerctl previous
binde=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
binde=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bind=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
@@ -88,6 +92,9 @@ bind=$mainMod SHIFT, F3, exec, setxkbmap in deva
bind=$mainMod SHIFT, F4, exec, setxkbmap in guru
bind=$mainMod SHIFT, F5, exec, setxkbmap colemak dhz
bind=, PRINT, exec, grimblast --notify copysave screen
bind=SHIFT, PRINT, exec, grimblast --notify copysave area
binde=$mainMod SHIFT, Q, killactive,
bind=$mainMod ALT, f, exit,
bind=$mainMod SHIFT, t, pseudo,

View File

@@ -70,22 +70,22 @@ myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
spawn "flameshot gui -d 10000")
, ((modMask, xK_p),
spawn "mpc toggle")
spawn "playerctl play-pause")
, ((0, xF86XK_AudioPlay),
spawn "mpc toggle")
spawn "playerctl play-pause")
, ((modMask, xF86XK_AudioNext),
spawn "mpc next")
spawn "playerctl next")
, ((modMask, xF86XK_AudioPrev),
spawn "mpc prev")
spawn "playerctl previous")
, ((0, xF86XK_AudioPrev),
spawn "mpc seek -00:00:05")
spawn "playerctl position 5-")
, ((0, xF86XK_AudioNext),
spawn "mpc seek +00:00:05")
spawn "playerctl position 5+")
, ((0, xF86XK_AudioRaiseVolume),
spawn "pamixer --allow-boost -ui 5")

View File

@@ -9,6 +9,7 @@
imports = [
./email.nix
./programs.nix
./eww
# ./xsession.nix :(
./wayland.nix
./pkgs.nix

View File

@@ -3,7 +3,7 @@ let
mymacs = config: # with inputs.emacs-overlay.packages.${pkgs.system}; already resolved with overlay
with pkgs; emacsWithPackagesFromUsePackage {
inherit config;
package = emacsGit;
package = emacsPgtk;
alwaysEnsure = true;
alwaysTangle = true;
extraEmacsPackages = epkgs: with epkgs; [

271
home/natto/eww/bar/bar.scss Normal file
View File

@@ -0,0 +1,271 @@
$rosewater: #F5E0DC;
$flamingo: #F2CDCD;
$pink: #F5C2E7;
$mauve: #CBA6F7;
$red: #F38BA8;
$maroon: #EBA0AC;
$peach: #FAB387;
$yellow: #F9E2AF;
$green: #A6E3A1;
$teal: #94E2D5;
$sky: #89DCEB;
$sapphire: #74C7EC;
$blue: #89B4FA;
$lavender: #B4BEFE;
$text: #CDD6F4;
$subtext1: #BAC2DE;
$subtext0: #A6ADC8;
$overlay2: #9399B2;
$overlay1: #7F849C;
$overlay0: #6C7086;
$surface2: #585B70;
$surface1: #45475A;
$surface0: #313244;
$base: #1E1E2E;
$mantle: #181825;
$crust: #11111B;
$background: $base;
$foreground: $text;
* {
all: unset;
}
tooltip {
background: $background;
border: 1px solid $pink;
border-radius: 2px;
label {
padding: 5px;
}
}
@mixin color-shadow($color, $opacity: 0.08, $on-hover: 1) {
color: $color;
@if $on-hover == 0 {
box-shadow: 0 0 0 9999px rgba($color, $opacity) inset;
} @else {
&:hover {
box-shadow: 0 0 0 9999px rgba($color, $opacity) inset;
}
}
}
.bar, .music-large {
font-family: "Fira Mono";
background: $background;
button:hover {
transition: 0.15s;
}
scale trough, circular-progress {
background: $surface1;
}
}
.workspaces {
font-size: 16px;
font-family: "Lohit Devanagari";
button {
background: none;
}
.workspace-active {
@include color-shadow($mauve, $on-hover: 0);
font-size: 20px;
}
.workspace-inactive {
@include color-shadow($flamingo);
}
}
.music {
button {
background: none;
padding: 0 10px;
}
.music-control {
@include color-shadow($mauve);
font-family: "Font Awesome 6 Free";
font-size: 18px;
}
.music-title {
@include color-shadow($sapphire);
font-size: 16px;
}
}
.music-large {
border: solid 3px $sapphire;
color: $mauve;
border-radius: 5px;
.music-large-cover {
background-size: cover;
background-position: center;
border-radius: 5px;
margin: 15px 0 15px 15px;
min-height: 200px;
min-width: 200px;
}
.music-large-controls {
margin: 15px;
scale trough {
min-height: 5px;
margin: 0 15px;
highlight {
background-image: linear-gradient(to right, $sapphire, $teal);
}
slider {
border-radius: 4px;
background: $background;
border: 2px $mauve solid;
margin: -10px -10px;
transition: 0.2s;
&:hover {
box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1);
}
&:active {
box-shadow: 0 0 0 1px inset, 0 0 0 8px rgba(255, 255, 255, 0.1);
}
}
}
.music-large-artist {
font-size: 18px;
color: $mauve;
}
.music-large-album {
font-size: 16px;
color: $sapphire;
}
}
}
.system {
button {
background: none;
font-size: 20px;
padding: 0 10px;
}
.system-scale {
min-width: 100px;
}
scale trough {
min-height: 20px;
min-width: 120px;
border-radius: 3px;
highlight {
all: unset;
border-radius: 3px;
}
slider {
all:unset;
border: none;
min-width: 0;
min-height: 0;
}
}
.system-sound {
button {
@include color-shadow($green);
padding-right: 5px;
}
scale trough highlight {
background-color: $green;
}
}
.system-bright {
button {
@include color-shadow($yellow);
}
scale trough highlight {
background-color: $yellow;
}
}
.system-temp {
button {
@include color-shadow($red);
}
}
.system-net {
button {
@include color-shadow($mauve);
}
}
.system-separator {
min-width: 5px;
background-color: $sapphire;
}
.system-metrics {
transition: 0.2s;
label {
padding: 0 5px;
font-size: 20px;
}
circular-progress {
margin: 0 5px;
}
.system-metric-cpu {
color: $teal;
}
.system-metric-battery {
color: $yellow;
}
.system-metric-memory {
color: $pink;
}
.system-metric-disk {
color: $blue;
}
}
}
.system-time {
label {
color: $foreground;
padding: 0 5px;
font-weight: bold;
}
.system-time-time {
font-size: 18px;
}
.system-time-date {
font-size: 20px;
}
}

View File

@@ -0,0 +1,20 @@
(include "bar/music.yuck")
(include "bar/workspaces.yuck")
(include "bar/system.yuck")
(defwidget bar []
(box :class "bar" :orientation "h" :spacing 40
(workspaces)
(music_compact)
(system)))
(defwindow bar
:monitor 0
:geometry (geometry :x "0%"
:y "0%"
:width "100%"
:height "40px"
:anchor "top center")
:stacking "fg"
:exclusive true
(bar))

View File

@@ -0,0 +1,13 @@
pkgs: with pkgs; [
coreutils
bash
jq
less
gawk
socat
playerctl
networkmanager
light
iwgtk
wireplumber
]

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
##########################################
# workspace script to work with hyprland #
##########################################
# i dont really have multiple monitors rn
# active workspace
current=1
list_workspaces() {
workspace_list=$(hyprctl -j workspaces | jq -rc '[.[]|.id]|sort')
}
workspaces() {
echo '{"current": '"${current}"',"list": '"${workspace_list}"'}'
}
list_workspaces
workspaces
hyprctl dispatch workspace $current
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
case ${event%>>*} in
"workspace")
current=${event##*>>}
workspaces
;;
"createworkspace"|"destroyworkspace")
list_workspaces
workspaces
;;
esac
done

View File

@@ -0,0 +1,92 @@
(defvar playerctl "playerctl -p 'playerctld,%any'")
; https://github.com/elkowar/eww/issues/518
(deflisten music :initial ""
"playerctl -p 'playerctld,%any' --follow metadata --format '{\"artist\":\"{{artist}}\",\"album\":\"{{album}}\",\"title\":\"{{trunc(title,40)}}\",\"full_title\":\"{{title}}\",\"cover\":\"{{mpris:artUrl}}\", \"status\":\"{{lc(status)}}\",\"duration\":\"{{duration(mpris:length)}}\",\"raw_duration\":\"{{mpris:length}}\",\"position\":\"{{duration(position)}}\",\"raw_position\":\"{{position}}\"}'")
(defwidget music_controls[]
(box
(button :class "music-control" :onclick "${playerctl} previous" "")
(button :class "music-control" :onclick "${playerctl} play-pause" {music.status == "playing" ? "" : "" })
(button :class "music-control" :onclick "${playerctl} next" "")))
(defwidget music_large []
(box
:halign "center"
:class "music-large"
:orientation "h"
(box
:class "music-large-cover"
:visible {music.cover != ""}
:style "background-image: url(\"${music.cover}\");")
(box
:orientation "v"
:class "music-large-controls"
:spacing {music.cover == "" ? 10 : 0}
(label
:visible {music.artist != ""}
:class "music-large-artist"
:text {music.artist})
(label
:visible {music.album != ""}
:class "music-large-album"
:text {music.album})
(eventbox
:cursor "pointer"
(music_controls))
(box
(label
:visible {music.position != ""}
:xalign {music.duration == "" ? 0.5 : 0}
:style {music.duration == "" ? "font-size: 18px;": ""}
:text {music.position})
(label
:visible {music.duration != ""}
:xalign {music.position == "" ? 0.5 : 1}
:style {music.position == "" ? "font-size: 18px;": ""}
:text {music.duration}))
(eventbox
:class "music-large-scale"
:cursor "pointer"
:visible {music.raw_duration != "" && music.raw_position != "" }
(scale
:min 0
:max {music.raw_duration / 1000000}
:onchange "${playerctl} position {}"
:value {music.raw_position / 1000000})))))
(defvar music_control false)
(defwidget music_compact []
(eventbox
:cursor "pointer"
:onhover "${EWW_CMD} update music_control=true"
:onhoverlost "${EWW_CMD} update music_control=false"
:visible {music.title != "" && music.status != "stopped" && music != ""}
:halign "center"
(box
:class "music"
:space-evenly "false"
(button
:class "music-title"
:onclick "${EWW_CMD} open --toggle music"
:tooltip "${music.title} by ${music.artist}"
:onrightclick "wl-copy \"${music.artist} - ${music.full_title}\""
{music.title})
(revealer
:transition "slideright"
:reveal music_control
:duration "200ms"
(music_controls)
))))
(defwindow music
:stacking "overlay"
:monitor 0
:geometry (geometry
:x "0%"
:y "20px"
:width "0%"
:height "0%"
:anchor "top center")
(music_large))

View File

@@ -0,0 +1,187 @@
(defvar system_sound_control false)
(defvar system_sound_mute false)
(defpoll volume :interval "3s"
"wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}'")
(defwidget system_sound []
(eventbox
:cursor "pointer"
:onhover "${EWW_CMD} update system_sound_control=true"
:onhoverlost "${EWW_CMD} update system_sound_control=false"
:tooltip "${ system_sound_mute ? 'Muted' : 'Volume: ${volume}%'}"
(box
:space-evenly false
:orientation "h"
:class "system-sound"
(revealer
:transition "slideleft"
:reveal system_sound_control
:duration "250ms"
(scale
:class "system-scale"
:min 0
:max 151
:onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ {}%"
:value {volume}
))
(button
; since we do not know the initial state, we will just update the variable
:onclick "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && ${EWW_CMD} update system_sound_mute=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $3 ~ /MUTED/ ? \"true\" : \"false\"}')"
{system_sound_mute ? "" : volume > 75 ? "" : "" })
)))
(defvar system_bright_control false)
(defpoll bright :interval "3s" "light")
(defwidget system_bright []
(eventbox
:cursor "pointer"
:onhover "${EWW_CMD} update system_bright_control=true"
:onhoverlost "${EWW_CMD} update system_bright_control=false"
:tooltip "Brightness: ${round(bright,0)}%"
(box
:space-evenly false
:orientation "h"
:class "system-bright"
(revealer
:transition "slideleft"
:reveal system_bright_control
:duration "250ms"
(scale
:class "system-scale"
:min 5
:max 101
:onchange "light -S {}"
:value {bright}
))
(button
:onclick "light -S ${bright < 51 ? 100 : 50}"
""))))
(defwidget system_temp []
(eventbox
:cursor "pointer"
:tooltip {EWW_TEMPS["CORETEMP_PACKAGE_ID_0"] != "" ? "CPU: ${EWW_TEMPS['CORETEMP_PACKAGE_ID_0']} C" : EWW_TEMPS}
:class "system-temp"
(button
"")))
(defpoll system_net_ethernet :interval "4s" :initial ""
"nmcli -f NAME,TYPE con show --active | awk '$NF == \"ethernet\" {NF--; print}'")
(defpoll system_net_wifi :interval "4s" :initial ""
"nmcli -f NAME,TYPE con show --active | awk '$NF == \"wifi\" { NF--; print}'")
(defwidget system_net []
(eventbox
:cursor "pointer"
:class "system-net"
:visible {system_net_ethernet != "" || system_net_wifi != ""}
:tooltip {EWW_NET}
(box
:orientation "h"
(button
:visible {system_net_ethernet != ""}
:tooltip {system_net_ethernet}
"")
(button
:visible {system_net_wifi != ""}
:tooltip {system_net_wifi}
:onclick "iwgtk &"
""))))
(defwidget system_info []
(box
:orientation "h"
:space-evenly false
:spacing 5
(system_sound)
(system_bright)
(system_temp)))
(defpoll system_cpu_freq :interval "2s" :initial "0"
"cat /proc/cpuinfo | awk '/cpu MHz/ { sum += $4; n++} END { if (n != 0) print sum / n; }'")
(defwidget system_metric [value class tooltip]
(box
:orientation "h"
:space-evenly false
:class "system-metric-${class}"
:tooltip "${tooltip}"
(circular-progress
:value value
:start-at 0
:thickness 4
(label :text ""))))
(defwidget system_metrics []
(eventbox
:cursor "pointer"
:class "system-metrics"
:tooltip "test"
:onclick "${EWW_CMD} open --toggle system"
(box
:space-evenly false
(system_metric
:value {EWW_CPU.avg}
:tooltip "CPU Usage: ${round(EWW_CPU.avg, 2)}%${system_cpu_freq == '0' ? '' : '
CPU Freq: ${system_cpu_freq} MHz'}"
:class "cpu")
(system_metric
:value {EWW_RAM.used_mem_perc}
:tooltip "Free Memory: ${round(EWW_RAM.free_mem / 1024 / 1024, 2)} MB
Available Memory: ${round(EWW_RAM.available_mem / 1024 / 1024, 2)} MB
Free %: ${round(100 - EWW_RAM.used_mem_perc, 2)}%"
:class "memory")
(system_metric
:value {EWW_BATTERY.total_avg}
:tooltip "Battery ${round(EWW_BATTERY.total_avg, 0)}%"
:class "battery")
(system_metric
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:tooltip "Free Disk: ${round(EWW_DISK['/'].free / EWW_DISK['/'].total * 100, 2)} GB
Free Disk %: ${round(EWW_DISK['/'].free / EWW_DISK['/'].total * 100, 2)}%"
:class "disk"))))
(defvar system_date_reveal false)
(defpoll time :interval "1s"
"date '+%H:%M:%S'")
(defpoll date :interval "10m"
"date '+%b %d'")
(defwidget system_time []
(eventbox
:onhover "${EWW_CMD} update system_date_reveal=true"
:onhoverlost "${EWW_CMD} update system_date_reveal=false"
(box
:space-evenly false
:orientation "h"
:class "system-time"
(label :class "system-time-time" :text {time})
(revealer
:transition "slideright"
:reveal system_date_reveal
:duration "250ms"
(label :class "system-time-date" :text {date})))))
(defwidget system_separator [?visible] (box :class "system-separator" :visible {visible == "false" ? false : true}))
(defwidget system []
(box
:halign "end"
:class "system"
:space-evenly false
:spacing 5
(system_separator)
(system_info)
(system_separator
:visible "${system_net_ethernet != "" || system_net_wifi != ""}")
(system_net)
(system_separator)
(system_metrics)
(system_separator)
(system_time)))

View File

@@ -0,0 +1,14 @@
(deflisten workspace "bar/hyprworkspaces")
(defvar numerals "[\"१\", \"२\", \"३\", \"४\", \"५\", \"६\", \"७\", \"८\", \"९\", \"\"]")
(defwidget workspaces []
(eventbox
:cursor "pointer"
(box
:class "workspaces"
(for ws in {workspace.list}
(button
:class "${ws == workspace.current ? 'workspace-active' : 'workspace-inactive'}"
:onclick "hyprctl dispatch workspace ${ws}"
{ws <= 10 ? numerals[ws - 1] : ws }))
)))

View File

@@ -0,0 +1,36 @@
{ config, pkgs, lib, ... }:
{
programs.eww = {
enable = true;
package = pkgs.eww-wayland;
configDir = lib.cleanSourceWith {
src = ./.;
filter = name: _:
let
baseName = baseNameOf (toString name);
in
!(lib.hasSuffix ".nix" baseName);
};
};
systemd.user.services.eww = {
Unit = {
Description = "EWW Daemon";
};
Service =
let
deps = [
config.programs.eww.package
config.wayland.windowManager.hyprland.package
] ++ (import ./bar pkgs);
in
{
Environment = "PATH=${lib.makeBinPath deps}";
Type = "simple";
Restart = "on-failure";
ExecStart = "${config.programs.eww.package}/bin/eww daemon --no-daemonize";
};
Install.WantedBy = [ "graphical-session.target" ];
};
}

1
home/natto/eww/eww.scss Normal file
View File

@@ -0,0 +1 @@
@import "bar/bar.scss"

1
home/natto/eww/eww.yuck Normal file
View File

@@ -0,0 +1 @@
(include "bar/bar.yuck")

View File

@@ -10,8 +10,8 @@
};
};
iconTheme = {
package = pkgs.zafiro-icons;
name = "Zafiro-icons-Dark";
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
};
}

View File

@@ -3,7 +3,7 @@ let
home = config.home.homeDirectory;
in
{
services = {
services = rec {
mpd = {
enable = true;
musicDirectory = "${home}/Music";
@@ -18,7 +18,7 @@ in
};
mpd-discord-rpc = {
enable = true;
inherit (mpd) enable;
settings = {
id = 1039532008424099850; # dont really care
format = {
@@ -29,6 +29,16 @@ in
};
};
};
mpdris2 = {
inherit (mpd) enable;
mpd = {
inherit (mpd) musicDirectory;
host = "localhost";
};
};
playerctld.enable = true;
};
systemd.user.services = {
@@ -62,8 +72,8 @@ in
visualizerSupport = true;
clockSupport = true;
})
mpdas
mpc_cli
playerctl
];
file.ncmpcpp = {

View File

@@ -11,6 +11,7 @@
imagemagick
# Utils
neofetch
rage
curl
yt-dlp
@@ -18,7 +19,6 @@
unrar
vim
jmtpfs
neofetch
(inputs.nbfc.packages.${pkgs.system}.nbfc-client-c)
(flake.packages.${pkgs.system}.customscripts)
translate-shell
@@ -31,17 +31,24 @@
nss = nss_latest;
})
inputs.webcord.legacyPackages.${pkgs.system}.webcord
(xfce.thunar.override {
thunarPlugins = with xfce; [
thunar-media-tags-plugin
thunar-volman
thunar-archive-plugin
];
})
xfce.xfconf
xfce.tumbler
qbittorrent
hexchat
luajit
dunst
feh
authy
gnome.zenity
# Wine and games and stuff
steam
wineWowPackages.stable
winetricks
# (inputs.nix-gaming.packages.${pkgs.system}.osu-stable)
(flake.packages.${pkgs.system}.tlauncher)

View File

@@ -1,4 +1,4 @@
{ pkgs, config, colors, ... }:
{ pkgs, config, colors, inputs, ... }:
{
wayland = {
windowManager = {
@@ -49,5 +49,11 @@
home.packages = with pkgs; [
tofi
wineWowPackages.waylandFull
imv
grim
slurp
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
wl-clipboard
];
}

View File

@@ -18,7 +18,6 @@
};
home.packages = with pkgs; [
(dmenu.override { patches = [ ./patches/dmenu.patch ]; })
(st.override {
patches = [ ./patches/st.patch ];
extraLibs = [ harfbuzz ];
@@ -27,19 +26,12 @@
xorg.xkbcomp
xorg.xmodmap
sxiv
feh
xdotool
(xfce.thunar.override {
thunarPlugins = with xfce; [
thunar-media-tags-plugin
thunar-volman
thunar-archive-plugin
];
})
xfce.xfconf
xfce.tumbler
flameshot
xmobar
stalonetray
wineWowPackages.stable
];
home.file.stalonetray = {

View File

@@ -38,6 +38,7 @@
vim-latex-live-preview
lspkind-nvim
catppuccin-nvim
yuck-vim
];
};
};

View File

@@ -5,8 +5,13 @@
hostName = "satori";
hostId = "beca3df0";
defaultGateway = "192.168.1.1";
networkmanager.enable = true;
wireless.interfaces = [ "wlp0s20f3" ];
networkmanager = {
enable = true;
wifi = {
powersave = true;
backend = "iwd";
};
};
firewall = {
allowedTCPPorts = [ 22 18172 6600 8001 25565 ];
allowedUDPPorts = [ 22 17840 18172 ];

View File

@@ -46,6 +46,5 @@
adb.enable = true;
light.enable = true;
gamemode.enable = true;
nm-applet.enable = true;
};
}

View File

@@ -23,17 +23,17 @@
console.useXkbConfig = true;
fonts.fonts = with pkgs; [
fira-mono
fira-code
fira-mono
monoid
font-awesome
material-icons
material-design-icons
lohit-fonts.devanagari
lohit-fonts.gurmukhi
nerdfonts
font-awesome
monoid
office-code-pro
eb-garamond
noto-fonts-cjk
hanazono
takao
liberation_ttf
];

View File

@@ -3,6 +3,8 @@
{
xdg.portal = {
enable = true;
extraPortals = [ inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland ];
extraPortals = [
inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
];
};
}

View File

@@ -1,108 +0,0 @@
#!/bin/sh
# title: dmenu_websearch <http://efe.kim/dmenu_websearch.html>
# license: CC0
# author: Sunur Efe Vural <efe@efe.kim>
# version: Mar 22, 2019
# dependencies: dmenu, xdotool, hexdump, xprop, setxkbmap, coreutils.
# A browser-independent address bar with bookmark support. When the
# cursor is on a web browser it acts as the address bar of that browser.
browser='firefox --new-window'
engine='https://duckduckgo.com/?q=%s'
bookmarks="$HOME/.bookmarks"
gotourl() {
if [ "$nbrowser" = surf ]
then
xprop -id "$winid" -f _SURF_GO 8s -set _SURF_GO "$choice"
elif [ -n "$winid" ] && [ -z "$nbrowser" ]
then
#change layout to us cuz xdotool spasms with non-latin layouts
layout=$(setxkbmap -query | awk '/^layout:/{ print $2 }')
setxkbmap -layout us
xdotool key --clearmodifiers "$shortcut"\
type --clearmodifiers --delay 2 "$choice"
xdotool key --clearmodifiers Return
setxkbmap -layout "$layout"
elif [ -n "$nbrowser" ]
then
$nbrowser "$choice"
else $browser "$choice"
fi
}
searchweb() {
#convert search query to percent encoding and insert it into url
choice=$(echo "$choice" | hexdump -v -e '/1 " %02x"')
choice=$(echo "$engine" | sed "s/%s/${choice% 0a}/;s/[[:space:]]/%/g")
gotourl
}
xprop -root | grep '^_NET_ACTIVE_WINDOW' && {
winid=$(xprop -root _NET_ACTIVE_WINDOW | sed 's/.*[[:space:]]//')
class=$(xprop -id "$winid" WM_CLASS | awk -F'\"' '{ print $(NF - 1) }')
case "$class" in
Firefox) nbrowser='firefox' ;;
#Firefox) shortcut='ctrl+l' ;; # alternative method, uses xdotool
IceCat) nbrowser='icecat' ;;
Chromium) nbrowser='chromium' ;;
Chrome) nbrowser='chrome' ;;
Opera) nbrowser='opera' ;;
Vivaldi) nbrowser='vivaldi' ;; # not tested
Brave) nbrowser='brave' ;; # not tested
Conkeror) nbrowser='conkeror' ;; # not tested
Palemoon) nbrowser='palemoon' ;; # not tested
Iceweasel) nbrowser='iceweasel' ;; # not tested
qutebrowser) nbrowser='qutebrowser' ;;
Midori) nbrowser='midori' ;; # not that good
Luakit) nbrowser='luakit' ;; # uses the last window instance
Uzbl|Vimb) shortcut='o' ;;
Links) shortcut='g' ;;
Netsurf*|Epiphany|Dillo|Konqueror|Arora) shortcut='ctrl+l' ;;
Surf) nbrowser='surf' ; uricur=$(xprop -id "$winid" _SURF_URI |\
awk -F'\"' '{ print $( NF - 1 ) }') ;;
*) pid=$(xprop -id "$winid" _NET_WM_PID | awk '{ print $3 }')
while pgrep -oP "$pid" >/dev/null
do
pid=$(pgrep -oP "$pid")
done
pname=$(awk '/^Name\:/{ print $NF }' /proc/"$pid"/status) ||
winid="" ;;
esac
[ -n "$pname" ] && case "$pname" in
w3m) shortcut="U" ;;
lynx|elinks|links) shortcut="g" ;;
*) winid="" ;;
esac
}
tmpfile=$(mktemp /tmp/dmenu_websearch.XXXXXX)
trap 'rm "$tmpfile"' 0 1 15
printf '%s\n%s\n' "$uricur" "$1" > "$tmpfile"
cat "$bookmarks" >> "$tmpfile"
sed -i -E '/^(#|$)/d' "$tmpfile"
choice=$(dmenu -i -p "Go:" -w "$winid" < "$tmpfile") || exit 1
# Detect links without protocol (This is WIP)
protocol='^(https?|ftps?|mailto|about|file):///?'
checkurl() {
grep -Fx "$choice" "$tmpfile" &&
choice=$(echo "$choice" | awk '{ print $1 }') && return 0
[ ${#choice} -lt 4 ] && return 1
echo "$choice" | grep -Z ' ' && return 1
echo "$choice" | grep -EiZ "$protocol" && return 0
echo "$choice" | grep -FZ '..' && return 1
prepath=$(echo "$choice" | sed 's/(\/|#|\?).*//')
echo "$prepath" | grep -FvZ '.' && return 1
echo "$prepath" | grep -EZ '^([[:alnum:]~_:-]+\.?){1,3}' && return 0
}
if checkurl
then
echo "$choice" | grep -EivZ "$protocol" &&
choice="http://$choice"
gotourl
else searchweb
fi