From e141c761cd55537916cbab9f153009c39a157a77 Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Tue, 19 Oct 2021 22:58:13 +0100 Subject: [PATCH] Try to add common or something idk --- {home/daniel => user/common}/i3/default.nix | 0 user/common/i3utils/default.nix | 14 + {home/daniel => user/common}/polybar/config | 0 .../common}/polybar/default.nix | 0 {home => user}/daniel/home.nix | 0 user/daniel/i3/default.nix | 74 ++++ {home => user}/daniel/i3utils/default.nix | 0 user/daniel/polybar/config | 394 ++++++++++++++++++ user/daniel/polybar/default.nix | 21 + user/miniding/home.nix | 72 ++++ 10 files changed, 575 insertions(+) rename {home/daniel => user/common}/i3/default.nix (100%) create mode 100644 user/common/i3utils/default.nix rename {home/daniel => user/common}/polybar/config (100%) rename {home/daniel => user/common}/polybar/default.nix (100%) rename {home => user}/daniel/home.nix (100%) create mode 100644 user/daniel/i3/default.nix rename {home => user}/daniel/i3utils/default.nix (100%) create mode 100644 user/daniel/polybar/config create mode 100644 user/daniel/polybar/default.nix create mode 100644 user/miniding/home.nix diff --git a/home/daniel/i3/default.nix b/user/common/i3/default.nix similarity index 100% rename from home/daniel/i3/default.nix rename to user/common/i3/default.nix diff --git a/user/common/i3utils/default.nix b/user/common/i3utils/default.nix new file mode 100644 index 0000000..ddb617b --- /dev/null +++ b/user/common/i3utils/default.nix @@ -0,0 +1,14 @@ +with import {}; + +buildGoModule rec { + pname = "i3utils"; + version = "0.0.1"; + src = fetchFromSourcehut { + owner = "~dpatterbee"; + repo = pname; + rev = "${version}"; + sha256 = "01wqlf66y172idq1850nby7nmb4075sryis899ldzpk1jakc5b3f"; + }; + + vendorSha256 = "0pnd89iqdj3f719xf4iy5r04n51d0rrrf0qb2zjirpw7vh7g82i9"; +} diff --git a/home/daniel/polybar/config b/user/common/polybar/config similarity index 100% rename from home/daniel/polybar/config rename to user/common/polybar/config diff --git a/home/daniel/polybar/default.nix b/user/common/polybar/default.nix similarity index 100% rename from home/daniel/polybar/default.nix rename to user/common/polybar/default.nix diff --git a/home/daniel/home.nix b/user/daniel/home.nix similarity index 100% rename from home/daniel/home.nix rename to user/daniel/home.nix diff --git a/user/daniel/i3/default.nix b/user/daniel/i3/default.nix new file mode 100644 index 0000000..096499b --- /dev/null +++ b/user/daniel/i3/default.nix @@ -0,0 +1,74 @@ +{ config, lib, pkgs, ...}: + +let + mod = "Mod4"; +in { + xsession.windowManager.i3 = { + enable = true; + config = { + modifier = mod; + fonts = { + names = [ "pango:monospace 8" ]; + style = "monospace"; + size = 8.0; + }; + terminal = "alacritty"; + + floating = { + modifier = mod; + criteria = [ + { instance = "pavucontrol"; } + ]; + }; + + focus = { + followMouse = false; + }; + + bars = [ ]; + + keybindings = lib.mkOptionDefault { + "${mod}+q" = "kill"; + "${mod}+d" = "exec rofi -show drun"; + + "${mod}+h" = "focus left"; + "${mod}+j" = "focus down"; + "${mod}+k" = "focus up"; + "${mod}+l" = "focus right"; + + "${mod}+Shift+h" = "move left"; + "${mod}+Shift+l" = "move right"; + + "${mod}+b" = "split h"; + "${mod}+v" = "split v"; + "${mod}+Control+Return" = "exec --no-startup-id i3utils workspace new"; + "${mod}+Control+Shift+Return" = "exec --no-startup-id i3utils workspace new -b"; + "${mod}+Shift+Return" = "exec --no-startup-id i3utils workspace new -n, move next"; + + "${mod}+Control+j" = "exec --no-startup-id $HOME/bin/scripts/godown"; + "${mod}+Control+k" = "exec --no-startup-id $HOME/bin/scripts/goup"; + "${mod}+Control+h" = "exec --no-startup-id i3utils workspace new -b"; + + "${mod}+Shift+k" = "exec --no-startup-id i3utils window move prev"; + "${mod}+Shift+j" = "exec --no-startup-id i3utils window move next"; + + "${mod}+p" = "scratchpad show"; + "${mod}+Escape" = "exec i3lock -i /home/daniel/Pictures/wallpapers/wallpaper_3840x2160_blur.png"; + "${mod}+Shift+Escape" = "exec i3lock -i /home/daniel/Pictures/wallpapers/wallpaper_3840x2160_blur.png && systemctl suspend"; + }; + + window = { + border = 3; + titlebar = false; + commands = [ + { command = "move position center #2116 46"; criteria = { class = "jetbrains-toolbox"; }; } + { command = "move scratchpad"; criteria = { instance = "spotify"; }; } + ]; + }; + + startup = [ + { command = "$HOME/bin/scripts/flower"; always = true; } + ]; + }; + }; +} diff --git a/home/daniel/i3utils/default.nix b/user/daniel/i3utils/default.nix similarity index 100% rename from home/daniel/i3utils/default.nix rename to user/daniel/i3utils/default.nix diff --git a/user/daniel/polybar/config b/user/daniel/polybar/config new file mode 100644 index 0000000..76d1a6b --- /dev/null +++ b/user/daniel/polybar/config @@ -0,0 +1,394 @@ +[colors] +;background = ${xrdb:color0:#222} +background = #222 +background-alt = #444 +;foreground = ${xrdb:color7:#222} +foreground = #dfdfdf +foreground-alt = #555 +primary = #ffb52a +secondary = #e60053 +alert = #bd2c40 + +[bar/main] +width = 100% + +height = 34 + +font-0 = Ubuntu:size=10;2 + +font-1 = Font Awesome 5 Free Solid:size=10;3 +font-2 = Font Awesome 5 Brands:size=10;1 + +fixed-center = true + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = #f00 + +;border-size = 4 +border-color = #00000000 + +padding-left = 0 +padding-right = 2 + +module-margin-left = 1 +module-margin-right = 2 + +modules-left = i3 +modules-center = mpd date +modules-right = filesystem xbacklight pulseaudio memory cpu wlan eth battery temperature powermenu + +tray-position = right +tray-padding = 2 + +dpi = 120 +;tray-background = #0063ff + +;wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +cursor-click = pointer +cursor-scroll = ns-resize + +[module/xwindow] +type = internal/xwindow +label = %title:0:30:...% + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +format-prefix = " " +format-prefix-foreground = ${colors.foreground-alt} +format-prefix-underline = ${colors.secondary} + +label-layout = %layout% +label-layout-underline = ${colors.secondary} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-background = ${colors.secondary} +label-indicator-underline = ${colors.secondary} + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / + +label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.foreground-alt} + +[module/i3] +type = internal/i3 +format = +index-sort = false +wrapping-scroll = false + +; Only show workspaces on the same output as the bar +;pin-workspaces = true + +label-mode-padding = 2 +label-mode-foreground = #000 +label-mode-background = ${colors.primary} + +; focused = Active workspace on focused monitor +label-focused = %name% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 2 + +; unfocused = Inactive workspace on any monitor +label-unfocused = %name% +label-unfocused-padding = 2 + +; visible = Active workspace on unfocused monitor +label-visible = %name% +label-visible-background = ${self.label-focused-background} +label-visible-underline = ${self.label-focused-underline} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %index% +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +; Separator in between workspaces +; label-separator = | + + +[module/mpd] +type = internal/mpd +format-online = + +icon-prev =  +icon-stop =  +icon-play =  +icon-pause =  +icon-next =  + +label-song-maxlen = 25 +label-song-ellipsis = true + +[module/xbacklight] +type = internal/xbacklight + +format =