Initial Commit

This commit is contained in:
termite 2025-04-07 11:55:01 -07:00
commit 4aa95b0a55
14 changed files with 1114 additions and 0 deletions

3
bash_profile Normal file
View file

@ -0,0 +1,3 @@
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
exec startx
fi

17
bashrc Normal file
View file

@ -0,0 +1,17 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias today='date --iso-8601'
PS1='[\u@\h \W]\$ '
set -o vi
export PATH="~/.dotfiles/bin:$PATH"
fortune | cowsay -r

26
bin/.brightness Executable file
View file

@ -0,0 +1,26 @@
#!/bin/bash
# base dir for backlight class
basedir="/sys/class/backlight/"
# get the backlight handler
handler=$basedir$(ls $basedir)"/"
# get current brightness
old_brightness=$(cat $handler"brightness")
# get max brightness
max_brightness=$(cat $handler"max_brightness")
# calculate new brightness %
new_brightness=$(($old_brightness $1))
if [ new_brightness -lt 0 ]; then
new_brightness = 0
elif [ new_brightness -gt $max_brightness ]; then
new_brightness = $max_brightness
fi
# set the new brightness value
#sudo chmod 666 $handler"brightness"
echo $new_brightness > $handler"brightness"

32
bin/flipscreen Executable file
View file

@ -0,0 +1,32 @@
cur_state=`xrandr -q | grep LVDS | cut -d' ' -f5`
if [ $cur_state = "(normal" ]; then
cur_state="0"
elif [ $cur_state = "left" ]; then
cur_state="1"
elif [ $cur_state = "inverted" ]; then
cur_state="2"
elif [ $cur_state = "right" ]; then
cur_state="3"
fi
if [ $cur_state = "3" ]; then
xrandr -o 1
xsetwacom set 10 Rotate ccw
xsetwacom set 9 Rotate ccw
xsetwacom set 15 Rotate ccw
elif [ $cur_state = "1" ]; then
xrandr -o 3
xsetwacom set 10 Rotate cw
xsetwacom set 9 Rotate cw
xsetwacom set 15 Rotate cw
elif [ $cur_state = "0" ]; then
xrandr -o 2
xsetwacom set 10 Rotate half
xsetwacom set 9 Rotate half
xsetwacom set 15 Rotate half
else
xrandr -o 0
xsetwacom set 10 Rotate none
xsetwacom set 9 Rotate none
xsetwacom set 15 Rotate none
fi

32
bin/rotatescreen Executable file
View file

@ -0,0 +1,32 @@
cur_state=`xrandr -q | grep LVDS | cut -d' ' -f5`
if [ $cur_state = "(normal" ]; then
cur_state="0"
elif [ $cur_state = "left" ]; then
cur_state="1"
elif [ $cur_state = "inverted" ]; then
cur_state="2"
elif [ $cur_state = "right" ]; then
cur_state="3"
fi
if [ $cur_state = "0" ]; then
xrandr -o 1
xsetwacom set 10 Rotate ccw
xsetwacom set 9 Rotate ccw
xsetwacom set 15 Rotate ccw
elif [ $cur_state = "2" ]; then
xrandr -o 3
xsetwacom set 10 Rotate cw
xsetwacom set 9 Rotate cw
xsetwacom set 15 Rotate cw
elif [ $cur_state = "3" ]; then
xrandr -o 2
xsetwacom set 10 Rotate half
xsetwacom set 9 Rotate half
xsetwacom set 15 Rotate half
else
xrandr -o 0
xsetwacom set 10 Rotate none
xsetwacom set 9 Rotate none
xsetwacom set 15 Rotate none
fi

12
bin/songinfo Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
music_dir="$HOME/Music"
previewdir="$XDG_CONFIG_HOME/ncmpcpp/previews"
filename="$(mpc --format "$music_dir"/%file% current)"
previewname="$previewdir/$(mpc --format %album% current | base64).png"
[ -e "$previewname" ] || ffmpeg -y -i "$filename" -an -vf scale=128:128 "$previewname" > /dev/null 2>&1
notify-send -r 27072 "Now Playing" "$(mpc --format '%title% \n%artist% - %album%' current)" -i "$previewname"

169
bin/volbright Executable file
View file

@ -0,0 +1,169 @@
#!/bin/bash
# See README.md for usage instructions
volume_step=5
brightness_step=1
max_volume=100
notification_timeout=1000
download_album_art=true
show_album_art=true
show_music_in_volume_indicator=true
# Uses regex to get volume from pactl
function get_volume {
pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]{1,3}(?=%)' | head -1
}
# Uses regex to get mute status from pactl
function get_mute {
pactl get-sink-mute @DEFAULT_SINK@ | grep -Po '(?<=Mute: )(yes|no)'
}
# Uses regex to get brightness from xbacklight
function get_brightness {
light | grep -Po '[0-9]{1,3}' | head -n 1
}
# Returns a mute icon, a volume-low icon, or a volume-high icon, depending on the volume
function get_volume_icon {
volume=$(get_volume)
mute=$(get_mute)
if [ "$mute" == "yes" ] ; then
volume_icon=""
elif [ "$volume" -lt 50 ]; then
volume_icon=""
else
volume_icon=""
fi
}
# Always returns the same icon - I couldn't get the brightness-low icon to work with fontawesome
function get_brightness_icon {
brightness_icon=""
}
function get_album_art {
url=$(playerctl -f "{{mpris:artUrl}}" metadata)
if [[ $url == "file://"* ]]; then
album_art="${url/file:\/\//}"
elif [[ $url == "http://"* ]] && [[ $download_album_art == "true" ]]; then
# Identify filename from URL
filename="$(echo $url | sed "s/.*\///")"
# Download file to /tmp if it doesn't exist
if [ ! -f "/tmp/$filename" ]; then
wget -O "/tmp/$filename" "$url"
fi
album_art="/tmp/$filename"
elif [[ $url == "https://"* ]] && [[ $download_album_art == "true" ]]; then
# Identify filename from URL
filename="$(echo $url | sed "s/.*\///")"
# Download file to /tmp if it doesn't exist
if [ ! -f "/tmp/$filename" ]; then
wget -O "/tmp/$filename" "$url"
fi
album_art="/tmp/$filename"
else
album_art=""
fi
}
# Displays a volume notification
function show_volume_notif {
volume=$(get_mute)
get_volume_icon
if [[ $show_music_in_volume_indicator == "true" ]]; then
current_song=$(playerctl -f "{{title}} - {{artist}}" metadata)
if [[ $show_album_art == "true" ]]; then
get_album_art
fi
notify-send -t $notification_timeout -h string:x-dunst-stack-tag:volume_notif -h int:value:$volume -i "$album_art" "$volume_icon $volume%" "$current_song"
else
notify-send -t $notification_timeout -h string:x-dunst-stack-tag:volume_notif -h int:value:$volume "$volume_icon $volume%"
fi
}
# Displays a music notification
function show_music_notif {
song_title=$(playerctl -f "{{title}}" metadata)
song_artist=$(playerctl -f "{{artist}}" metadata)
song_album=$(playerctl -f "{{album}}" metadata)
if [[ $show_album_art == "true" ]]; then
get_album_art
fi
notify-send -t $notification_timeout -h string:x-dunst-stack-tag:music_notif -i "$album_art" "$song_title" "$song_artist - $song_album"
}
# Displays a brightness notification using dunstify
function show_brightness_notif {
brightness=$(get_brightness)
echo $brightness
get_brightness_icon
notify-send -t $notification_timeout -h string:x-dunst-stack-tag:brightness_notif -h int:value:$brightness "$brightness_icon $brightness%"
}
# Main function - Takes user input, "volume_up", "volume_down", "brightness_up", or "brightness_down"
case $1 in
volume_up)
# Unmutes and increases volume, then displays the notification
pactl set-sink-mute @DEFAULT_SINK@ 0
volume=$(get_volume)
if [ $(( "$volume" + "$volume_step" )) -gt $max_volume ]; then
pactl set-sink-volume @DEFAULT_SINK@ $max_volume%
else
pactl set-sink-volume @DEFAULT_SINK@ +$volume_step%
fi
show_volume_notif
;;
volume_down)
# Raises volume and displays the notification
pactl set-sink-volume @DEFAULT_SINK@ -$volume_step%
show_volume_notif
;;
volume_mute)
# Toggles mute and displays the notification
pactl set-sink-mute @DEFAULT_SINK@ toggle
show_volume_notif
;;
brightness_up)
# Increases brightness and displays the notification
light -A $brightness_step
show_brightness_notif
;;
brightness_down)
# Decreases brightness and displays the notification
light -U $brightness_step
show_brightness_notif
;;
next_track)
# Skips to the next song and displays the notification
playerctl next
sleep 0.5 && show_music_notif
;;
prev_track)
# Skips to the previous song and displays the notification
playerctl previous
sleep 0.5 && show_music_notif
;;
play_pause)
playerctl play-pause
show_music_notif
# Pauses/resumes playback and displays the notification
;;
esac

494
dunstrc Normal file
View file

@ -0,0 +1,494 @@
# See dunst(5) for all configuration options
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = none
### Geometry ###
# The width of the window, excluding the frame.
# dynamic width from 0 to 300
# width = (0, 300)
# constant width of 300
width = 300
# The height of a single notification, excluding the frame.
# dynamic height from 0 to 300
height = (0, 300)
# constant height of 300
# height = 300
# NOTE: Dunst from version 1.11 and older don't support dynamic height
# and the given value is treated as the maximum height
# Position the notification in the top right corner
origin = top-right
# Offset from the origin
# NOTE: Dunst from version 1.11 and older use this alternative notation
# offset = 10x50
offset = (10, 50)
# Scale factor. It is auto-detected if value is 0.
scale = 0
# Maximum number of notification (0 means no limit)
notification_limit = 20
### Progress bar ###
# Turn on the progress bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
progress_bar = true
# Set the progress bar height. This includes the frame, so make sure
# it's at least twice as big as the frame width.
progress_bar_height = 10
# Set the frame width of the progress bar
progress_bar_frame_width = 1
# Set the minimum width for the progress bar
progress_bar_min_width = 150
# Set the maximum width for the progress bar
progress_bar_max_width = 300
# Corner radius for the progress bar. 0 disables rounded corners.
progress_bar_corner_radius = 0
# Define which corners to round when drawing the progress bar. If progress_bar_corner_radius
# is set to 0 this option will be ignored.
progress_bar_corners = all
# Corner radius for the icon image.
icon_corner_radius = 0
# Define which corners to round when drawing the icon image. If icon_corner_radius
# is set to 0 this option will be ignored.
icon_corners = all
# Show how many messages are currently hidden (because of
# notification_limit).
indicate_hidden = yes
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
transparency = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
# If gap_size is greater than 0, this setting will be ignored.
separator_height = 2
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 8
# Padding between text and icon.
text_icon_padding = 0
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 3
# Defines color of the frame around the notification window.
frame_color = "#aaaaaa"
# Size of gap to display between notifications - requires a compositor.
# If value is greater than 0, separator_height will be ignored and a border
# of size frame_width will be drawn around each notification instead.
# Click events on gaps do not currently propagate to applications below.
gap_size = 0
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort type.
# possible values are:
# * id: sort by id
# * urgency_ascending: sort by urgency (low then normal then critical)
# * urgency_descending: sort by urgency (critical then normal then low)
# * update: sort by update (most recent always at the top)
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
# idle_threshold = 120
### Text ###
font = Font Awesome 5 Free Regular 8, Monospace 8
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0
# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <https://docs.gtk.org/Pango/pango_markup.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b>\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# Vertical alignment of message text and icon.
# Possible values are "top", "center" and "bottom".
vertical_alignment = center
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
# Ignore newlines '\n' in notifications.
ignore_newline = no
# Stack together notifications with the same content
stack_duplicates = true
# Hide the count of stacked notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
### Icons ###
# Recursive icon lookup. You can set a single theme, instead of having to
# define all lookup paths.
enable_recursive_icon_lookup = true
# Set icon theme (only used for recursive icon lookup)
icon_theme = Adwaita
# You can also set multiple icon themes, with the leftmost one being used first.
# icon_theme = "Adwaita, breeze"
# Align icons left/right/top/off
icon_position = left
# Scale small icons up to this size, set to 0 to disable. Helpful
# for e.g. small files or high-dpi screens. In case of conflict,
# max_icon_size takes precedence over this.
min_icon_size = 32
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 128
# Paths to default icons (only necessary when not using recursive icon lookup)
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
### History ###
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
### Misc/Advanced ###
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/xdg-open
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst (X11 only)
title = Dunst
# Define the class of the windows spawned by dunst (X11 only)
class = Dunst
# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 0
# Define which corners to round when drawing the window. If the corner radius
# is set to 0 this option will be ignored.
#
# Comma-separated list of the corners. The accepted corner values are bottom-right,
# bottom-left, top-right, top-left, top, bottom, left, right or all.
corners = all
# Ignore the dbus closeNotification message.
# Useful to enforce the timeout set by dunst configuration. Without this
# parameter, an application may close the notification sent before the
# user defined timeout.
ignore_dbusclose = false
### Wayland ###
# These settings are Wayland-specific. They have no effect when using X11
# Uncomment this if you want to let notifications appear under fullscreen
# applications (default: overlay)
# layer = top
# Set this to true to use X11 output on Wayland.
force_xwayland = false
### Legacy
# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false
### mouse
# Defines list of actions for each mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: Invoke the action determined by the action_name rule. If there is no
# such action, open the context menu.
# * open_url: If the notification has exactly one url, open it. If there are multiple
# ones, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
# * context: Open context menu for the notification.
# * context_all: Open context menu for all notifications.
# These values can be strung together for each mouse event, and
# will be executed in sequence.
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#222222"
foreground = "#888888"
timeout = 10
# Icon for notifications with low urgency
default_icon = dialog-information
[urgency_normal]
background = "#285577"
foreground = "#ffffff"
timeout = 10
override_pause_level = 30
# Icon for notifications with normal urgency
default_icon = dialog-information
[urgency_critical]
background = "#900000"
foreground = "#ffffff"
frame_color = "#ff0000"
timeout = 0
override_pause_level = 60
# Icon for notifications with critical urgency
default_icon = dialog-warning
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
#
# Messages can be matched by
# appname (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# set_category
# timeout
# urgency
# icon_position
# skip_display
# history_ignore
# action_name
# word_wrap
# ellipsize
# alignment
# hide_text
# override_pause_level
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# You can also allow a notification to appear even when paused. Notification will appear whenever notification's override_pause_level >= dunst's paused level.
# This can be used to set partial pause modes, where more urgent notifications get through, but less urgent stay paused. To do that, you can override the following in the rules:
# override_pause_level = X
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# skip_display = true
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

236
i3config Normal file
View file

@ -0,0 +1,236 @@
# 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).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
focus_follows_mouse no
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# 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
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# 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
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id volbright volume_up
bindsym XF86AudioLowerVolume exec --no-startup-id volbright volume_down
bindsym XF86AudioMute exec --no-startup-id volbright volume_mute
bindsym XF86MonBrightnessUp exec --no-startup-id volbright brightness_up
bindsym XF86MonBrightnessDown exec --no-startup-id volbright brightness_down
bindsym XF86AudioPlayPause exec --no-startup-id volbright play_pause
bindsym XF86AudioPause exec --no-startup-id volbright play_pause
bindsym XF86AudioPlay exec --no-startup-id volbright play_pause
bindsym XF86AudioNext exec --no-startup-id volbright next_track
bindsym XF86AudioPrev exec --no-startup-id volbright prev_track
bindsym --release XF86RotateWindows exec rotatescreen
bindsym --release XF86TaskPane exec flipscreen
bindsym --release Print exec flameshot gui
bindsym --release $mod+Print exec flameshot screen
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
bindsym $mod+Shift+x exec xkill
# 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
# 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"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# 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 windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows 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"
}
font pango:FreeSans 12
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
bindsym button1 nop
bindsym button4 nop
bindsym button5 nop
mode hide
}
hide_edge_borders both
default_border pixel 1
# class border backgr. text indicator child_border
client.focused #4c7899 #285577 #ffffff #2e9ef4 #ffffff
client.focused_inactive #333333 #5f676a #ffffff #484e50 #ffffff
client.unfocused #333333 #222222 #888888 #292d2e #ffffff
client.urgent #2f343a #900000 #ffffff #900000 #ffffff
client.placeholder #000000 #0c0c0c #ffffff #000000 #ffffff
client.background #ffffff
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
exec --no-startup-id nm-applet
exec --no-startup-id dunst
exec "i3-sensible-terminal -e ncmpcpp --class scratchpad,scratchpad"
exec_always --no-startup-id xinput set-prop 12 362 0 1 0
exec_always xinput disable 10

11
install Executable file
View file

@ -0,0 +1,11 @@
sudo pacman -S i3 mpd ncmpcpp flameshot network-manager-applet ttf-font-awesome pipewire-pulse dunst --needed --noconfirm
yay -S light --needed --noconfirm
ln -sf ~/.dotfiles/i3config ~/.config/i3/config
ln -sf ~/.dotfiles/mpd.conf ~/.config/mpd/mpd.conf
ln -sf ~/.dotfiles/ncmpcppconfig ~/.config/ncmpcpp/config
ln -sf ~/.dotfiles/bashrc ~/.bashrc
ln -sf ~/.dotfiles/bash_profile ~/.bash_profile
ln -sf ~/.dotfiles/xinitc ~/.xinitrc
ln -sf ~/.dotfiles/dunstrc ~/.config/dunst/dunstrc
ln -sf ~/.dotfiles/vimrc ~/.vimrc

7
mpd.conf Normal file
View file

@ -0,0 +1,7 @@
bind_to_address "127.0.0.1"
#bind_to_address "~/.mpd/socket"
music_directory "~/Music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
state_file "~/.mpd/mpdstate"
auto_update "yes"

1
ncmpcppconfig Normal file
View file

@ -0,0 +1 @@
execute_on_song_change = ~/.bin/songinfo

72
vimrc Normal file
View file

@ -0,0 +1,72 @@
filetype plugin on
filetype indent on
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
nnoremap <buffer> <Leader>mm <cmd>make<CR>
nnoremap <buffer> <Leader>md :Termdebug<CR>
set showcmd
set ignorecase
set smartcase
set hlsearch
set incsearch
set relativenumber
set number
syntax enable
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
packadd! termdebug
highlight ColorColumn ctermbg=magenta
call matchadd('ColorColumn', '\%81v', 100)
let g:ycm_always_populate_location_list = 1
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin()
Plug 'stevearc/vim-arduino'
Plug 'ycm-core/YouCompleteMe'
Plug 'ludovicchabant/vim-gutentags'
Plug 'lervag/vimtex'
Plug 'ervandew/supertab'
Plug 'sirver/ultisnips'
call plug#end()
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-n>'
" better key bindings for UltiSnipsExpandTrigger
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
" latex shit
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_mode=0
set conceallevel=1
let g:tex_conceal='abdmg'
if !exists('g:ycm_semantic_triggers')
let g:ycm_semantic_triggers = {}
endif
au VimEnter * let g:ycm_semantic_triggers.tex=g:vimtex#re#youcompleteme

2
xinitrc Normal file
View file

@ -0,0 +1,2 @@
xrdb -merge ~/.Xresources
exec i3