Я использую Ubuntu 14.04LTS с Единицей и использую два монитора: моя сборка ноутбука - в дисплее, 1366x768 и внешний монитор в 1920x1080 разрешение.
мой основной монитор является встроенным, и таким образом, когда я щелкаю правой кнопкой по рабочему столу и, "организуют рабочий стол по имени", значки переходят к нему и выравниваются.
проблема происходит, когда у меня есть много значков для выравнивания, и Единица отправляет некоторые значки в ниже моего видимого экрана, вероятно, рассматривая большее разрешение монитора.
Я протестировал выбор всех выровненных значков (ctrl+a) и перетаскивание к более крупному монитору, но кажется, что значки, которые были скрыты также, были перекрыты выше каждых-других.
так или иначе это, кажется, ошибка, правильно?
Я не проверил 14.10 все же, чтобы видеть, фиксируется ли это.
спасибо
Да у меня есть та же проблема.. Я нажимаю "organize desktop by name" тогда, значки уходят экран, и я имею к ctrl-A для возвращения их в представление.
Я записал сценарий для обновления положения значков. Сценарий заставляет значки поместиться в экран, независимо от того, что Ваше разрешение экрана.
Это медленно и берет немного больше, чем 1 секунда на моей машине для 100 файлов. Но по крайней мере это работает. Может быть лучший способ достигнуть этого хотя...
Копия и вставка код ниже в имени файла "arrange_icons.sh". В терминале, выполненном chmod 755 /path/to/arrange_icons.sh
. Запустите скрипт с /path/to/arrange_icons.sh
#!/bin/bash
######################################################
## Script to automatically arrange desktop icons
## taking into account screen resolution of multiple
## monitors
######################################################
# Sort icons by...
sortby=name
# sortby=none
# sortby=time
# sortby=size
# sortby=extension
# sortby=version
# Maximum size of the grid (distance between two icons)
grid_size=85
# top, right, bottom and left margin of the screen
grid_margintop=25
grid_marginright=50
grid_marginbottom=50
grid_marginleft=50
# Filling order
# Default: fill from top to bottom, then change column from left to right
# A regular english book is written using leftright-topbottom
grid_fill=topbottom-leftright
# grid_fill=topbottom-rightleft
# grid_fill=bottomtop-leftright
# grid_fill=bottomtop-rightleft
# grid_fill=leftright-topbottom
# grid_fill=leftright-bottomtop
# grid_fill=rightleft-topbottom
# grid_fill=rightleft-bottomtop
# Find the Desktop path as it may vary from language to language
# Path to home sub-directories are located in ~/.config/user-dirs.dirs
source ~/.config/user-dirs.dirs
DESKTOP="${XDG_DESKTOP_DIR}"
# Count desktop file
icon_number=$(ls "${DESKTOP}" | wc -l)
# Find monitors, dimensions and positions, and store all icon position to temp file
tmp=/tmp/arrange_icons.position-$RANDOM$RANDOM$RANDOM
while :
do
# Empty the file storing icon positions
printf '' > "${tmp}"
xrandr | grep -oE '[0-9]+x[0-9]+\+[0-9]+\+[0-9]+' | while read screen
do
width=$(echo ${screen} | cut -d 'x' -f 1)
height=$(echo ${screen} | cut -d 'x' -f 2 | cut -d '+' -f 1)
cx=$(echo ${screen} | cut -d 'x' -f 2 | cut -d '+' -f 2)
cy=$(echo ${screen} | cut -d 'x' -f 2 | cut -d '+' -f 3)
for px in $(seq $((cx + grid_marginleft)) ${grid_size} $((cx + grid_marginleft + width - grid_size - grid_marginright)))
do
for py in $(seq $((cy + grid_margintop)) ${grid_size} $((cy + grid_margintop + height - grid_size - grid_marginbottom)))
do
echo "${px},${py}" >> "${tmp}"
done
done
done
# Count the number of positions available with this grid
grid_number=$(cat "${tmp}" | wc -l)
# If it is not possible to fit every icons, try to decrease the size of the grid
# until it fits or until the grid size reaches the minimum value (1)
if [ ${grid_number} -lt ${icon_number} ]
then
grid_size=$((grid_size - 5))
if [ ${grid_size} -lt 1 ]
then
grid_size=1
break
fi
else
break;
fi
done
# Sort position according to settings
case "${grid_fill}" in
topbottom-leftright) sort -o "${tmp}" -t, -k 1,1n -k 2,2n "${tmp}"
;;
topbottom-rightleft) sort -o "${tmp}" -t, -k 1,1rn -k 2,2n "${tmp}"
;;
bottomtop-leftright) sort -o "${tmp}" -t, -k 1,1n -k 2,2rn "${tmp}"
;;
bottomtop-rightleft) sort -o "${tmp}" -t, -k 1,1rn -k 2,2rn "${tmp}"
;;
leftright-topbottom) sort -o "${tmp}" -t, -k 2,2n -k 1,1n "${tmp}"
;;
leftright-bottomtop) sort -o "${tmp}" -t, -k 2,2rn -k 1,1n "${tmp}"
;;
rightleft-topbottom) sort -o "${tmp}" -t, -k 2,2n -k 1,1n "${tmp}"
;;
rightleft-bottomtop) sort -o "${tmp}" -t, -k 2,2rn -k 1,1n "${tmp}"
;;
*) sort -o "${tmp}" -t, -k 1,1n -k 2,2n "${tmp}"
;;
esac
# List all files on the desktop and move them to the correct location
line_number=1
# Temporary path for icon
# Moving them to /tmp folder and then moving them back to the Desktop
# is sufficient to update their position :)
tmpicon=/tmp/arrange_icons.fake-$RANDOM$RANDOM$RANDOM
([ "${sortby}" != "name" ] && ls --sort=${sortby} "${DESKTOP}" || ls "${DESKTOP}") | while read icon
do
iconpath="${DESKTOP}/${icon}"
coord="$(tail -n+${line_number} "${tmp}" | head -n1)"
gvfs-set-attribute -t string "${iconpath}" 'metadata::nautilus-icon-position' "${coord}"
mv "${iconpath}" "${tmpicon}"
mv "${tmpicon}" "${iconpath}"
line_number=$((line_number + 1))
done
# Cleaning
rm "${tmp}"
На моей машине, я установил crontab, который проверяет каждую секунду папку Desktop. Если что-то изменилось, скрипт выше запущен.