This commit is contained in:
Tyler Starr 2023-06-08 16:48:27 -07:00
parent 64eee2b903
commit f5e40074fc
18 changed files with 107 additions and 200 deletions

View File

@ -8,6 +8,7 @@ require('telescope').setup {
},
hidden_files = true,
sync_with_nvim_tree = true, -- default false
no_ignore = true,
}
}
}

View File

@ -88,25 +88,8 @@ gaps left 0
for_window [title="Steam - News"] floating enable
for_window [title="Friends List"] floating enable
for_window [title="Picture-in-Picture"] sticky toggle
for_window [con_mark="scratch-term"] floating enable, \
resize set 800 px 600 px, \
move position 880 px 420 px
for_window [con_mark="scratch-warrior"] floating enable, \
resize set 1500 px 800 px, \
move position 530 px 320 px
for_window [class="Blueman-manager"] floating enable, \
resize set 1000 px 800 px, \
move position 780 px 320 px
for_window [class="scratch-nb"] floating enable, \
resize set 1000 px 800 px, \
move position 780 px 320 px
#-------------------------------------------------------------------------------
#----- BINDING APPLICATIONS TO WORKSPACE
#-------------------------------------------------------------------------------
@ -204,22 +187,24 @@ mode rofi {
bindsym $mod+o mode open
mode open {
bindsym b exec firefox, $e
bindsym s exec steam, $e
bindsym d exec discord, $e
bindsym s exec steam || flatpak run com.valvesoftware.Steam, $e
bindsym d exec discord || flatpak run com.discordapp.Discord, $e
bindsym Escape mode default
}
# s[c]ratchpads commands
bindsym $mod+c mode scratch
mode scratch {
bindsym Return exec $HOME/.config/sway/scripts/scratch.sh \
'scratch-term' 'alacritty', $e
bindsym n exec $HOME/.config/sway/scripts/scratch.sh \
'scratch-nb' 'alacritty -e tmuxinator start nb', $e
bindsym t exec $HOME/.config/sway/scripts/scratch.sh \
'scratch-warrior' 'alacritty -e tmuxinator start task', $e
bindsym b exec $HOME/.config/sway/scripts/scratch.sh \
'scratch-blue' 'blueman-manager', $e
bindsym Return exec ~/.cargo/bin/sway-scratchpad \
--command "alacritty" \
--mark term \
--width 40 \
--height 71, $e
bindsym b exec ~/.cargo/bin/sway-scratchpad \
--command "blueman-manager" \
--mark blue \
--width 40 \
--height 71, $e
bindsym Escape mode default
}
@ -250,8 +235,6 @@ bar {
#-------------------------------------------------------------------------------
exec --no-startup-id "udiskie"
exec_always --no-startup-id "blueman-applet"
exec_always --no-startup-id "nm-applet"
exec_always --no-startup-id "configure-gtk"
exec_always --no-startup-id "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"
exec --no-startup-id "~/.config/sway/scripts/idle.sh"

View File

@ -1,3 +1,3 @@
swayidle -w \
timeout 300 '~/.config/sway/scripts/lock.sh' \
before-sleep '~/.config/sway/scripts/lock.sh'
timeout 300 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \

View File

@ -1,21 +0,0 @@
swayidle -w \
timeout 60 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' &
swaylock \
--screenshots \
--clock \
--indicator \
--indicator-radius 100 \
--indicator-thickness 7 \
--effect-blur 7x5 \
--effect-vignette 0.5:0.5 \
--ring-color bb00cc \
--key-hl-color 880033 \
--line-color 00000000 \
--inside-color 00000088 \
--separator-color 00000000 \
--grace 2 \
--fade-in 0.2
pkill --newest swayidle

View File

@ -1,34 +0,0 @@
#!/bin/sh
if [ $# -ne 2 ]; then
echo "Usage: "${0}" <i3_mark> <launch_cmd>"
echo "Example: ${0} 'scratch-emacs' 'emacsclient -c -a emacs'"
exit 1
fi
I3_MARK=${1}
LAUNCH_CMD=${2}
scratchpad_show() {
swaymsg "[con_mark=${I3_MARK}]" scratchpad show
}
# try showing the scratchpad window
if ! scratchpad_show; then
# if there is no such window...
# launch the application.
eval "${LAUNCH_CMD}" &
# Wait for the next window event.
swaymsg -t subscribe '[ "window" ]'
# Set a mark
swaymsg mark ${I3_MARK}
# Move it to the scratchpad workspace
swaymsg move scratchpad
# show the scratchpad window
scratchpad_show
fi

View File

@ -19,9 +19,10 @@ else
fi
# Volume
sink=$( pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1 )
volume=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
mute=$(pactl list sinks | grep '^[[:space:]]Mute:' | head -n $(( $SINK + 1 )) | tail -n 1 | awk '{print $2}')
sink=$(pactl list short sinks | grep 'RUNNING\|IDLE' | awk '{print $1}')
#sink=$( pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 2 | tail -n 1)
volume=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $sink + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
mute=$(pactl list sinks | grep '^[[:space:]]Mute:' | head -n $(( $sink + 1 )) | tail -n 1 | awk '{print $2}')
if [ "$mute" == "yes" ]; then
volume_color='#f92672'
@ -40,8 +41,8 @@ r2=`cat /sys/class/net/{{ .network_interface }}/statistics/rx_bytes`
t2=`cat /sys/class/net/{{ .network_interface }}/statistics/tx_bytes`
tx=`expr $t2 - $t1`
rx=`expr $r2 - $r1`
txmb=$(echo "scale = 1; $tx / 128000" | bc | awk '{printf "%05.1f\n", $0}')
rxmb=$(echo "scale = 1; $rx / 128000" | bc | awk '{printf "%05.1f\n", $0}')
txmb=$(echo "scale = 1; $tx / 1280000" | bc | awk '{printf "%05.1f\n", $0}')
rxmb=$(echo "scale = 1; $rx / 1280000" | bc | awk '{printf "%05.1f\n", $0}')
#<span foreground='#c16b26'>lel</span>

View File

@ -21,10 +21,11 @@ source $ZSH/oh-my-zsh.sh
# Export PATHs
export EDITOR=nvim
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then PATH="$HOME/.local/bin:$HOME/bin:$PATH"; fi
if ! [[ "$PATH" =~ "$HOME/.nimble/bin:" ]]; then PATH="$HOME/.nimble/bin:$PATH"; fi
if ! [[ "$PATH" =~ "$HOME/.cargo/bin:" ]]; then PATH="$HOME/.cargo/bin:$PATH" ; fi
export PATH
# Create Aliases

View File

@ -2,56 +2,6 @@
The following documents some Fedora setup that wasn't automated with ansible.
## Snapper
Snapper is used to create snapshots with the BTRFS filesystem for root and home
directories. I'd like to make these snapshots available at grub with
[grub-btrfs](https://github.com/Antynea/grub-btrfs), but I've found that
akmod-nvidia breaks it. Snapper is setup with:
```bash
sudo btrfs filesystem label / *FTL ship name*
# Make /var/log subvolume
sudo mv -v /var/log /var/log-old
sudo btrfs subvolume create /var/log
sudo cp -arv /var/log-old/. /var/log/
sudo restorecon -RFv /var/log
sudo rm -rvf /var/log-old
# Add /var/log to fstab
sudo vi /etc/fstab
# UUID=<drive uuid> /var/log btrfs subvol=var/log,compress=zstd:1 0 0
sudo systemctl daemon-reload
sudo mount -va
# Create snapper configs
sudo snapper -c root create-config /
sudo snapper -c home create-config /home
# Allow users to perform snapshots
sudo snapper -c root set-config ALLOW_USERS=$USER SYNC_ACL=yes
sudo snapper -c home set-config ALLOW_USERS=$USER SYNC_ACL=yes
sudo chown -R :$USER /.snapshots
sudo chown -R :$USER /home/.snapshots
# Add / and /home to fstab
sudo vi /etc/fstab
# UUID=<drive uuid> /.snapshots btrfs subvol=.snapshots,compress=zstd:1 0 0
# UUID=<drive uuid> /home/.snapshots btrfs subvol=home/.snapshots,compress=zstd:1 0 0
sudo systemctl daemon-reload
sudo mount -va
# Show resulting subvolume structure
sudo btrfs subvolume list /
# Enable and start snapper timeline and cleanup services
sudo systemctl enable snapper-timeline.timer
sudo systemctl start snapper-timeline.timer
sudo systemctl enable snapper-cleanup.timer
sudo systemctl start snapper-cleanup.timer
```
## Wireguard Client
Wireguard is nice for a home vpn and [pivpn](https://pivpn.io/) makes it easy.
@ -101,11 +51,6 @@ taskopen).
- `ssh_keys` - contains ssh keys for git remotes (~/.ssh/keys)
- `vimwiki` - contains text files associate with my personal vimwiki.
## Lxappearance
My GTK theme is pulled down by chezmoi, but isn't active by default. This can
be fixed with the lxappearance gui (for X sessions).
## Git SSH for personal and work
- ~/.gitconfig - personal github configuration.
@ -120,17 +65,6 @@ section).
Transfer the `.mozilla` folder from install-to-install to maintain Firefox
settings and configurations.
## Dracula colorscheme for gnome terminal
[Dracula](https://draculatheme.com/gnome-terminal) is used for gnome-terminal.
Run the following commands to install:
```bash
git clone https://github.com/dracula/gnome-terminal
cd gnome-terminal
./install.sh
```
## Bluetooth Audio
In addition to the `pipewire-codec-aptx` package being required (installed
@ -175,14 +109,7 @@ setup should usually be avoided by transfering the VM between machines:
[Google earth](https://www.google.com/earth/versions/) is nice for visualizing
my hikes and checking out snow levels. Download the RPM and install with yum.
## Emacs
## Google chrome
```bash
git clone git://git.sv.gnu.org/emacs.git
sudo dnf install autoconf texinfo gtk3-devel libgccjit-devel gnutls-devel ncurses-devel jansson jansson-devel
cd emacs
./autogen.sh
./configure --with-native-compilation --with-json --with-pgtk
make -j16
sudo make install
```
[Google chrome](https://www.google.com/chrome/) is gross, but I like to watch baseball.
Download the RPM and install with yum.

View File

@ -1,5 +1,7 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: sway.yml
tags: ["packages"]
- import_tasks: configs.yml
tags: ["configs"]
- import_tasks: gnome-settings/_main.yml

View File

@ -25,6 +25,13 @@
- /usr/share/applications/opencascade-draw.desktop
- /usr/share/applications/unitconv.desktop
- name: Delete amd vulkan files
ansible.builtin.file:
state: absent
path:
- /usr/share/vulkan/icd.d/amd_icd32.json
- /usr/share/vulkan/icd.d/amd_icd64.json
- name: Uninstall desktop bloat
dnf:
name:
@ -39,3 +46,19 @@
- gnome-maps
state: absent
become: true
- name: Start and enable bluetooth
tags: ["once"]
systemd:
name: bluetooth
enabled: true
state: started
become: true
- name: Start and enable virtualization
tags: ["once"]
systemd:
name: libvirtd
enabled: true
state: started
become: true

View File

@ -3,22 +3,9 @@
name:
- mpv # Video player based on MPlayer/mplayer2
- ffmpeg # Decoding, encoding and streaming software
- akmod-nvidia # NVIDIA drivers for linux - Libraries and Utilities
- firefox # Mozilla Firefox web browser
#- nerd-fonts # Iconic font aggregator, collection and patcher
- gnome-tweaks
- evolution
- "@base-x"
- alacritty
- rofi
- nitrogen
- libX11-devel
- libXft-devel
- libXinerama-devel
- libXrandr-devel
- libXScrnSaver-devel
- stack
- xorg-x11-xinit-session
state: present
become: true

View File

@ -0,0 +1,22 @@
- name: Install sway fedora packages
dnf:
name:
- alacritty
- rofi
- sway
- swayidle
- grim # screenshot functionality
- wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
- mako # notification system developed by swaywm maintainer
- wdisplays # tool to configure displays
- rofi
- feh
- pcmanfm
- blueman
- flameshot
state: present
become: true
- name: Install sway cargo packages
community.general.cargo:
name: sway-scratchpad

View File

@ -1,9 +1,15 @@
- name: Install gaming fedora packages
dnf:
name:
- steam # Launcher for the Steam software distribution service
- lutris # Video game preservation platform
- gamemode # Optimize system performance for games on demand
- wine # A compatibility layer for windows applications
state: present
become: true
- name: Install gaming flatpaks
flatpak:
name:
- com.valvesoftware.Steam
state: present
become: true

View File

@ -1,4 +1,6 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: fonts.yml
tags: ["packages"]
- import_tasks: configs.yml
tags: ["configs"]

View File

@ -18,3 +18,9 @@
regexp: ^Defaults env_reset
line: Defaults env_reset,timestamp_timeout=60,!tty_tickets
become: yes
- name: Add user to libvirt group
tags: ["once"]
shell: |
usermod -a -G libvirt {{ user }}
become: true

View File

@ -0,0 +1,14 @@
- name: Create font directory
file:
path: /home/{{ user }}/.local/share/fonts
state: directory
- name: Download JetBrainsMono Font
ansible.builtin.unarchive:
src: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.1/JetBrainsMono.zip
dest: /home/{{ user }}/.local/share/fonts
remote_src: yes
- name: Update font cache
shell: |
fc-cache -fv

View File

@ -19,12 +19,6 @@
state: present
become: true
- name: Enable iosevka font copr repo
community.general.copr:
name: peterwu/iosevka
state: enabled
become: true
- name: Install system fedora packages
dnf:
name:
@ -42,7 +36,6 @@
- snapper
- python3-dnf-plugin-snapper
- cargo
- iosevka-fonts
- borgbackup
- fzf
state: present

View File

@ -5,19 +5,13 @@ Jumpstart scripts to install Fedora with packages and configs I use.
## Usage
Install Fedora Workstation with BTRFS and partition:
```
1. 512Mb EFI partition at /boot/EFI
2. BTRFS volume "root" at / that fills rest of drive
3. BTFS subvolume "home" at /home
```
Install Fedora Workstation with BTRFS and default partitions.
Run the following commands:
```bash
sudo dnf install vim git -y
git clone --recurse-submodules https://github.com/starr-dusT/dotfiles ~/.local/share/chezmoi
git clone https://github.com/starr-dusT/dotfiles ~/.local/share/chezmoi
```
Copy `.chezmoidata.yaml.example` to `.chezmoidata.yaml` and edit with desired settings then run the following commands: