diff --git a/bin/makeprio b/bin/makeprio new file mode 100755 index 0000000..a2d8d69 --- /dev/null +++ b/bin/makeprio @@ -0,0 +1,38 @@ +#!/bin/bash + +# Variables +sudo=sudo +renice=renice +pid="$(pidof "$1")" + +# Error function +error() { + >&2 echo -e "\033[1;31mERROR:\033[0m $1"; shift + exit "${1:-1}" +} + +# Test if process exists +if [[ -z $pid ]]; then + error "No such process." 1 +else + shift +fi + +# Arguments +prio="${1:--20}"; shift + +# Command building +renice=( + "$sudo" + "$renice" + "$prio" + "$pid" +) + +# Debug +#echo "${renice[@]}" +#exit 0 + +# Execution +"${renice[@]}" + diff --git a/bin/vncsconnect b/bin/vncsconnect index 4abe354..223103f 100755 --- a/bin/vncsconnect +++ b/bin/vncsconnect @@ -3,7 +3,7 @@ # Variables declare -a make_ssh_bridge open_vnc_session ssh_fwd=ssh-fwd -vncviewer=vncviewer +vncviewer=wlvncc localhost=localhost # Arguments @@ -25,7 +25,8 @@ make_ssh_bridge+=( # Open VNC session open_vnc_session+=( "$vncviewer" - "${localhost}:${local_port}" + "${localhost}" + "${local_port}" ) # Execution diff --git a/bin/webcord b/bin/webcord new file mode 100755 index 0000000..960f2c3 --- /dev/null +++ b/bin/webcord @@ -0,0 +1,5 @@ +#!/bin/sh +exec /usr/bin/webcord \ + --ozone-platform-hint=auto \ + "$@" + diff --git a/config/i3/config b/config/i3/config index f3107fa..0e62b80 100644 --- a/config/i3/config +++ b/config/i3/config @@ -3,8 +3,14 @@ set $mod Mod4 floating_modifier $mod set $refresh_i3status killall -SIGUSR1 i3status +<<<<<<< HEAD # Font font pango:monospace 8 +======= +# 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 9 +>>>>>>> refs/remotes/origin/master # Modifiers tiling_drag modifier titlebar diff --git a/config/i3/config.d/70-bindings.conf b/config/i3/config.d/70-bindings.conf index 9e7df75..b90a823 100644 --- a/config/i3/config.d/70-bindings.conf +++ b/config/i3/config.d/70-bindings.conf @@ -1,9 +1,11 @@ -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 +# Controls +bindsym XF86MonBrightnessUp exec brightnessctl s 5%- +bindsym XF86MonBrightnessDown exec brightnessctl s +5% -bindsym $mod+Return exec i3-sensible-terminal +# Launchers +bindsym $mod+Return exec --no-startup-id i3-sensible-terminal +bindsym $mod+f1 exec --no-startup-id mixxx +bindsym $mod+f2 exec --no-startup-id librewolf bindsym $mod+Shift+q kill @@ -19,10 +21,10 @@ bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right -bindsym $mod+Shift+j move left -bindsym $mod+Shift+k move down -bindsym $mod+Shift+l move up -bindsym $mod+Shift+semicolon move right +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down @@ -84,24 +86,16 @@ bindsym $mod+Shift+r restart bindsym $mod+Shift+e exec i3-msg exit mode "resize" { - # These bindings trigger as soon as you enter the resize mode + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt - # 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" @@ -109,3 +103,5 @@ mode "resize" { bindsym $mod+r mode "resize" +bindsym $mod+Mod1+l exec i3lock + diff --git a/config/sway/config.d/10-startup.conf b/config/sway/config.d/10-startup.conf index 400391a..e839356 100644 --- a/config/sway/config.d/10-startup.conf +++ b/config/sway/config.d/10-startup.conf @@ -2,4 +2,6 @@ exec --no-startup-id swaybg -i $wallpaper exec --no-startup-id swaync exec --no-startup-id swayosd exec --no-startup-id xdg-session-start +exec --no-startup-id $term +exec --no-startup-id $term sudo -i diff --git a/home/gitconfig b/home/gitconfig new file mode 100644 index 0000000..cf551e9 --- /dev/null +++ b/home/gitconfig @@ -0,0 +1,9 @@ +[user] + name = Hippolyte Chauvin + email = hchauvin38@outlook.fr +[core] + editor = nvim +[init] + defaultBranch = master +[pull] + rebase = false diff --git a/home/xinitrc b/home/xinitrc new file mode 100755 index 0000000..e5e5f2b --- /dev/null +++ b/home/xinitrc @@ -0,0 +1,40 @@ +#!/bin/sh + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +# Environment +export \ + TERMINAL=st \ + DRI_PRIME=1 \ + QT_QPA_PLATFORMTHEME=qt5ct + +numlockx & + +exec /usr/bin/i3 +