fixed some stuff

This commit is contained in:
opalvault
2022-01-02 18:40:56 -08:00
parent 8ffd13b735
commit 7a8b14835e
20 changed files with 1468 additions and 423 deletions

View File

@@ -27,7 +27,7 @@ set $right l
set $term alacritty
# Application Launcher
set $menu dmenu_path | dmenu | xargs swaymsg exec --
set $menu wofi --hide-scroll --show drun | xargs swaymsg exec
#+end_src
*** Opacity
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
@@ -41,9 +41,15 @@ for_window [app_id=".*"] opacity $opacity
default_border none
# Gaps
gaps top 2
gaps inner 3
# gaps outer 3
gaps top 0
gaps inner 10
gaps outer 10
#+end_src
*** Notifications
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
# Dismiss notifications
bindsym Control+space exec makoctl dismiss
bindsym --locked $mod+d exec sh -c "notify-send 'Do Not Disturb' 'Turning on Do Not Disturb Mode'; sleep 2; makoctl set-mode do-not-disturb"
#+end_src
*** Mouse Behavior
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
@@ -60,24 +66,33 @@ exec_always wlsunset -l 47.6, -122.3 -t 3500 -T 6500
#+end_src
*** Wallpaper & Monitor(s)
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
# Wallpaper
output * bg /home/opal/dotfiles/guix/home/files/wallpapers/guix-wallpaper.jpg stretch
# Monitors
# You can get the names of your outputs by running: swaymsg -t get_outputs
output eDP-1 resolution 1920x1080 position 0,0
# output eDP-1 pos 0 0 res 1920x1200
# output DP-5 pos 3440 0 res 3440x1440
output eDP-1 pos 0 0 res 1920x1200
output DP-5 pos 1920 0 res 3440x1440
# Wallpaper
output DP-5 bg /home/opal/dotfiles/guix/home/files/wallpapers/fog-wallpaper.jpg fill
output eDP-1 bg /home/opal/dotfiles/guix/home/files/wallpapers/fog-wallpaper.jpg fill
#+end_src
*** Idle Behavior
*** Idle/Exit Behavior
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
### Idle configuration
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
timeout 600 'swaylock -f' \
timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f'
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t custom -m 'Do you wish to fully reload your Sway session?' -b 'Yes' 'swaymsg exit'
# Turn the system off
bindsym $mod+Shift+p exec swaynag -t custom -m 'What action would you like to perform?' -b 'Shutdown' 'poweroff' -b 'Restart' 'poweroff --reboot'
#+end_src
*** Input
@@ -129,6 +144,22 @@ bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+x exec swaymsg -r exit
#+end_src
*** Media/Brightness
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
## Volume
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
# Media playerctl
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioPlay exec playerctl play-pause
# Backlight
bindsym XF86MonBrightnessUp exec light -A 10 && notify-send "󰃞 Light" "Brightness: $(light)%" --hint="int:value:$(light)"
bindsym XF86MonBrightnessDown exec light -U 10 && notify-send "󰃞 Light" "Brightness: $(light)%" --hint="int:value:$(light)"
#+end_src
*** Navigation & Focus
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
@@ -157,11 +188,12 @@ bindsym $mod+Shift+Right move right
#+end_src
*** Workspaces
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
set $ws1 ۱
set $ws2 ۲
set $ws3 ۳
set $ws4 ۴
set $ws5 ۵
# Assign workspaces to variables
set $ws1 number 1
set $ws2 number 2
set $ws3 number 3
set $ws4 number 4
set $ws5 number 5
# Switch to workspace
bindsym $mod+1 workspace $ws1
@@ -240,6 +272,13 @@ mode "resize" {
}
bindsym $mod+r mode "resize"
#+end_src
** GTK Theme
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
exec_always import-gsettings \
gtk-theme:gtk-theme-name \
icon-theme:gtk-icon-theme-name \
cursor-theme:gtk-cursor-theme-name
#+end_src
** Swaybar
#+begin_src shell :tangle ~/dotfiles/guix/home/files/sway/config :mkdirp yes
@@ -248,21 +287,316 @@ bindsym $mod+r mode "resize"
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
gaps 5
swaybar_command waybar
# position top
# gaps 5
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
# # When the status_command prints a new line to stdout, swaybar updates.
# # The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
}
#+end_src
** Swaylock
#+begin_src shell :tangle ~/dotfiles/guix/home/files/swaylock/config :mkdirp yes
# Image
image=/home/opal/guix/home/files/wallpapers/fog-wallpaper.jpg
scaling=fill
# Indicator
ignore-empty-password
indicator-caps-lock
# Behavior
show-failed-attempts
#+end_src
* Waybar
** waybar/config
#+begin_src shell :tangle ~/dotfiles/guix/home/files/waybar/config :mkdirp yes
{
"layer": "top", // Waybar at top layer
"position": "top", // Waybar at the bottom of your screen
"height": 24, // Waybar height
// "width": 1366, // Waybar width
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "custom/spotify"],
"modules-center": ["sway/window"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "battery", "tray", "clock"],
// "sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": false,
"format": "{icon}",
"format-icons": {
// "1:web": "",
// "2:code": "",
// "3:term": "",
// "4:work": "",
// "5:music": "",
// "6:docs": "",
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% "
},
"memory": {
"format": "{}% "
},
"battery": {
"bat": "BAT0",
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"network": {
// "interface": "wlp2s0", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-disconnected": "Disconnected ⚠"
"on-click": "alacritty -e nmtui"
},
"pulseaudio": {
//"scroll-step": 1,
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon}",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"on-click": "pavucontrol"
},
"custom/spotify": {
"format": " {}",
"max-length": 40,
"interval": 30, // Remove this if your script is endless and write in loop
"exec": "$HOME/.config/waybar/mediaplayer.sh 2> /dev/null", // Script in resources folder
"exec-if": "pgrep spotify"
}
}
#+end_src
** waybar/style.css
#+begin_src shell :tangle ~/dotfiles/guix/home/files/waybar/style.css :mkdirp yes
\* {
border: none;
border-radius: 0;
font-family: "Fira Sans, normal";
font-size: 13px;
min-height: 0;
}
window#waybar {
background: transparent;
color: white;
}
#window {
font-weight: bold;
font-family: "Fira Sans, normal";
}
/*
#workspaces {
padding: 0 5px;
}
*/
#workspaces button {
padding: 0 5px;
background: transparent;
color: white;
border-top: 2px solid transparent;
}
#workspaces button.focused {
color: white;
border-top: 2px solid white;
}
#mode {
background: #64727D;
border-bottom: 3px solid white;
}
#clock, #battery, #cpu, #memory, #network, #pulseaudio, #custom-spotify, #tray, #mode {
padding: 0 3px;
margin: 0 2px;
}
#clock {
font-weight: bold;
}
#battery {
}
#battery icon {
color: red;
}
#battery.charging {
}
@keyframes blink {
to {
background-color: #ffffff;
color: black;
}
}
#battery.warning:not(.charging) {
color: white;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#cpu {
}
#memory {
}
#network {
}
#network.disconnected {
background: #f53c3c;
}
#pulseaudio {
}
#pulseaudio.muted {
}
#custom-spotify {
color: rgb(102, 220, 105);
}
#tray {
}
#+end_src
* Wofi
** wofi/config
#+begin_src shell :tangle ~/dotfiles/guix/home/files/wofi/config :mkdirp yes
style=/home/opal/guix/home/files/wofi/style.css
xoffset=710
yoffset=275
show=drun
width=500
height=500
always_parse_args=true
show_all=true
print_command=true
layer=overlay
insensitive=true
prompt=
#+end_src
** wofi/style.css
#+begin_src shell :tangle ~/dotfiles/guix/home/files/wofi/style.css :mkdirp yes
window {
margin: 0px;
border: 2px solid #414868;
border-radius: 5px;
background-color: #24283b;
font-family: monospace;
font-size: 12px;
}
#input {
margin: 5px;
border: 1px solid #24283b;
color: #c0caf5;
background-color: #24283b;
}
#input image {
color: #c0caf5;
}
#inner-box {
margin: 5px;
border: none;
background-color: #24283b;
}
#outer-box {
margin: 5px;
border: none;
background-color: #24283b;
}
#scroll {
margin: 0px;
border: none;
}
#text {
margin: 5px;
border: none;
color: #c0caf5;
}
#entry:selected {
background-color: #414868;
font-weight: normal;
}
#text:selected {
background-color: #414868;
font-weight: normal;
}
#+end_src
* Swaynag
#+begin_src shell :tangle ~/dotfiles/guix/home/files/swaynag/config :mkdirp yes
[custom]
font=mononoki Nerd Font 10
dismiss-button=Dismiss
background=0f0f0f
border=262626
border-bottom=262626
button-background=262626
text=f0f0f0
border-bottom-size=2
message-padding=5
details-border-size=2
button-border-size=0
button-gap=5
button-dismiss-gap=5
button-margin-right=5
button-padding=5
#+end_src
* Zsh
Aside from using e-shell for quick command line usage, I mainly use vterm with Zsh. It's a bit of a complicated setup but allows for the maximum number of files possible to live in .config instead of littering my home directory.
@@ -277,18 +611,14 @@ ZSH_THEME="mrtazz"
DISABLE_AUTO_UPDATE="true"
ENABLE_CORRECTION="true"
plugins=(git)
# This has to stay below plugins.
source $ZSH/oh-my-zsh.sh
# --- user paths --- #
# scripts
export PATH=/home/ry/scripts:$PATH
# cron scripts
export PATH=/home/ry/scripts/cron-scripts:$PATH
# doom
export PATH=~/.config/emacs/bin:$PATH
# GNU Guix path
export PATH=/home/ry/.guix-profile/bin:$PATH
# Scripts
export PATH=/home/opal/bin:$PATH
# --- locale --- #
export LANG=en_US.UTF-8
@@ -307,27 +637,14 @@ alias remove="guix remove"
alias search="guix search"
alias pull="guix pull"
alias upgrade="guix package -u"
alias hreconfig="guix home reconfigure ~/dotfiles/guix/home/files/guix-home.scm"
alias hreconfig="guix home reconfigure ~/dotfiles/guix/home/guix-home.scm"
# qol
alias vi="nvim"
alias vim="nvim"
alias unmount="umount"
# git
alias ga="git add"
alias gc="git commit -m"
alias gs="git status"
alias gd="git diff"
alias gm="git merge"
alias gp="git push"
alias gco="git checkout"
# config
alias zshrcsource="source ~/dotfiles/guix/home/files/zsh/zshrc"
#+end_src
**
** zprofile
#+begin_src shell :tangle ~/dotfiles/guix/home/files/zsh/zprofile :mkdirp yes
# Each new shell auto-imports all environment variables.
@@ -362,7 +679,7 @@ fi
#+RESULTS:
* Alacritty
#+begin_src sh :tangle ~/dotfiles/guix/home/files/alacritty.yml :mkdirp yes
#+begin_src sh :tangle ~/dotfiles/guix/home/files/alacritty/alacritty.yml :mkdirp yes
# Env
env:
TERM: xterm-256color
@@ -840,3 +1157,22 @@ XDG_MUSIC_DIR="$HOME/music"
XDG_PICTURES_DIR="$HOME/pictures"
XDG_VIDEOS_DIR="$HOME/videos"
#+end_src
* GTK/Theme Settings
#+begin_src shell :tangle ~/dotfiles/guix/home/files/gtk-3.0/settings.ini :mkdirp yes
[Settings]
gtk-cursor-theme-name=
gtk-theme-name=Arc-Dark
gtk-font-name=Fira Sans Regular
gtk-icon-theme-name=Papirus
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
#+end_src