~danipragustia/dotfiles

f7f3418fde8858b3f4e4505c0946c1856bf0cd9e — Dani Pragustia 2 years ago dbb5815
config: update config more reasonable
5 files changed, 98 insertions(+), 18 deletions(-)

M .aliases
M .config/sway/config
M .config/waybar/config
M .config/waybar/style.css
M .profile
M .aliases => .aliases +4 -0
@@ 1,1 1,5 @@
alias commitall='x(){ git add . && git commit -m "$1" && git push origin master; unset -f x; }; x'

alias volup='x(){ pactl set-sink-volume 0 +$1%; unset -f x; }; x'
alias voldown='x(){ pactl set-sink-volume 0 -$1%; unset -f x; }; x'
alias volmute='x(){ pactl set-sink-mute 0 toggle; unset -f x; }; x'

M .config/sway/config => .config/sway/config +13 -4
@@ 4,8 4,9 @@ set $down j
set $up k
set $right l

set $term alacritty
set $term urxvt
set $menu dmenu_path | dmenu -b | xargs swaymsg exec --
set $sink `patctl list short sinks | cut -f1`

set $w1 一
set $w2 二


@@ 13,15 14,23 @@ set $w3 三
set $w4 四
set $w5 五

output * bg ~/wallpaper.png fill

output * bg ~/wallpaper.jpg fill
input * xkb_numlock enable

bindsym $mod+Return exec $term

bindsym --release Print exec grim - | wl-copy
bindsym --release Shift+Print exec grim -g "$(slurp)"
bindsym --release $mod+Print exec grim
bindsym --release $mod+Print exec grim -g "$(slurp)"
bindsym --release $mod+Shift+Print exec grim

bindsym $mod+z exec --no-startup-id pactl set-sink-volume $sink +10%
bindsym $mod+x exec --no-startup-id pactl set-sink-volume $sink -10%
bindsym $mod+c exec --no-startup-id pactl set-sink-mute $sink toggle

bindsym $mod+Shift+a exec --no-startup-id pactl set-sink-volume $sink +5%
bindsym $mod+Shift+s exec --no-startup-id pactl set-sink-volume $sink -5%
bindsym $mod+Shift+d exec --no-startup-id pactl set-sink-mute $sink toggle

bindsym $mod+Shift+q kill
bindsym $mod+d exec $menu

M .config/waybar/config => .config/waybar/config +58 -10
@@ 2,14 2,14 @@
	"layer": "top",
	"modules-left": ["custom/start", "sway/workspaces",  "sway/window", "sway/mode"],
	"modules-center": ["custom/time"],
	"modules-right": ["custom/date","tray","network","memory","cpu"],
	"modules-right": ["custom/date","memory","cpu","temperature","network","pulseaudio","battery"],
	"custom/start": {
		"format": " ■ ",
		"on-click": "dmenu_path | dmenu -b | xargs swaymsg exec --"
	},
	"sway/window": {
		"format": " {}",
		"max-length": 80
		"max-length": 60
	},
	"custom/time": {
		"format": "{}",


@@ 18,9 18,9 @@
		"exec": "date +'%H:%M'"
	},
	"custom/date": {
		"interval": 86400,
		"format": " {} ",
		"max-length": 50,
		"format": "{}",
		"interval": 36500,
		"max-length": 30,
		"exec": "date +'%A, %d %h %Y'"
	},
	"memory": {


@@ 34,10 34,58 @@
		"max-length": 50
	},
	"network": {
		"format-ethernet": " LAN",
		"format-linked": "LAN Non-IP",
		"format-disconnected": "Offline",
		"format-alt": "IP : {ipaddr}",
		"max-length": 50
	    "interface": "wlan0",
	    "format": "{ifname}",
	    "format-wifi": "{essid} ",
	    "format-ethernet": "{ifname} ",
	    "format-disconnected": "", //An empty format will hide the module.
	    "tooltip-format": "{ifname}",
	    "tooltip-format-wifi": "{essid} ({signalStrength}%) ",
	    "tooltip-format-ethernet": "{ifname} ",
	    "tooltip-format-disconnected": "Disconnected",
	    "max-length": 50
	},
	"battery": {
		"bat": "BAT0",
		"interval": 60,
		"states": {
			"warning": 30,
			"critical": 15
		},
		"format": "{capacity}% {icon}",
		"format-icons": ["", "", "", "", ""],
		"max-length": 25
	},
	"pulseaudio": {
		"format": "{volume}% {icon}",
		"format-bluetooth": "{volume}% {icon}",
		"format-muted": "",
		"format-icons": {
			"headphone": "",
			"hands-free": "",
			"headset": "",
			"phone": "",
			"portable": "",
			"car": "",
			"default": ["", ""]
		},
		"scroll-step": 1
	},
	 "temperature": {
	 	// "thermal-zone": 2,
		// "hwmon-path": "/sys/class/hwmon/hwmon0/temp1_input",
		// "critical-threshold": 60,
		// "format-critical": " {temperatureC}°C ",
		"format": " {temperatureC}°C"
	}

	
	
	
	
	
	
	
	
	
}

M .config/waybar/style.css => .config/waybar/style.css +16 -2
@@ 60,9 60,11 @@ window#waybar.solo {
#network,
#pulseaudio,
#mode,
#battery,
#temperature,
#idle_inhibitor {
	padding:0 10px;
	margin:0 4px;
	padding:0 5px;
	margin:0 5px;
}

label:focus {


@@ 97,6 99,18 @@ label:focus {
    background-color: transparent;
}

#battery {
    color: #89BEB7;
}

#temperature {
    color: #832426;
}

#pulseaudio {
	color: #D8D8B3;
}

#custom-start {
    background-color:#ECC3C2;
    color:#fff;

M .profile => .profile +7 -2
@@ 1,8 1,13 @@
export XDG_RUNTIME_DIR=/tmp
export XDG_RUNTIME_DIR=~/tmp
export GDK_BACKEND=wayland
export MOZ_DBUS_REMOTE=1
export EDITOR=vim
export WINIT_UNIX_BACKEND=alacritty
export WINIT_UNIX_BACKEND=urxvt
export PATH=~/bin:$PATH

export chroot_dir=~/chroot
export chroot_mirror=http://dl-cdn.alpinelinux.org/alpine
export chroot_arch=x86

if [ "$(type -t git_branch)" = 'git_branch' ]; then
	export PS1="\[\033[38;5;160m\]\w\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;29m\]\`git_branch\`\[$(tput sgr0)\]\$ \[$(tput sgr0)\]"