diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d568dd4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,48 @@ +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data \ No newline at end of file diff --git a/configuration.nix b/configuration.nix index 0bb2ae3..e3981c6 100644 --- a/configuration.nix +++ b/configuration.nix @@ -9,6 +9,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ./programs/emacs + ./programs/aspell.nix ]; # Use the systemd-boot EFI boot loader. @@ -53,10 +54,16 @@ enable = true; extraPackages = with pkgs; [ rofi # launcher - polybar # bar + polybarFull # bar i3lock # lock screen + xss-lock ]; }; + + services.gnome.gnome-keyring.enable = true; + + hardware.bluetooth.enable = true; + services.blueman.enable = true; # Configure keymap in X11 @@ -89,7 +96,7 @@ environment.systemPackages = with pkgs; [ # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. #emacs - aspell + #aspell emacs-all-the-icons-fonts wget firefox @@ -101,18 +108,13 @@ rustup rust-analyzer usbutils - starship + gcc + clang ]; #services.emacs.enable = true; #services.emacs.defaultEditor = true; - #nixpkgs.overlays = [ - # (import (builtins.fetchTarball { - # url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; - # })) - #]; - environment.shells = [ pkgs.zsh ]; environment.pathsToLink = [ "/share/zsh" ]; diff --git a/home/config/i3/config b/home/config/i3/config new file mode 100644 index 0000000..3fdbafa --- /dev/null +++ b/home/config/i3/config @@ -0,0 +1,245 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# initialise kwallet via pam +#exec --no-startup-id /usr/lib/pam_kwallet_init + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +#font pango:monospace 11 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +# ssh agent +#exec .config/plasma-workspace/env/ssh-agent-startup.sh + +# keepass +#exec .config/old-autostart-scripts/keepassxc.sh + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# Mod Ctrl d for display resetting +#bindsym $mod+Ctrl+d exec --no-startup-id $HOME/.config/i3/set_xrandr.zsh + +# start a terminal +#export TERMINAL=/usr/bin/alacritty +#bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+Return exec /run/current-system/sw/bin/alacritty + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +#bindsym $mod+d exec --no-startup-id dmenu_run +# A more modern dmenu replacement is rofi: + bindcode $mod+40 exec "rofi -modi drun,run -show drun" +# There also is i3-dmenu-desktop which only displays applications shipping a +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop + +bindsym Mod1+Tab exec "rofi -show window" + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1 :gen" +set $ws2 "2: web" +set $ws3 "3: misc" +set $ws4 "4: comms" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9: secondary" +set $ws10 "10: secondary" + + +workspace 1 output primary +workspace 2 output primary +workspace 3 output primary +workspace 4 output primary +#workspace 9 output eDP-1 +#workspace 10 output eDP-1 + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +#bar { +# status_command i3status-rs ~/.config/i3status-rust/config.toml +# position top +#} +#exec_always --no-startup-id polybar +exec_always --no-startup-id systemctl --user start polybar.service + +# lockscreen +set $i3lockwall i3lock -f -t --nofork #-i ~/Pictures/matrix-manjaro.png --nofork + +# shutdown / restart / suspend... +set $mode_system System (l) lock, (CTRL+e) logout, (CTRL+r) reboot, (CTRL+s) shutdown + +mode "$mode_system" { + bindsym l exec --no-startup-id $i3lockwall, mode "default" + bindsym Ctrl+e exec --no-startup-id i3-msg exit, mode "default" + #bindsym s exec --no-startup-id $i3lockwall && systemctl suspend, mode "default" + #bindsym h exec --no-startup-id $i3lockwall && systemctl hibernate, mode "default" + bindsym Ctrl+r exec --no-startup-id systemctl reboot, mode "default" + bindsym Ctrl+s exec --no-startup-id systemctl poweroff -i, mode "default" + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+BackSpace mode "$mode_system" + +# keyboard layout toggle +bindsym Mod1+space exec --no-startup-id .config/i3/keyboard_layout_toggle.sh + +# application specific stuff +for_window[class="KeePassXC"] floating enable +#assign [class="KeePassXC"] $ws5 +#for_window[class="Thunderbird"] move workspace $ws4 +#for_window[class="Element"] move workspace $ws4 + +# autostart normal programs +#exec --not-startup-id i3-msg 'workspace 4:comms; exec element-desktop' +#exec --not-startup-id i3-msg 'workspace 4:comms; exec thunderbird' +#exec --no-startup-id element-desktop +#exec --no-startup-id thunderbird \ No newline at end of file diff --git a/home/config/i3/config~ b/home/config/i3/config~ new file mode 100644 index 0000000..4024110 --- /dev/null +++ b/home/config/i3/config~ @@ -0,0 +1,245 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# initialise kwallet via pam +#exec --no-startup-id /usr/lib/pam_kwallet_init + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +#font pango:monospace 11 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +#exec --no-startup-id nm-applet + +# ssh agent +#exec .config/plasma-workspace/env/ssh-agent-startup.sh + +# keepass +#exec .config/old-autostart-scripts/keepassxc.sh + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# Mod Ctrl d for display resetting +#bindsym $mod+Ctrl+d exec --no-startup-id $HOME/.config/i3/set_xrandr.zsh + +# start a terminal +#export TERMINAL=/usr/bin/alacritty +#bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+Return exec /run/current-system/sw/bin/alacritty + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +#bindsym $mod+d exec --no-startup-id dmenu_run +# A more modern dmenu replacement is rofi: + bindcode $mod+40 exec "rofi -modi drun,run -show drun" +# There also is i3-dmenu-desktop which only displays applications shipping a +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop + +bindsym Mod1+Tab exec "rofi -show window" + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1 :gen" +set $ws2 "2: web" +set $ws3 "3: misc" +set $ws4 "4: comms" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9: secondary" +set $ws10 "10: secondary" + + +workspace 1 output primary +workspace 2 output primary +workspace 3 output primary +workspace 4 output primary +#workspace 9 output eDP-1 +#workspace 10 output eDP-1 + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +#bar { +# status_command i3status-rs ~/.config/i3status-rust/config.toml +# position top +#} +#exec_always --no-startup-id polybar +exec_always --no-startup-id systemctl --user start polybar.service + +# lockscreen +set $i3lockwall i3lock -f -t --nofork #-i ~/Pictures/matrix-manjaro.png --nofork + +# shutdown / restart / suspend... +set $mode_system System (l) lock, (CTRL+e) logout, (CTRL+r) reboot, (CTRL+s) shutdown + +mode "$mode_system" { + bindsym l exec --no-startup-id $i3lockwall, mode "default" + bindsym Ctrl+e exec --no-startup-id i3-msg exit, mode "default" + #bindsym s exec --no-startup-id $i3lockwall && systemctl suspend, mode "default" + #bindsym h exec --no-startup-id $i3lockwall && systemctl hibernate, mode "default" + bindsym Ctrl+r exec --no-startup-id systemctl reboot, mode "default" + bindsym Ctrl+s exec --no-startup-id systemctl poweroff -i, mode "default" + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+BackSpace mode "$mode_system" + +# keyboard layout toggle +bindsym Mod1+space exec --no-startup-id .config/i3/keyboard_layout_toggle.sh + +# application specific stuff +for_window[class="KeePassXC"] floating enable +#assign [class="KeePassXC"] $ws5 +#for_window[class="Thunderbird"] move workspace $ws4 +#for_window[class="Element"] move workspace $ws4 + +# autostart normal programs +#exec --not-startup-id i3-msg 'workspace 4:comms; exec element-desktop' +#exec --not-startup-id i3-msg 'workspace 4:comms; exec thunderbird' +#exec --no-startup-id element-desktop +#exec --no-startup-id thunderbird \ No newline at end of file diff --git a/home/config/i3/keyboard_layout_toggle.sh b/home/config/i3/keyboard_layout_toggle.sh new file mode 100755 index 0000000..afbd31a --- /dev/null +++ b/home/config/i3/keyboard_layout_toggle.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [[ `setxkbmap -query | awk '$1 == "layout:"{print($2)}'` = "us" ]]; then + setxkbmap -layout de +else + setxkbmap -layout us +fi diff --git a/home/config/nixpkgs/dunst.nix b/home/config/nixpkgs/dunst.nix new file mode 100644 index 0000000..645dcc5 --- /dev/null +++ b/home/config/nixpkgs/dunst.nix @@ -0,0 +1,38 @@ +{ pkgs, ...}: +{ + services.dunst = { + enable = true; + iconTheme = { + package = pkgs.numix-icon-theme; + name = "Numix"; + size = "26"; + }; + settings = { + global = { + geometry = "300x5-30+50"; + transparency = 10; + frame_color = "#839496"; + font = "Hasklug Nerd Font 10"; + timeout = 5; + follow = "mouse"; + markup = "full"; + icon_position = "left"; + history_length = 32; + dmenu = "${pkgs.rofi}/bin/rofi -dmenu"; + word_wrap = true; + }; + urgency_critical = { + foreground = "#fdf6e3"; + background = "#dc322f"; + }; + urgency_normal = { + foreground = "#fdf6e3"; + background = "#859900"; + }; + urgency_low = { + foreground = "#fdf6e3"; + background = "#2aa198"; + }; + }; + }; +} diff --git a/home/config/nixpkgs/dunst.nix~ b/home/config/nixpkgs/dunst.nix~ new file mode 100644 index 0000000..be9519d --- /dev/null +++ b/home/config/nixpkgs/dunst.nix~ @@ -0,0 +1,38 @@ +{ pkgs, ...}: +{ + services.dunst = { + enable = true; + iconTheme = { + package = pkgs.numix-icon-theme; + name = "Numix"; + size = "24"; + }; + settings = { + global = { + geometry = "300x5-30+50"; + transparency = 10; + frame_color = "#839496"; + font = "Hasklug Nerd Font 10"; + timeout = 5; + follow = "mouse"; + markup = "full"; + icon_position = "left"; + history_length = 32; + dmenu = "${pkgs.rofi}/bin/rofi -dmenu"; + word_wrap = true; + }; + urgency_critical = { + foreground = "#fdf6e3"; + background = "#dc322f"; + }; + urgency_normal = { + foreground = "#fdf6e3"; + background = "#859900"; + }; + urgency_low = { + foreground = "#fdf6e3"; + background = "#2aa198"; + }; + }; + }; +} diff --git a/home/config/nixpkgs/home.nix b/home/config/nixpkgs/home.nix new file mode 100644 index 0000000..59776a3 --- /dev/null +++ b/home/config/nixpkgs/home.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +{ + imports = + [ + ./polybar.nix + ./dunst.nix + ./zsh.nix + ]; + home.packages = [ + pkgs.htop + pkgs.pavucontrol + ]; + services.blueman-applet.enable = true; + services.network-manager-applet.enable = true ; + services.gnome-keyring = { + enable = true; + components = [ "pkcs11" "secrets" ]; + }; + + programs.home-manager = { + enable = true; + }; + +} diff --git a/home/config/nixpkgs/home.nix~ b/home/config/nixpkgs/home.nix~ new file mode 100644 index 0000000..3940b0c --- /dev/null +++ b/home/config/nixpkgs/home.nix~ @@ -0,0 +1,57 @@ +{ pkgs, ... }: +{ + imports = + [ + ./polybar.nix + ]; + home.packages = [ + pkgs.htop + pkgs.pavucontrol + ]; + + programs.starship = { + enable = true; + enableZshIntegration = true; + settings = { + add_newline = false; + format = "$all"; + username.show_always = false; + git_commit.tag_disabled = false; + hostname.ssh_only = false; + directory.truncate_to_repo = true; + }; + }; + + services.network-manager-applet.enable = true ; + services.gnome-keyring = { + enable = true; + components = [ "pkcs11" "secrets" ]; + }; + + programs.zsh = { + enable = true; + defaultKeymap = "emacs"; + oh-my-zsh.enable = false; + # remove extra stuff on the right side of the prompt + initExtra = '' + unset RPS1 + # Color man pages + export LESS_TERMCAP_mb=$'\E[01;32m' + export LESS_TERMCAP_md=$'\E[01;32m' + export LESS_TERMCAP_me=$'\E[0m' + export LESS_TERMCAP_se=$'\E[0m' + export LESS_TERMCAP_so=$'\E[01;47;34m' + export LESS_TERMCAP_ue=$'\E[0m' + export LESS_TERMCAP_us=$'\E[01;36m' + export LESS=-R + ''; + }; + + programs.exa.enable = true; + programs.exa.enableAliases = false; + + programs.home-manager = { + enable = true; + }; + +} diff --git a/home/config/nixpkgs/polybar.nix b/home/config/nixpkgs/polybar.nix new file mode 100644 index 0000000..a283ccf --- /dev/null +++ b/home/config/nixpkgs/polybar.nix @@ -0,0 +1,265 @@ +{ pkgs, ...}: +{ + services.polybar = { + enable = true; + package = pkgs.polybarFull; + settings = + let + background_col = "#120030"; + foreground_col = "#9e66ff"; + foreground_altcol = "#66deff"; + primary_col = "#ffb52a"; + secondary_col = "#e60053"; + alert_col = "#bd2c40"; + in + { + "bar/main" = { + font = [ + "Hasklig:style=Regular" + "all-the-icons:style=Regular" + "Webdings:style=Regular" + "Noto Emoji:scale=10" + "Unifont:style=Regular" + "Material Icons:size=12;0" + "Weather Icons:size=12;0" + "Hasklug Nerd Font,Hasklig Medium:style=Medium,Regular" + ]; + modules = { + left = "i3"; + center = ""; + right = " xbacklight xkeyboard eth wlan battery date powermenu volume "; + }; + + background = background_col; + foreground = foreground_col; + + monitor = '' + ''${env:MONITOR:} + ''; + width = "100%"; + module-margin = 1; + tray = { + position = "right"; + padding = 2; + background = foreground_col; + }; + }; + "module/volume" = { + type = "internal/pulseaudio"; + format.volume = " "; + label.muted.text = "🔇"; + label.muted.foreground = "#666"; + ramp.volume = ["🔈" "🔉" "🔊"]; + click.right = "${pkgs.pavucontrol}/bin/pavucontrol &"; + }; + "module/i3" = { + type = "internal/i3"; + format = " "; + index-sort = "true"; + 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 = primary_col; + + #; focused = Active workspace on focused monitor + label-focused = "%name%"; + #;label-focused-background = ${colors.background-alt} + #;label-focused-background = #9f78e1 + label-focused-background = foreground_col; + label-focused-underline= primary_col; + label-focused-foreground = "#cccccc"; + 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 = "%index%"; + label-visible-background = "#6c419a"; + label-visible-underline = primary_col; + label-visible-padding = 2; + + #; urgent = Workspace with urgency hint set + label-urgent = "%name%"; + label-urgent-background = alert_col; + label-urgent-padding = "2"; + + #; Separator in between workspaces + #; label-separator = | + }; + "module/xkeyboard" = { + type = "internal/xkeyboard"; + blacklist-0 = "num lock"; + interval = "5"; + + format-prefix = ''""''; + format-prefix-foreground = foreground_altcol; + format-prefix-underline = secondary_col; + + label-layout = "%layout%"; + label-layout-underline = secondary_col; + + label-indicator-padding = "2"; + label-indicator-margin = "1"; + label-indicator-background = secondary_col; + label-indicator-underline = secondary_col; + }; + "module/wlan" = { + type = "internal/network"; + interface = "wlp0s20f3"; + interval = "3.0"; + + format-connected = " "; + format-connected-underline = "#9f78e1"; + label-connected = "%essid%"; + + ramp-signal-0 = ''"0.0"''; + ramp-signal-1 = ''"0.5"''; + ramp-signal-2 = ''"1.0"''; + ramp-signal-3 = ''"1.0"''; + ramp-signal-4 = ''"1.0"''; + + format-disconnected = ""; + # ;format-disconnected = + #;format-disconnected-underline = ${self.format-connected-underline} + #;label-disconnected = %ifname% disconnected + #;label-disconnected-foreground = ${colors.foreground-alt} + + + ramp-signal-foreground = foreground_altcol; + }; + "module/eth" = { + type = "internal/network"; + interface = "eno1"; + interval = "3.0"; + + format-connected-underline = "#55aa55"; + format-connected = " "; + format-connected-prefix-foreground = foreground_altcol; + label-connected = "%local_ip%"; + + format-disconnected = ""; + format-disconnected-background = "#5479b7"; + #;format-disconnected = + #;format-disconnected-underline = ${self.format-connected-underline} + #;label-disconnected = %ifname% disconnected + #;label-disconnected-foreground = ${colors.foreground-alt} + }; + "module/date" = { + type = "internal/date"; + interval = "5"; + + date = ''" %Y-%m-%d"''; + date-alt = ''" %Y-%m-%d"''; + + time = "%H:%M"; + time-alt = "%H:%M:%S"; + + #format-prefix = ""; + #format-prefix-foreground = foreground_altcol; + format-underline = "#0a6cf5"; + + label = "%date% %time%"; + }; + "module/battery" = { + type = "internal/battery"; + battery = "BAT0"; + adapter = "ADP1"; + full-at = "98"; + + format-charging-background= "#689d6a"; + format-charging-prefix = ''" "''; + format-charging = ""; + format-discharging-prefix = ''" "''; + format-discharging = ""; + format-discharging-background= "#689d6a"; + format-full-prefix = ''" "''; + + format-charging-underline = "#ffaa55"; + format-full-prefix-foreground = foreground_altcol; + format-full-underline = "#ffaa55"; + + ormat-full-padding = "1"; + format-charging-padding = "1"; + format-discharging-padding = "1"; + }; + "module/temperature" = { + type = "internal/temperature"; + thermal-zone = "0"; + warn-temperature = "60"; + + format = "