From c8010af175bf3e95554cb14e6aa8938696d63a8e Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Thu, 15 Jul 2021 14:54:02 +0700 Subject: [PATCH] drop unused modules and packages in user removed modules: - alacritty.nix - i3.nix - polybar.i3.nix (polybar.bspwm.nix is now renamed to just polybar.nix) - urxvt.nix removed packages: - appimage-run - ghidra-bin - inkscape - lf - mps-youtube - vlc --- users/rin/alacritty.nix | 38 --- users/rin/home.nix | 12 +- users/rin/i3.nix | 233 --------------- users/rin/polybar.i3.nix | 291 ------------------- users/rin/{polybar.bspwm.nix => polybar.nix} | 0 users/rin/urxvt.nix | 23 -- 6 files changed, 1 insertion(+), 596 deletions(-) delete mode 100644 users/rin/alacritty.nix delete mode 100644 users/rin/i3.nix delete mode 100644 users/rin/polybar.i3.nix rename users/rin/{polybar.bspwm.nix => polybar.nix} (100%) delete mode 100644 users/rin/urxvt.nix diff --git a/users/rin/alacritty.nix b/users/rin/alacritty.nix deleted file mode 100644 index bf37c56..0000000 --- a/users/rin/alacritty.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, ... }: { - programs.alacritty = { - enable = true; - settings = { - scrolling = { - history = 10000; - multiplier = 3; - }; - font = { - normal = { - family = "CascadiaCodePL"; - style = "Regular"; - }; - size = 8.6; - }; - window = { - dynamic_title = true; - padding = { - x = 5; - y = 0; - }; - }; - # TODO: how - # hints.enabled = [{ - # command = "xdg-open"; - # post_processing = true; - # mouse = { - # enabled = true; - # mods = "Control"; - # }; - # }]; - - colors.primary.background = "#000000"; - background_opacity = 0.65; - draw_bold_text_with_bright_colors = true; - }; - }; -} diff --git a/users/rin/home.nix b/users/rin/home.nix index 21d6beb..b11d753 100644 --- a/users/rin/home.nix +++ b/users/rin/home.nix @@ -4,11 +4,8 @@ homeDirectory = "/home/rin"; stateVersion = "21.05"; packages = with pkgs; [ - appimage-run ffmpeg gnupg - lf - mps-youtube neofetch nodejs-16_x pamixer @@ -26,16 +23,13 @@ element-desktop feh gnome.file-roller - ghidra-bin gimp - inkscape kotatogram-desktop lxappearance maim pavucontrol tor-browser-bundle-bin transmission-remote-gtk - vlc xclip xorg.xgamma ]; @@ -75,21 +69,17 @@ ./theming.nix ./xdg.nix - # ./alacritty.nix ./kitty.nix ./mpv.nix ./rofi.nix - # ./urxvt.nix ./dunst.nix ./picom.nix - ./polybar.bspwm.nix - # ./polybar.i3.nix + ./polybar.nix ./xorg.nix ./sxhkd.nix ./bspwm.nix - # ./i3.nix ]; programs = { diff --git a/users/rin/i3.nix b/users/rin/i3.nix deleted file mode 100644 index 4c7cbc2..0000000 --- a/users/rin/i3.nix +++ /dev/null @@ -1,233 +0,0 @@ -{ config, pkgs, ... }: -let - super = "Mod4"; - alt = "Mod1"; - - mkGapsMode = mode: { - "plus" = "gaps ${mode} current plus 5"; - "minus" = "gaps ${mode} current minus 5"; - "0" = "gaps ${mode} current set 0"; - "Shift+plus" = "gaps ${mode} all plus 5"; - "Shift+minus" = "gaps ${mode} all minus 5"; - "Shift+0" = "gaps ${mode} all set 0"; - "Return" = "mode gapsMode"; - "Escape" = "mode default"; - }; - genGapsModes = modes: builtins.listToAttrs (builtins.map (mode: { - name = mode; - value = mkGapsMode mode; - }) modes); - genColors = states: builtins.listToAttrs (builtins.map (state: { - name = state; - value = { - background = "#2f343f"; - border = "#2f343f"; - childBorder = "#2f343f"; - indicator = "#2f343f"; - text = "#d8dee8"; - }; - }) states); - -in rec { - xsession.windowManager.i3 = { - enable = true; - package = pkgs.i3-gaps; - - config = { - startup = [ - { - # HACK: what is this lol - command = "systemctl --user restart polybar"; - always = true; - notification = false; - } - { - command = "feh --no-fehbg --bg-fill ${config.xdg.configHome}/xorg/wallpaper.png"; - always = true; - notification = false; - } - ]; - - fonts = { - names = [ - "Open Sans" - "HanaMinA" - "HanaMinB" - ]; - style = "Regular"; - size = 8.0; - }; - - floating = { - titlebar = false; - modifier = super; - border = 0; - }; - - window.border = 0; - bars = []; - - gaps = { - smartGaps = true; - inner = 5; - }; - - colors = genColors [ - "focused" - "focusedInactive" - "unfocused" - "urgent" - "placeholder" - ] // { background = "#2f343f"; }; - #colors.focused.background = "#1d242f"; - - modifier = super; - keybindings = { - # Rofi (App launcher) - "${super}+Return" = "exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans 8'"; - - # Printscreen - "Print" = "exec maim -us | tee ~/Pictures/Screenshots/$(date +%s)c.png | xclip -selection clipboard -t image/png"; - "Shift+Print" = "exec maim -u | tee ~/Pictures/Screenshots/$(date +%s).png | xclip -selection clipboard -t image/png"; - - # Quick-kill picom - "${super}+p" = "exec systemctl --user stop picom"; - "${super}+Shift+p" = "exec systemctl --user restart picom"; - - # Volume - "XF86AudioRaiseVolume" = "exec pamixer -i 5%"; - "XF86AudioLowerVolume" = "exec pamixer -d 5%"; - "XF86AudioMute" = "exec pamixer -t"; - - # Brightness - "XF86MonBrightnessUp" = "exec light -A 10"; - "XF86MonBrightnessDown" = "exec light -U 10"; - "Shift+XF86MonBrightnessUp" = "exec light -A 1"; - "Shift+XF86MonBrightnessDown" = "exec light -U 1"; - "Ctrl+XF86MonBrightnessUp" = "exec xgamma -gamma 1.3"; - "Ctrl+XF86MonBrightnessDown" = "exec xgamma -gamma 1"; - - # Music control - # "XF86AudioNext" = "exec mpc next"; - # "XF86AudioPrev" = "exec mpc prev"; - # "XF86AudioPlay" = "exec mpc toggle"; - # "XF86AudioStop" = "exec mpc stop"; - - # Kill focused window - "${super}+c" = "kill"; - "${alt}+F4" = "kill"; - - # Change focus - "${super}+Left" = "focus left"; - "${super}+Down" = "focus down"; - "${super}+Up" = "focus up"; - "${super}+Right" = "focus right"; - "${super}+h" = "focus left"; - "${super}+j" = "focus down"; - "${super}+k" = "focus up"; - "${super}+l" = "focus right"; - - # Move focused window - "${super}+Shift+Left" = "move left"; - "${super}+Shift+Down" = "move down"; - "${super}+Shift+Up" = "move up"; - "${super}+Shift+Right" = "move right"; - "${super}+Shift+h" = "move left"; - "${super}+Shift+j" = "move down"; - "${super}+Shift+k" = "move up"; - "${super}+Shift+l" = "move right"; - - # Change split modes - "${super}+b" = "split h"; - "${super}+v" = "split v"; - "${super}+s" = "layout toggle split"; - "${super}+w" = "layout tabbed"; - - # Enter fullscreen - "${super}+f" = "fullscreen toggle"; - - # Toggle floating windows - "${super}+space" = "floating toggle"; - - # Restart / Exit i3 - "${super}+Shift+r" = "restart"; - "${super}+q" = "exec i3-nagbar -m 'Exit?' -b 'Yes' 'i3-msg exit'"; - - # Modes - "${super}+r" = "mode Resize"; - "${super}+Shift+g" = "mode Gaps"; - - # Workspace switching - "${super}+1" = "workspace number $ws1"; - "${super}+2" = "workspace number $ws2"; - "${super}+3" = "workspace number $ws3"; - "${super}+4" = "workspace number $ws4"; - "${super}+5" = "workspace number $ws5"; - "${super}+6" = "workspace number $ws6"; - "${super}+7" = "workspace number $ws7"; - "${super}+8" = "workspace number $ws8"; - "${super}+9" = "workspace number $ws9"; - "${super}+0" = "workspace number $ws10"; - "${alt}+Control+Left" = "workspace prev"; - "${alt}+Control+Right" = "workspace next"; - "${alt}+Control+h" = "workspace prev"; - "${alt}+Control+l" = "workspace next"; - - "${super}+Shift+1" = "move container to workspace number $ws1"; - "${super}+Shift+2" = "move container to workspace number $ws2"; - "${super}+Shift+3" = "move container to workspace number $ws3"; - "${super}+Shift+4" = "move container to workspace number $ws4"; - "${super}+Shift+5" = "move container to workspace number $ws5"; - "${super}+Shift+6" = "move container to workspace number $ws6"; - "${super}+Shift+7" = "move container to workspace number $ws7"; - "${super}+Shift+8" = "move container to workspace number $ws8"; - "${super}+Shift+9" = "move container to workspace number $ws9"; - "${super}+Shift+0" = "move container to workspace number $ws10"; - }; - - modes = { - "Resize" = { - "Left" = "resize shrink width 5 px or 5 ppt"; - "Down" = "resize grow height 5 px or 5 ppt"; - "Up" = "resize shrink height 5 px or 5 ppt"; - "Right" = "resize grow width 5 px or 5 ppt"; - "Return" = "mode default"; - }; - "Gaps" = { - "o" = "mode Outer"; - "i" = "mode Inner"; - "h" = "mode Horizontal"; - "v" = "mode Vertical"; - "t" = "mode Top"; - "r" = "mode Right"; - "b" = "mode Bottom"; - "l" = "mode Left"; - "Return" = "mode Gaps"; - "Escape" = "mode default"; - }; - } // genGapsModes [ - "Outer" - "Inner" - "Horizontal" - "Vertical" - "Top" - "Right" - "Bottom" - "Left" - ]; - }; - - extraConfig = '' - set $ws1 "1:code" - set $ws2 "2:web" - set $ws3 "3:discord" - set $ws4 "4:game" - set $ws5 "5" - set $ws6 "6" - set $ws7 "7" - set $ws8 "8:steam" - set $ws9 "9:spotify" - set $ws10 "10:term" - ''; - }; -} diff --git a/users/rin/polybar.i3.nix b/users/rin/polybar.i3.nix deleted file mode 100644 index 215db94..0000000 --- a/users/rin/polybar.i3.nix +++ /dev/null @@ -1,291 +0,0 @@ -{ config, ... }: -let - memoryBar = { - width = 20; - foreground = [ - "#aaff77" - "#aaff77" - "#fba922" - "#ff5555" - ]; - indicator = { - text = "|"; - font = 6; - foreground = "#fff"; - }; - fill = { - text = "─"; - font = 6; - }; - empty = { - text = "─"; - font = 6; - foreground = "#444444"; - }; - }; - formatRampCoreload = text: color: { - inherit text; - font = 2; - foreground = color; - }; -in { - services.polybar = { - enable = true; - script = builtins.readFile ./scripts/polybar.sh; - settings = rec { - _base = { - monitor = "eDP-1"; - width = "100%"; - height = 22; - background = "#00"; - foreground = "#fff"; - line = { - color = "#00"; - size = 1; - }; - - enable-ipc = true; - }; - - "bar/top" = _base // { - spacing = 2; - padding = { - right = 5; - bottom = 5; - left = 5; - }; - - font = [ - "NotoSans-Regular:size=8.2;2" - "MaterialIcons:size=10;1" - "FontAwesome:size=10;3" - "NotoSans-Regular:size=10;2" - "MaterialIcons:size=12;4" - "FontAwesome5Brands:style=Solid:pixelsize=10;1" - "HanaMinA:size=9.8;1" - "HanaMinB:size=9.8;1" - ]; - - # enable-ipc = true; - modules = { - # left = "previous playpause next spotify"; - left = "title"; - right = "datetime"; - }; - }; - - "bar/bottom" = _base // { - bottom = true; - - spacing = 3; - padding = { - top = 5; - right = 5; - }; - module.margin = { - left = 2; - right = 2; - }; - - font = [ - "NotoSans-Regular:size=8.2;1" - "unifont:size=6;1" - "FontAwesome:size=10;1" - "NotoSans-Regular:size=10;1" - "MaterialIcons:size=12;4" - "FontAwesome5Brands:style=Solid:pixelsize=10;1" - ]; - - modules = { - left = "i3"; - right = "fs cpu memory swap wifi"; - }; - - tray = { - position = "right"; - padding = 2; - scale = 1.1; - }; - }; - - "module/i3" = { - type = "internal/i3"; - - format = " "; - strip.wsnumbers = true; - wrapping.scroll = false; - - ws.icon = { - text = [ - "1:code;" - "2:web;" - "3:discord;%{T6}" - "4:game;" - "8:steam;" - "9:spotify;" - "10:term;" - ]; - default = ""; - }; - - label = { - mode = { - text = "%mode%"; - padding = 5; - }; - - dimmed.underline = _base.background; - - focused = { - text = "%icon%"; - foreground = "#fff"; - background = "#773f3f3f"; - underline = "#c9665e"; - font = 4; - padding = 4; - }; - - unfocused = { - text = "%icon%"; - foreground = "#fff"; - background = "#00"; - underline = "#00"; - font = 4; - padding = 4; - }; - - visible = { - text = "%index%"; - underline = "#555555"; - padding = 4; - }; - - urgent = { - text = "%icon%"; - foreground = "#00"; - background = "#bd2c40"; - underline = "#9b0a20"; - font = 4; - padding = 4; - }; - }; - }; - - "module/cpu" = { - type = "internal/cpu"; - interval = 0.5; - label = "CPU %percentage%%"; - format = { - text = "